Commit 3450ed1d by Ren Ping

消息模块开发

1 parent 15bc3632
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
/*/.classpath /*/.classpath
/*/.project /*/.project
/*/logs/ /*/logs/
/logs/
/*/.gitignore /*/.gitignore
dispatchSolution-*.json dispatchSolution-*.json
/project-order/src/main/resources/application-dev.yaml /project-order/src/main/resources/application-dev.yaml
......
...@@ -17,7 +17,7 @@ import javax.validation.Valid; ...@@ -17,7 +17,7 @@ import javax.validation.Valid;
import java.util.Objects; import java.util.Objects;
/** /**
* 消息相关接口 * 消息
* *
* @author RenPing * @author RenPing
* @date 2023/10/24 * @date 2023/10/24
......
...@@ -24,8 +24,16 @@ public interface MsgDao extends JpaRepository<MsgEntity, Long> { ...@@ -24,8 +24,16 @@ public interface MsgDao extends JpaRepository<MsgEntity, Long> {
" and IF(:#{#req.endDate} is not null, tt.create_time<:#{#req.endDate}, 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.keyWord} is not null, tt.content like concat('%',:#{#req.keyWord},'%'), 1=1)" +
"group by tt.cluster_id,tt.branch_id,tt.group_id" + "group by tt.cluster_id,tt.branch_id,tt.group_id" +
") t" ") t",
//, countProjection = "t.id" //用于分页计数 countQuery = "select count(t.cluster_id)" +
" from (" +
" select tt.cluster_id,tt.branch_id,tt.group_id,min(tt.create_time) create_time,min(r.is_read) is_read" +
" from zzz_msg tt join zzz_msg_receiver r on r.msg_id=tt.id and r.user_id=:#{#req.userId}" +
" 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)" +
"group by tt.cluster_id,tt.branch_id,tt.group_id" +
") t"
, nativeQuery = true // 开启原生sql , nativeQuery = true // 开启原生sql
) )
Page<Map<String, Objects>> getGroupList(@Param("req") MsgDTO.Request req, Pageable pageable); Page<Map<String, Objects>> getGroupList(@Param("req") MsgDTO.Request req, Pageable pageable);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!