Commit 77e30e61 by Ren Ping

fix:消息模块

1 parent e9c0347f
......@@ -21,7 +21,9 @@ public interface MsgDao extends JpaRepository<MsgEntity, Integer> {
" where IF(:#{#req.startDate} is not null, tt.create_time>=:#{#req.startDate}, 1=1)" +
" and IF(:#{#req.endDate} is not null, tt.create_time<:#{#req.endDate}, 1=1)" +
" and IF(:#{#req.keyWord} is not null, tt.content like concat('%',:#{#req.keyWord},'%'), 1=1)" +
" and IF(:#{#req.orgTreeValue} is not null, (tt.cluster_id=:#{#req.orgTreeValue} or tt.branch_id=:#{#req.orgTreeValue} or tt.group_id=:#{#req.orgTreeValue}), 1=1)" +
" and IF(:#{#req.clusterId} is not null, tt.cluster_id=:#{#req.clusterId}, 1=1)" +
" and IF(:#{#req.branchId} is not null, tt.branch_id=:#{#req.branchId}, 1=1)" +
" and IF(:#{#req.groupId} is not null, tt.group_id=:#{#req.groupId}, 1=1)" +
"group by tt.cluster_id,tt.branch_id,tt.group_id" +
") t",
countQuery = "select count(t.cluster_id)" +
......@@ -31,7 +33,9 @@ public interface MsgDao extends JpaRepository<MsgEntity, Integer> {
" where IF(:#{#req.startDate} is not null, tt.create_time>=:#{#req.startDate}, 1=1)" +
" and IF(:#{#req.endDate} is not null, tt.create_time<:#{#req.endDate}, 1=1)" +
" and IF(:#{#req.keyWord} is not null, tt.content like concat('%',:#{#req.keyWord},'%'), 1=1)" +
" and IF(:#{#req.orgTreeValue} is not null, (tt.cluster_id=:#{#req.orgTreeValue} or tt.branch_id=:#{#req.orgTreeValue} or tt.group_id=:#{#req.orgTreeValue}), 1=1)" +
" and IF(:#{#req.clusterId} is not null, tt.cluster_id=:#{#req.clusterId}, 1=1)" +
" and IF(:#{#req.branchId} is not null, tt.branch_id=:#{#req.branchId}, 1=1)" +
" and IF(:#{#req.groupId} is not null, tt.group_id=:#{#req.groupId}, 1=1)" +
"group by tt.cluster_id,tt.branch_id,tt.group_id" +
") t"
, nativeQuery = true // 开启原生sql
......
......@@ -56,7 +56,17 @@ public class MsgQuery {
private String keyWord;
/**
* 大区ID、部门ID、小组ID
* 大区ID(大区Id、分部Id、分组Id只需传一个)
*/
private String orgTreeValue;
private String clusterId;
/**
* 分部ID
*/
private String branchId;
/**
* 小组ID
*/
private String groupId;
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!