Files
zentao/src/main/resources/mapper/ZtStoryUserTaskMapper.xml
2025-04-02 09:03:34 +08:00

92 lines
3.7 KiB
XML

<?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.sa.zentao.mapper.ZtStoryUserTaskMapper">
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtStoryUserTask">
<result column="id" property="id" />
<result column="user_story_id" property="userStoryId" />
<result column="type" property="type" />
<result column="estimate" property="estimate" />
<result column="consumed" property="consumed" />
<result column="left" property="left" />
<result column="assigned_to" property="assignedTo" />
<result column="need_meeting" property="needMeeting" />
<result column="need_design" property="needDesign" />
<result column="product" property="product" />
<result column="name" property="name" />
<result column="remark" property="remark" />
<result column="estStarted" property="eststarted" />
<result column="deadline" property="deadline" />
<result column="realStarted" property="realstarted" />
<result column="finishedDate" property="finisheddate" />
<result column="finishedBy" property="finishedby" />
<result column="canceledBy" property="canceledby" />
<result column="canceledDate" property="canceleddate" />
<result column="closedBy" property="closedby" />
<result column="closedDate" property="closeddate" />
<result column="closed_remark" property="closedRemark" />
<result column="openedBy" property="openedby" />
<result column="openedDate" property="openeddate" />
<result column="pri" property="pri" />
</resultMap>
<select id="pageList" resultType="com.sa.zentao.dao.ZtStoryUserTaskDTO">
SELECT s.* from zt_story_user_task s,zt_product p WHERE s.product = p.id
<if test="qo.id != null and qo.id != 0">
and s.id = #{qo.id}
</if>
<if test="qo.name != null and qo.name != ''">
and s.name like concat('%', #{qo.name}, '%')
</if>
<if test="qo.type != null and qo.type != ''">
and s.`type` = #{qo.type}
</if>
<if test="qo.pri != null and qo.pri != ''">
and s.pri = #{qo.pri}
</if>
<if test="qo.assignedTo != null and qo.assignedTo != ''">
and s.assigned_to = #{qo.assignedTo}
</if>
<if test="qo.status != null and qo.status != ''">
and s.status = #{qo.status}
</if>
<if test="qo.startDate !=null">
and s.opened_date <![CDATA[>=]]> #{qo.startDate}
</if>
<if test="qo.endDate !=null">
and s.opened_date <![CDATA[<=]]> #{qo.endDate}
</if>
<if test="qo.searchVal == 'ALL' ">
</if>
<if test="qo.searchVal == 'WGB' ">
and s.status != 'closed'
</if>
<if test="qo.searchVal == 'ZGW' ">
and s.assigned_to= #{qo.userName}
</if>
<if test="qo.searchVal == 'YGB' ">
and s.status = 'closed'
</if>
<if test="qo.productIds != null and qo.productIds.size() > 0">
and s.product in
<foreach collection="qo.productIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
order by s.id desc
</select>
</mapper>