<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hp.dao.FeedMapper">
<resultMap type="Feed" id="FeedList"></resultMap>
<!--显示 -->
<select id="findselect" resultMap="FeedList" parameterType="Feed">
SELECT tab_user.uname,tab_feedback.*
FROM tab_user,tab_feedback
WHERE tab_user.id = tab_feedback.author
and uname = #{uname}
<if test="author!=null and author!=''">
and author LIKE CONCAT('%',#{author},'%')
</if>
<if test="open!=null">
and open = #{open}
</if>
</select>
</mapper>
XXXMapper.xml
最新推荐文章于 2024-11-13 17:07:29 发布