发布等

This commit is contained in:
2025-01-08 09:04:13 +08:00
parent fdef054baf
commit 75a119a130
113 changed files with 5911 additions and 400 deletions

View File

@ -141,8 +141,87 @@
SELECT * from zt_bug
WHERE 1=1
and openedBy =#{qo.userName}
or assignedTo =#{qo.userName}
<if test="qo.objIds != null and qo.objIds.size() > 0">
and id in
<foreach collection="qo.objIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="qo.projectIds != null and qo.projectIds.size() > 0">
and project in
<foreach collection="qo.projectIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="qo.searchVal == 'ALL' ">
</if>
<if test="qo.searchVal == 'WGB' ">
-- 未关闭
and status !='closed'
</if>
<if test="qo.searchVal == 'YWCJ' ">
-- 由我创建
and openedBy =#{qo.userName}
</if>
<if test="qo.searchVal == 'ZPGW' ">
-- 指派给我
and assignedTo =#{qo.userName}
</if>
<if test="qo.searchVal == 'YWJJ' ">
-- 由我解决
and resolvedBy =#{qo.userName}
and status= 'resolved'
</if>
<if test="qo.searchVal == 'YWZP' ">
-- 由我指派
and openedBy =#{qo.userName}
</if>
<if test="qo.searchVal == 'WJJ' ">
-- //未解决
and status= 'active'
</if>
<if test="qo.searchVal == 'WQR' ">
-- //未确认
and confirmed= 0
</if>
<if test="qo.searchVal == 'WZP' ">
-- //未指派
and assignedTo is null
</if>
<if test="qo.searchVal == 'JWCL' ">
-- //久未处理
</if>
<if test="qo.searchVal == 'DGB' ">
-- //待关闭
</if>
<if test="qo.searchVal == 'BYQ' ">
-- //被延期
</if>
<if test="qo.searchVal == 'GQ' ">
-- //过期BUG
</if>
<if test="qo.searchVal == 'XQBD' ">
-- //研发需求变动
</if>
order by id desc

View File

@ -0,0 +1,19 @@
<?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.ZtFileMapper">
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtFile">
<result column="id" property="id" />
<result column="pathname" property="pathname" />
<result column="title" property="title" />
<result column="extension" property="extension" />
<result column="size" property="size" />
<result column="objectType" property="objecttype" />
<result column="objectID" property="objectid" />
<result column="addedBy" property="addedby" />
<result column="addedDate" property="addeddate" />
<result column="downloads" property="downloads" />
<result column="extra" property="extra" />
<result column="deleted" property="deleted" />
</resultMap>
</mapper>

View File

@ -0,0 +1,13 @@
<?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.ZtNoticeMapper">
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtNotice">
<result column="id" property="id" />
<result column="name" property="name" />
<result column="title" property="title" />
<result column="create_date" property="createDate" />
<result column="create_user" property="createUser" />
<result column="lose_date" property="loseDate" />
</resultMap>
</mapper>

View File

@ -220,5 +220,10 @@
</if>
</select>
<select id="selectPrdByName" resultType="com.sa.zentao.dao.ZtProjectDTO">
SELECT * from zt_project WHERE `name` = #{name} and type = 'sprint'
</select>
</mapper>

View File

@ -9,5 +9,10 @@
<result column="version" property="version" />
<result column="order" property="order" />
</resultMap>
<select id="storyListPrd" resultType="com.sa.zentao.entity.ZtProjectstory">
SELECT * from zt_projectstory WHERE project = #{id}
</select>
</mapper>

View File

@ -0,0 +1,58 @@
<?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.ZtReleaseDetailsMapper">
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtReleaseDetails">
<result column="id" property="id" />
<result column="release_id" property="releaseId" />
<result column="object_id" property="objectId" />
<result column="status" property="status" />
</resultMap>
<select id="releasePageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
select s.*,sp.spec ,sp.verify,sp.files from (zt_story s,zt_projectstory ps,zt_release_details details ) left join zt_storyspec sp on s.id = sp.story
left join zt_storyreview v on s.id = v.story and s.version = v.version
left join zt_projectstory pstory on s.id = pstory.story and pstory.execution =0
left join zt_project pj on pstory.project = pj.id
WHERE s.id = ps.story
and s.id = details.object_id
and details.object_type ='story'
and details.release_id = #{qo.id}
and details.status != 'closed'
<if test="qo.name != null and qo.name != '' ">
and s.title like concat('%', #{qo.name}, '%')
</if>
<if test="qo.storyId != null ">
and s.id = #{qo.storyId}
</if>
group by s.id
</select>
<select id="storyPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
select s.*,sp.spec ,sp.verify,sp.files from zt_story s
left join zt_storyreview v on s.id = v.story and s.version = v.version
left join zt_storyspec sp on s.id = sp.story
where 1=1
and s.status='active'
and s.stage='tested'
and s.id in
<foreach collection="qo.storyList" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
<if test="qo.name != null and qo.name != '' ">
and s.title like concat('%', #{qo.name}, '%')
</if>
<if test="qo.storyId != null ">
and s.id = #{qo.storyId}
</if>
group by s.id
</select>
</mapper>

View File

@ -0,0 +1,77 @@
<?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.ZtReleaseMapper">
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtRelease">
<result column="id" property="id" />
<result column="project" property="project" />
<result column="product" property="product" />
<result column="branch" property="branch" />
<result column="shadow" property="shadow" />
<result column="build" property="build" />
<result column="name" property="name" />
<result column="marker" property="marker" />
<result column="date" property="date" />
<result column="stories" property="stories" />
<result column="bugs" property="bugs" />
<result column="leftBugs" property="leftbugs" />
<result column="desc" property="desc" />
<result column="mailto" property="mailto" />
<result column="notify" property="notify" />
<result column="status" property="status" />
<result column="subStatus" property="substatus" />
<result column="createdBy" property="createdby" />
<result column="createdDate" property="createddate" />
<result column="deleted" property="deleted" />
</resultMap>
<select id="pageList" resultType="com.sa.zentao.dao.ZtReleaseDTO">
SELECT * from zt_release s where 1=1
and project =#{qo.project}
<if test="qo.searchVal != null and qo.searchVal != '' ">
<if test="qo.searchVal == 'ALL' ">
</if>
<if test="qo.searchVal == 'DPS' ">
and s.status = 'reviewing'
</if>
<if test="qo.searchVal == 'WFB' ">
and s.status = 'waitRelease'
</if>
<if test="qo.searchVal == 'YFB' ">
and s.status= 'released'
</if>
</if>
order by id desc
</select>
<select id="storyPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
select s.*,sp.spec ,sp.verify,sp.files from zt_story s
left join zt_storyreview v on s.id = v.story and s.version = v.version
left join zt_storyspec sp on s.id = sp.story
where 1=1
and
<if test="ids != null and ids.size() > 0">
s.id in
<foreach collection="ids" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="qo.name != null and qo.name != '' ">
and s.title like concat('%', #{qo.name}, '%')
</if>
<if test="qo.storyId != null ">
and s.id=#{qo.storyId}
</if>
</select>
</mapper>

View File

@ -74,51 +74,51 @@
</if>
<if test="qo.searchVal == 'WGB' ">
and s.status = 'closed'
and s.closedBy= #{qo.userName}
and s.status != 'closed'
</if>
<if test="qo.searchVal == 'ZGW' ">
<if test="qo.searchVal != null and qo.searchVal == 'ZGW' ">
and s.assignedTo= #{qo.userName}
</if>
<if test="qo.searchVal == 'WCJ' ">
<if test="qo.searchVal != null and qo.searchVal == 'WCJ' ">
and s.openedBy= #{qo.userName}
</if>
<if test="qo.searchVal == 'YWPS' ">
<if test="qo.searchVal != null and qo.searchVal == 'YWPS' ">
and v.reviewer = #{qo.userName}
and s.status ='reviewing'
and v.result = ''
</if>
<if test="qo.searchVal == 'JH' ">
<if test="qo.searchVal != null and qo.searchVal == 'JH' ">
and s.status = 'active'
</if>
<if test="qo.searchVal == 'YGB' ">
<if test="qo.searchVal != null and qo.searchVal == 'YGB' ">
and s.status = 'closed'
</if>
<if test="qo.searchVal == 'DGB' ">
<if test="qo.searchVal != null and qo.searchVal == 'DGB' ">
and s.stage = 'verified'
and s.ys_flag =1
</if>
<if test="qo.searchVal == 'BGZ' ">
<if test="qo.searchVal != null and qo.searchVal == 'BGZ' ">
and s.status = '11'
</if>
<if test="qo.searchVal == 'WZP' ">
<if test="qo.searchVal != null and qo.searchVal == 'WZP' ">
and s.status = '11'
</if>
<if test="qo.searchVal == 'WPS' ">
<if test="qo.searchVal != null and qo.searchVal == 'WPS' ">
and s.reviewedBy like concat('%', #{qo.userName}, '%')
</if>
<if test="qo.searchVal == 'PSZ' ">
<if test="qo.searchVal != null and qo.searchVal == 'PSZ' ">
and s.status = 'reviewing'
</if>
<if test="qo.searchVal == 'DYS' ">
<if test="qo.searchVal != null and qo.searchVal == 'DYS' ">
and s.stage = 'verified'
and s.ys_flag =0
</if>
@ -133,10 +133,38 @@
and s.module = #{qo.module}
</if>
<if test="qo.searchVal != null and qo.searchVal == 'YWGB' ">
and s.status ='closed'
and closedBy =#{qo.userName}
</if>
group by s.id
order by id desc
<choose>
<when test="qo.orderName != '' and qo.orderName != null ">
<choose>
<when test="qo.orderSort != '' and qo.orderSort != null ">
order by s.${qo.orderName} ${qo.orderSort}
</when>
<otherwise>
order by s.id desc
</otherwise>
</choose>
</when>
<otherwise>
order by s.id desc
</otherwise>
</choose>
-- order by id desc
</select>
@ -148,6 +176,9 @@
select s.*,sp.spec ,sp.verify,sp.files from (zt_story s,zt_projectstory ps ) left join zt_storyspec sp on s.id = sp.story
left join zt_storyreview v on s.id = v.story and s.version = v.version
left join zt_projectstory pstory on s.id = pstory.story and pstory.execution =0
left join zt_project pj on pstory.project = pj.id
WHERE s.id = ps.story
<if test="qo.project != null ">
and ps.project =#{qo.project}
@ -168,9 +199,13 @@
and s.assignedTo = #{qo.userName}
</if>
<if test="qo.searchVal != null and qo.searchVal == 'INDEX' ">
<if test="qo.kfz == 1 ">
<if test="qo.userName != null and qo.userName != '' ">
and s.assignedTo = #{qo.userName}
or s.openedBy = #{qo.userName}
</if>
</if>
<if test="qo.searchVal != null and qo.searchVal == 'WCJ' ">
@ -183,8 +218,343 @@
</if>
<if test="qo.searchVal == 'JH' ">
and s.status = 'active'
</if>
<if test="qo.searchVal == 'YGB' ">
and s.status = 'closed'
</if>
<if test="qo.searchVal == 'DGB' ">
and s.stage = 'verified'
and s.ys_flag =1
</if>
<if test="qo.searchVal == 'BGZ' ">
and s.status = '11'
</if>
<if test="qo.searchVal == 'WZP' ">
and s.status = '11'
</if>
<if test="qo.searchVal == 'WPS' ">
and s.reviewedBy like concat('%', #{qo.userName}, '%')
</if>
<if test="qo.searchVal == 'PSZ' ">
and s.status = 'reviewing'
</if>
<if test="qo.searchVal == 'DYS' ">
and s.stage = 'verified'
and s.ys_flag =0
</if>
<if test="qo.searchVal != null and qo.searchVal == 'YWGB' ">
and s.status ='closed'
and closedBy =#{qo.userName}
</if>
<if test="qo.searchCode != null and qo.searchCode != '' ">
-- //项目名称
<if test="qo.searchCode=='xmmc' and qo.searchValue != null and qo.searchValue != '' ">
and pj.name like concat('%', #{qo.searchValue}, '%')
</if>
-- 项目id
<if test="qo.searchCode=='xmid' and qo.searchValue != null and qo.searchValue != '' ">
and pj.id =#{qo.searchValue}
</if>
-- //需求名称
<if test="qo.searchCode=='xqmc' and qo.searchValue != null and qo.searchValue != '' ">
and s.title like concat('%', #{qo.searchValue}, '%')
</if>
-- 需求id
<if test="qo.searchCode=='xqid' and qo.searchValue != null and qo.searchValue != '' ">
and s.id =#{qo.searchValue}
</if>
-- 状态
<if test="qo.searchCode=='zt' and qo.searchValue != null and qo.searchValue != '' ">
and s.stage =#{qo.searchValue}
</if>
-- 项目描述
<if test="qo.searchCode=='xmms' and qo.searchValue != null and qo.searchValue != '' ">
and sp.`spec` =#{qo.searchValue}
</if>
-- 负责人
<if test="qo.searchCode=='fzr' and qo.searchValue != null and qo.searchValue != '' ">
and s.assignedTo =#{qo.searchValue}
</if>
<if test="qo.searchCode=='jhwc' and qo.searchValue != null and qo.searchValue != '' ">
and s.plan_end_date ${qo.searchValue}
</if>
<if test="qo.searchCode=='sjks' and qo.searchValue != null and qo.searchValue != '' ">
and s.start_date ${qo.searchValue}
</if>
<if test="qo.searchCode=='sjwc' and qo.searchValue != null and qo.searchValue != '' ">
and s.end_date ${qo.searchValue}
</if>
<if test="qo.searchCode=='yscj' and qo.searchValue != null and qo.searchValue != '' ">
and s.openedBy = #{qo.searchValue}
</if>
<if test="qo.searchCode=='ysgb' and qo.searchValue != null and qo.searchValue != '' ">
and s.closedBy = #{qo.searchValue}
</if>
</if>
group by s.id
order by s.id desc
<choose>
<when test="qo.orderName != '' and qo.orderName != null ">
<choose>
<when test="qo.orderSort != '' and qo.orderSort != null ">
order by s.${qo.orderName} ${qo.orderSort}
</when>
<otherwise>
order by s.id desc
</otherwise>
</choose>
</when>
<otherwise>
order by s.id desc
</otherwise>
</choose>
</select>
<select id="getPrdById" resultType="com.sa.zentao.entity.ZtStory">
SELECT * from zt_story WHERE id = #{id}
</select>
<select id="allStoryPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
select s.*,sp.spec ,sp.verify,sp.files from zt_story s left join zt_storyspec sp on s.id = sp.story
left join zt_storyreview v on s.id = v.story and s.version = v.version
WHERE 1=1
<if test="qo.project != null ">
and ps.project =#{qo.project}
</if>
<if test="qo.execution != null ">
and ps.execution =#{qo.execution}
</if>
<if test="qo.module != null ">
and s.module =#{qo.module}
</if>
<if test="qo.searchVal != null and qo.searchVal == 'ALL' ">
</if>
<if test="qo.searchVal != null and qo.searchVal == 'WGB' ">
and s.status !='closed'
</if>
<if test="qo.searchVal != null and qo.searchVal == 'ZGW' ">
and s.assignedTo = #{qo.userName}
</if>
<if test="qo.searchVal != null and qo.searchVal == 'INDEX' ">
<if test="qo.userName != null and qo.userName != '' ">
and s.assignedTo = #{qo.userName}
or s.openedBy = #{qo.userName}
</if>
</if>
<if test="qo.searchVal != null and qo.searchVal == 'WCJ' ">
and s.openedBy = #{qo.userName}
</if>
<if test="qo.searchVal != null and qo.searchVal == 'YWPS' ">
and v.reviewer = #{qo.userName}
and s.status ='reviewing'
and v.result = ''
</if>
<if test="qo.searchVal == 'JH' ">
and s.status = 'active'
</if>
<if test="qo.searchVal == 'YGB' ">
and s.status = 'closed'
</if>
<if test="qo.searchVal == 'DGB' ">
and s.stage = 'verified'
and s.ys_flag =1
</if>
<if test="qo.searchVal == 'BGZ' ">
and s.status = '11'
</if>
<if test="qo.searchVal == 'WZP' ">
and s.status = '11'
</if>
<if test="qo.searchVal == 'WPS' ">
and s.reviewedBy like concat('%', #{qo.userName}, '%')
</if>
<if test="qo.searchVal == 'PSZ' ">
and s.status = 'reviewing'
</if>
<if test="qo.searchVal == 'DYS' ">
and s.stage = 'verified'
and s.ys_flag =0
</if>
<if test="qo.searchVal != null and qo.searchVal == 'YWGB' ">
and s.status ='closed'
and closedBy =#{qo.userName}
</if>
group by s.id
<choose>
<when test="qo.orderName != '' and qo.orderName != null ">
<choose>
<when test="qo.orderSort != '' and qo.orderSort != null ">
order by s.${qo.orderName} ${qo.orderSort}
</when>
<otherwise>
order by s.id desc
</otherwise>
</choose>
</when>
<otherwise>
order by s.id desc
</otherwise>
</choose>
</select>
<select id="myStoryPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
select s.*,sp.spec ,sp.verify,sp.files from zt_story s left join zt_storyspec sp on s.id = sp.story
left join zt_storyreview v on s.id = v.story and s.version = v.version
WHERE 1=1
<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>
<if test="qo.project != null ">
and ps.project =#{qo.project}
</if>
<if test="qo.execution != null ">
and ps.execution =#{qo.execution}
</if>
<if test="qo.module != null ">
and s.module =#{qo.module}
</if>
<if test="qo.searchVal != null and qo.searchVal == 'ALL' ">
</if>
<if test="qo.searchVal != null and qo.searchVal == 'WGB' ">
and s.status !='closed'
</if>
<if test="qo.searchVal != null and qo.searchVal == 'ZGW' ">
and s.assignedTo = #{qo.userName}
</if>
<if test="qo.searchVal != null and qo.searchVal == 'INDEX' ">
<if test="qo.userName != null and qo.userName != '' ">
and s.assignedTo = #{qo.userName}
or s.openedBy = #{qo.userName}
</if>
</if>
<if test="qo.searchVal != null and qo.searchVal == 'WCJ' ">
and s.openedBy = #{qo.userName}
</if>
<if test="qo.searchVal != null and qo.searchVal == 'YWPS' ">
and v.reviewer = #{qo.userName}
and s.status ='reviewing'
and v.result = ''
</if>
<if test="qo.searchVal == 'JH' ">
and s.status = 'active'
</if>
<if test="qo.searchVal == 'YGB' ">
and s.status = 'closed'
</if>
<if test="qo.searchVal == 'DGB' ">
and s.stage = 'verified'
and s.ys_flag =1
</if>
<if test="qo.searchVal == 'BGZ' ">
and s.status = '11'
</if>
<if test="qo.searchVal == 'WZP' ">
and s.status = '11'
</if>
<if test="qo.searchVal == 'WPS' ">
and s.reviewedBy like concat('%', #{qo.userName}, '%')
</if>
<if test="qo.searchVal == 'PSZ' ">
and s.status = 'reviewing'
</if>
<if test="qo.searchVal == 'DYS' ">
and s.stage = 'verified'
and s.ys_flag =0
</if>
<if test="qo.searchVal != null and qo.searchVal == 'YWGB' ">
and s.status ='closed'
and closedBy =#{qo.userName}
</if>
group by s.id
<choose>
<when test="qo.orderName != '' and qo.orderName != null ">
<choose>
<when test="qo.orderSort != '' and qo.orderSort != null ">
order by s.${qo.orderName} ${qo.orderSort}
</when>
<otherwise>
order by s.id desc
</otherwise>
</choose>
</when>
<otherwise>
order by s.id desc
</otherwise>
</choose>
</select>
<select id="storyPageListByIds" resultType="com.sa.zentao.dao.ZtStoryDTO">
select s.*,sp.spec ,sp.verify,sp.files from zt_story s left join zt_storyspec sp on s.id = sp.story
left join zt_storyreview v on s.id = v.story and s.version = v.version
WHERE 1=1
<if test="ids != null and ids.size() > 0">
and s.id in
<foreach collection="ids" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
order by s.id desc
</select>
</mapper>

View File

@ -83,7 +83,12 @@
and s.openedby= #{qo.userName}
</if>
<if test="qo.id != null ">
and s.id = #{qo.id}
</if>
<if test="qo.title != null and qo.title != '' ">
and s.title = #{qo.title}
</if>
<if test="qo.searchVal == 'YGB' ">
and s.status = 'closed'
@ -95,6 +100,16 @@
<if test="qo.productId != null ">
and s.product = #{qo.productId}
</if>
<if test="qo.storyIds != null and qo.storyIds.size() > 0">
and s.id in
<foreach collection="qo.storyIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
order by s.id desc
</select>

View File

@ -9,5 +9,10 @@
<result column="verify" property="verify" />
<result column="files" property="files" />
</resultMap>
<select id="getPrdById" resultType="com.sa.zentao.entity.ZtStoryspec">
SELECT * from zt_storyspec WHERE story = #{id} ORDER BY version desc limit 1
</select>
</mapper>

View File

@ -61,12 +61,27 @@
select * from zt_task s
where 1= 1
<if test="qo.objIds != null and qo.objIds.size() > 0">
and s.id in
<foreach collection="qo.objIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="qo.searchVal == 'ALL' ">
</if>
<if test="qo.searchVal == 'WGB' ">
and s.status != 'closed'
</if>
<if test="qo.searchVal == 'DPS' ">
and s.status = 'reviewing'
</if>
<if test="qo.searchVal == 'ZPGW' ">
and s.assignedTo= #{qo.userName}
</if>
@ -74,6 +89,10 @@
and s.mailto like concat('%', #{qo.userName}, '%')
</if>
<if test="qo.searchVal == 'YWCJ' ">
and s.openedBy like concat('%', #{qo.userName}, '%')
</if>
<if test="qo.searchVal == 'YWZP' ">
and s.lastEditedBy = #{qo.userName}
</if>
@ -86,7 +105,106 @@
and s.execution =#{qo.execution}
</if>
order by id desc
<if test="qo.projectIds != null and qo.projectIds.size() > 0">
and s.execution in
<foreach collection="qo.projectIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="qo.searchCode != null and qo.searchCode != '' ">
-- //任务名称
<if test="qo.searchCode=='rwmc' and qo.searchValue != null and qo.searchValue != '' ">
and s.name like concat('%', #{qo.searchValue}, '%')
</if>
-- 项目id
<if test="qo.searchCode=='bh' and qo.searchValue != null and qo.searchValue != '' ">
and s.id =#{qo.searchValue}
</if>
-- 状态
<if test="qo.searchCode=='zt' and qo.searchValue != null and qo.searchValue != '' ">
and s.status =#{qo.searchValue}
</if>
-- 指派给
<if test="qo.searchCode=='zpg' and qo.searchValue != null and qo.searchValue != '' ">
and s.assignedTo =#{qo.searchValue}
</if>
-- 负责人
<if test="qo.searchCode=='yscj' and qo.searchValue != null and qo.searchValue != '' ">
and s.openedBy = #{qo.searchValue}
</if>
<if test="qo.searchCode=='ysgb' and qo.searchValue != null and qo.searchValue != '' ">
and s.closedBy = #{qo.searchValue}
</if>
<if test="qo.searchCode=='ysqx' and qo.searchValue != null and qo.searchValue != '' ">
and s.canceledBy = #{qo.searchValue}
</if>
<if test="qo.searchCode=='zhxg' and qo.searchValue != null and qo.searchValue != '' ">
and s.lastEditedBy = #{qo.searchValue}
</if>
<if test="qo.searchCode=='cjrq' and qo.searchValue != null and qo.searchValue != '' ">
and s.openedDate ${qo.searchValue}
</if>
<if test="qo.searchCode=='jzrq' and qo.searchValue != null and qo.searchValue != '' ">
and s.deadline ${qo.searchValue}
</if>
<if test="qo.searchCode=='yjks' and qo.searchValue != null and qo.searchValue != '' ">
and s.estStarted ${qo.searchValue}
</if>
<if test="qo.searchCode=='sjks' and qo.searchValue != null and qo.searchValue != '' ">
and s.realstarted ${qo.searchValue}
</if>
<if test="qo.searchCode=='sjwc' and qo.searchValue != null and qo.searchValue != '' ">
and s.lastEditedBy ${qo.searchValue}
</if>
<!-- <if test="qo.searchCode=='sjwc' and qo.searchValue != null and qo.searchValue != '' ">-->
<!-- and s.end_date <![CDATA[>=]]> #{qo.searchValue}-->
<!-- </if>-->
<!-- <if test="qo.searchCode=='yscj' and qo.searchValue != null and qo.searchValue != '' ">-->
<!-- and s.openedBy = #{qo.searchValue}-->
<!-- </if>-->
<!-- <if test="qo.searchCode=='ysgb' and qo.searchValue != null and qo.searchValue != '' ">-->
<!-- and s.closedBy = #{qo.searchValue}-->
<!-- </if>-->
</if>
<choose>
<when test="qo.orderName != '' and qo.orderName != null ">
<choose>
<when test="qo.orderSort != '' and qo.orderSort != null ">
order by s.${qo.orderName} ${qo.orderSort}
<choose>
<when test="qo.orderName == 'deadline' ">
,id ${qo.orderSort}
</when>
</choose>
</when>
<otherwise>
order by s.id desc
</otherwise>
</choose>
</when>
<otherwise>
order by s.id desc
</otherwise>
</choose>
</select>

View File

@ -51,10 +51,19 @@
SELECT * from zt_user WHERE 1=1
<if test="qo.account != null and qo.account != '' ">
and nickname =#{qo.account}
and nickname like concat('%', #{qo.account}, '%')
or account like concat('%', #{qo.account}, '%')
or pinyin like concat('%', #{qo.account}, '%')
</if>
order by id desc
</select>
<select id="listAll" resultType="com.sa.zentao.dao.ZtUserDTO">
SELECT * from zt_user WHERE 1=1
</select>
<select id="selectPrdByName" resultType="com.sa.zentao.entity.ZtUser">
SELECT * from zt_user WHERE 1=1 and account=#{name}
</select>
</mapper>