|
@@ -1,7 +1,7 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.jeeplus.modules.workprojectnotify.dao.WorkProjectNotifyDao">
|
|
<mapper namespace="com.jeeplus.modules.workprojectnotify.dao.WorkProjectNotifyDao">
|
|
-
|
|
|
|
|
|
+
|
|
<sql id="workProjectNotifyColumns">
|
|
<sql id="workProjectNotifyColumns">
|
|
a.id AS "id",
|
|
a.id AS "id",
|
|
a.create_by AS "createBy.id",
|
|
a.create_by AS "createBy.id",
|
|
@@ -21,10 +21,10 @@
|
|
a.kind AS "kind",
|
|
a.kind AS "kind",
|
|
a.officeId AS "officeId"
|
|
a.officeId AS "officeId"
|
|
</sql>
|
|
</sql>
|
|
-
|
|
|
|
|
|
+
|
|
<sql id="workProjectNotifyJoins">
|
|
<sql id="workProjectNotifyJoins">
|
|
</sql>
|
|
</sql>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="getByWorkBidingDocument" parameterType="string" resultType="WorkProjectNotify">
|
|
<select id="getByWorkBidingDocument" parameterType="string" resultType="WorkProjectNotify">
|
|
SELECT
|
|
SELECT
|
|
<include refid="workProjectNotifyColumns"/>
|
|
<include refid="workProjectNotifyColumns"/>
|
|
@@ -42,7 +42,7 @@
|
|
|
|
|
|
|
|
|
|
<select id="get" resultType="WorkProjectNotify" >
|
|
<select id="get" resultType="WorkProjectNotify" >
|
|
- SELECT
|
|
|
|
|
|
+ SELECT
|
|
<include refid="workProjectNotifyColumns"/>
|
|
<include refid="workProjectNotifyColumns"/>
|
|
,a.process_instance_id as "processInstanceId"
|
|
,a.process_instance_id as "processInstanceId"
|
|
FROM work_project_notify a
|
|
FROM work_project_notify a
|
|
@@ -63,11 +63,13 @@
|
|
<include refid="workProjectNotifyJoins"/>
|
|
<include refid="workProjectNotifyJoins"/>
|
|
WHERE a.notify_id = #{notifyId} AND a.notify_user = #{notifyUserId}
|
|
WHERE a.notify_id = #{notifyId} AND a.notify_user = #{notifyUserId}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="findList" resultType="WorkProjectNotify" >
|
|
<select id="findList" resultType="WorkProjectNotify" >
|
|
- SELECT
|
|
|
|
|
|
+ SELECT
|
|
<include refid="workProjectNotifyColumns"/>
|
|
<include refid="workProjectNotifyColumns"/>
|
|
FROM work_project_notify a
|
|
FROM work_project_notify a
|
|
|
|
+ left join sys_user su on a.create_by = su.id
|
|
|
|
+ LEFT JOIN sys_user u ON u.id = a.create_by
|
|
<include refid="workProjectNotifyJoins"/>
|
|
<include refid="workProjectNotifyJoins"/>
|
|
<where>
|
|
<where>
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
@@ -108,6 +110,9 @@
|
|
<if test="endDate != null and endDate != ''">
|
|
<if test="endDate != null and endDate != ''">
|
|
AND a.create_date <= #{endDate}
|
|
AND a.create_date <= #{endDate}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="(createUserId != null and createUserId != '') or (createUserName != null and createUserName != '')">
|
|
|
|
+ AND (a.create_by = #{createUserId} or su.name like concat('%',#{createUserName},'%'))
|
|
|
|
+ </if>
|
|
<choose>
|
|
<choose>
|
|
<when test="status !=null and status != '' and status == '-1'">
|
|
<when test="status !=null and status != '' and status == '-1'">
|
|
</when>
|
|
</when>
|
|
@@ -140,9 +145,8 @@
|
|
<select id="queryCount" resultType="Integer" >
|
|
<select id="queryCount" resultType="Integer" >
|
|
SELECT count(1)
|
|
SELECT count(1)
|
|
FROM work_project_notify a
|
|
FROM work_project_notify a
|
|
- <if test="userName != null and userName != ''">
|
|
|
|
- LEFT JOIN sys_user u ON u.id = a.create_by
|
|
|
|
- </if>
|
|
|
|
|
|
+ LEFT JOIN sys_user u ON u.id = a.create_by
|
|
|
|
+ LEFT JOIN sys_user su ON su.id = a.create_by
|
|
<where>
|
|
<where>
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
<if test="title != null and title != ''">
|
|
<if test="title != null and title != ''">
|
|
@@ -182,6 +186,9 @@
|
|
<if test="endDate != null and endDate != ''">
|
|
<if test="endDate != null and endDate != ''">
|
|
AND a.create_date <= #{endDate}
|
|
AND a.create_date <= #{endDate}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="(createUserId != null and createUserId != '') or (createUserName != null and createUserName != '')">
|
|
|
|
+ AND (a.create_by = #{createUserId} or su.name like concat('%',#{createUserName},'%'))
|
|
|
|
+ </if>
|
|
<choose>
|
|
<choose>
|
|
<when test="status !=null and status != '' and status == '-1'">
|
|
<when test="status !=null and status != '' and status == '-1'">
|
|
</when>
|
|
</when>
|
|
@@ -297,13 +304,13 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="findAllList" resultType="WorkProjectNotify" >
|
|
<select id="findAllList" resultType="WorkProjectNotify" >
|
|
- SELECT
|
|
|
|
|
|
+ SELECT
|
|
<include refid="workProjectNotifyColumns"/>
|
|
<include refid="workProjectNotifyColumns"/>
|
|
FROM work_project_notify a
|
|
FROM work_project_notify a
|
|
<include refid="workProjectNotifyJoins"/>
|
|
<include refid="workProjectNotifyJoins"/>
|
|
<where>
|
|
<where>
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
- </where>
|
|
|
|
|
|
+ </where>
|
|
<choose>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
ORDER BY ${page.orderBy}
|
|
ORDER BY ${page.orderBy}
|
|
@@ -313,7 +320,7 @@
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insert">
|
|
<insert id="insert">
|
|
INSERT INTO work_project_notify(
|
|
INSERT INTO work_project_notify(
|
|
id,
|
|
id,
|
|
@@ -355,7 +362,7 @@
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="update">
|
|
<update id="update">
|
|
- UPDATE work_project_notify SET
|
|
|
|
|
|
+ UPDATE work_project_notify SET
|
|
update_by = #{updateBy.id}
|
|
update_by = #{updateBy.id}
|
|
,update_date = #{updateDate}
|
|
,update_date = #{updateDate}
|
|
,remarks = #{remarks}
|
|
,remarks = #{remarks}
|
|
@@ -417,21 +424,21 @@
|
|
status = #{status}
|
|
status = #{status}
|
|
WHERE notify_id = #{notifyId} AND status != '1'
|
|
WHERE notify_id = #{notifyId} AND status != '1'
|
|
</update>
|
|
</update>
|
|
-
|
|
|
|
|
|
+
|
|
<!--物理删除-->
|
|
<!--物理删除-->
|
|
<update id="delete">
|
|
<update id="delete">
|
|
DELETE FROM work_project_notify
|
|
DELETE FROM work_project_notify
|
|
WHERE id = #{id}
|
|
WHERE id = #{id}
|
|
</update>
|
|
</update>
|
|
-
|
|
|
|
|
|
+
|
|
<!--逻辑删除-->
|
|
<!--逻辑删除-->
|
|
<update id="deleteByLogic">
|
|
<update id="deleteByLogic">
|
|
- UPDATE work_project_notify SET
|
|
|
|
|
|
+ UPDATE work_project_notify SET
|
|
del_flag = #{DEL_FLAG_DELETE}
|
|
del_flag = #{DEL_FLAG_DELETE}
|
|
WHERE id = #{id}
|
|
WHERE id = #{id}
|
|
</update>
|
|
</update>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
|
|
<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
|
|
<select id="findUniqueByProperty" resultType="WorkProjectNotify" statementType="STATEMENT">
|
|
<select id="findUniqueByProperty" resultType="WorkProjectNotify" statementType="STATEMENT">
|
|
select * FROM work_project_notify where ${propertyName} = '${value}'
|
|
select * FROM work_project_notify where ${propertyName} = '${value}'
|
|
@@ -685,5 +692,5 @@
|
|
status = 2
|
|
status = 2
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</update>
|
|
</update>
|
|
-
|
|
|
|
-</mapper>
|
|
|
|
|
|
+
|
|
|
|
+</mapper>
|