<?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.TaskMapper">
<resultMap type="Task" id="taskList"></resultMap>
<select id="findTaskAll" resultMap="taskList">
SELECT *
FROM Project,Task
WHERE Project.ProjectID = Task.ProjectID
<if test="projectID!=null">
and Task.projectID = #{projectID}
</if>
<if test="content!=null and content!=''">
and content like CONCAT('%',#{content},'%')
</if>
<if test="taskState!=null">
and taskState =#{taskState}
</if>
</select>
</mapper>
<?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.BackMapper">
<resultMap type="Back" id="findList"></resultMap>
<select id="findAll" resultMap="findList">
select t2.*,t1.uname
from tab_user t1,tab_feedback t2
where t2.author =t1.id
and uname = #{uname}
<if test="title!=null and title!=''">
and title Like CONCAT('%',#{title},'%')
</if>
</select>
</mapper>
///
<?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.FeedbcakMapper">
<resultMap type="Feedbcak" id="findList"></resultMap>
<select id="findAll" resultMap="findList">
select t2.*,t1.uname
from tab_user t1,tab_feedback t2
where t2.author =t1.id
and uname = #{uname}
<if test="title != null and title != ''">
and title Like CONCAT('%',#{title},'%')
</if>
<if test="open != null ">
and open = #{open}
</if>
</select>
</mapper>