Browse Source

根据项目ID/用户查询消息

master
zhizhi wu 5 years ago
parent
commit
20982602de
  1. 15
      tall/src/main/resources/mapper_dao/SysOperationDao.xml

15
tall/src/main/resources/mapper_dao/SysOperationDao.xml

@ -1,6 +1,6 @@
<?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.ccsens.tall.persist.dao.SysOperationDao"> <mapper namespace="com.ccsens.tall.persist.dao.SysOperationDao" xmlns:c="http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<resultMap id="MessageQuery" type="com.ccsens.tall.bean.vo.ProjectMessageVo$Query"> <resultMap id="MessageQuery" type="com.ccsens.tall.bean.vo.ProjectMessageVo$Query">
<result column="id" jdbcType="BIGINT" property="id"></result> <result column="id" jdbcType="BIGINT" property="id"></result>
@ -37,11 +37,14 @@
t_sys_message_send s, t_sys_operation o t_sys_message_send s, t_sys_operation o
WHERE WHERE
s.operation_id = o.id s.operation_id = o.id
AND s.receiver_id = #{userId} <choose>
<if test="param.projectId != null"> <when test="param.projectId != null">
AND o.project_id = #{param.projectId} AND o.project_id = #{param.projectId}
</if> </when>
<otherwise>
AND s.receiver_id = #{userId}
</otherwise>
</choose>
AND s.send_type = #{param.sendType} AND s.send_type = #{param.sendType}
AND s.rec_status = 0 AND s.rec_status = 0
AND o.rec_status = 0 AND o.rec_status = 0

Loading…
Cancel
Save