From 1349fda00a75a5cb6560c74ba9040ce138dd4883 Mon Sep 17 00:00:00 2001 From: wl <173@qq.com> Date: 星期一, 14 十一月 2022 10:56:27 +0800 Subject: [PATCH] 卡口管理调整 --- ycl-generator/src/main/resources/mapper/message/MessageColumnSetMapper.xml | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 51 insertions(+), 5 deletions(-) diff --git a/ycl-generator/src/main/resources/mapper/message/MessageColumnSetMapper.xml b/ycl-generator/src/main/resources/mapper/message/MessageColumnSetMapper.xml index 56c044b..089eb7d 100644 --- a/ycl-generator/src/main/resources/mapper/message/MessageColumnSetMapper.xml +++ b/ycl-generator/src/main/resources/mapper/message/MessageColumnSetMapper.xml @@ -4,15 +4,61 @@ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> <resultMap id="BaseResultMap" type="com.ycl.entity.message.MessageColumnSet"> - <id column="id" property="id" /> - <result column="user_id" property="userId" /> - <result column="message_column_id" property="messageColumnId" /> - <result column="is_receive" property="isReceive" /> + <id column="id" property="id"/> + <result column="user_id" property="userId"/> + <result column="message_column_id" property="messageColumnId"/> + <result column="is_receive" property="isReceive"/> </resultMap> <!-- 閫氱敤鏌ヨ缁撴灉鍒� --> <sql id="Base_Column_List"> - id, user_id, message_column_id, is_receive + id + , user_id, message_column_id, is_receive </sql> + <select id="selectMessagePage" parameterType="com.ycl.dto.message.MessageParam" + resultType="com.ycl.vo.message.MessageVO"> + SELECT + t1.id, + t2.username as targetFrom, + t3.column_name as messageTypeName, + t1.`status`, + t1.body, + t1.send_time, + t1.create_time, + t1.respond_result, + t1.head, + t4.username as createUser + FROM + `ums_message` t1 + LEFT JOIN ums_admin t2 ON t1.target_from = t2.id + left join ums_admin t4 on t1.create_user = t4.id + LEFT JOIN ums_message_column t3 ON t3.id = t1.message_type + <where> + <if test="messageParam.head !=null and messageParam.head !=''"> + t1.head like concat('%',#{messageParam.head},'%') + </if> + <if test="messageParam.channelCode !='' and messageParam.channelCode != null"> + and t1.channel_code=#{messageParam.channelCode} + </if> + <if test="messageParam.messageType != null"> + and t1.message_type=#{messageParam.messageType} + </if> + <if test="messageParam.startTime != null and messageParam.startTime != '' and messageParam.endTime != null and messageParam.endTime != '' "> + and t1.create_time between #{messageParam.startTime} and #{messageParam.endTime} + </if> + <if test="messageParam.status != null"> + and t1.status=#{messageParam.status} + </if> + <if test="messageParam.respondResult !=null and messageParam.respondResult !='' "> + and t1.respond_result={messageParam.respondResult} + </if> + <if test="messageParam.sort==1"> + ORDER BY t1.create_time desc + </if> + <if test="messageParam.sort==0"> + ORDER BY t1.create_time asc + </if> + </where> + </select> </mapper> -- Gitblit v1.8.0