提交 4498ceb2 authored 作者: 林业通's avatar 林业通

开锁记录返回备注

上级 1c380238
......@@ -22,7 +22,7 @@ public interface OtherShDeviceRecordDao extends BaseMapper<ShDeviceRecordEntity>
@Select("<script>" +
"SELECT a.create_time createTime, a.action, IFNULL(b.user_name, a.id) userName FROM sh_device_record a LEFT JOIN sh_lock_user b ON a.user_id = b.user_id AND b.lock_id = #{params.deviceId} WHERE a.device_id = #{params.deviceId}" +
"SELECT a.create_time createTime, a.action, remark, IFNULL(b.user_name, a.id) userName FROM sh_device_record a LEFT JOIN sh_lock_user b ON a.user_id = b.user_id AND b.lock_id = #{params.deviceId} WHERE a.device_id = #{params.deviceId}" +
" <if test='params.time != null and params.time != \"\"' > "
+ " AND DATE_FORMAT(a.create_time, '%Y-%m') = #{params.time} "
+ " </if>"
......@@ -31,7 +31,7 @@ public interface OtherShDeviceRecordDao extends BaseMapper<ShDeviceRecordEntity>
List<Map<String, Object>> list(Page<Map<String, Object>> page, Map<String, Object> params);
@Select("<script>" +
"SELECT a.create_time createTime, a.action FROM sh_device_record a WHERE a.device_id = ${deviceId}" +
"SELECT a.create_time createTime, remark, a.action FROM sh_device_record a WHERE a.device_id = ${deviceId}" +
" <if test='start != null and start != \"\" and end != null and end != \"\"' > "
+ " and <![CDATA[ a.create_time >= #{start} and a.create_time <= #{end} ]]> "
+ " </if>"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论