From fd17f7e68a3a409ecbc4c468bc85a07439c3a477 Mon Sep 17 00:00:00 2001
From: fengjin <1435304038@qq.com>
Date: 星期二, 25 四月 2023 14:27:59 +0800
Subject: [PATCH] 修改三说会堂排序和返回情况
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMessageDAO.java | 120 +++++++++++++++++++++++++++---------------------------------
1 files changed, 54 insertions(+), 66 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMessageDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMessageDAO.java
index 557ea3d..1b9eec5 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMessageDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMessageDAO.java
@@ -10,7 +10,6 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO;
import com.panzhihua.common.model.vos.community.ComActMessageBackVO;
import com.panzhihua.common.model.vos.community.ComActMessageVO;
import com.panzhihua.common.model.vos.community.PageComActMessageVO;
@@ -21,69 +20,58 @@
@Mapper
public interface ComActMessageDAO extends BaseMapper<ComActMessageDO> {
- @Select("select * from com_pb_member_role where id=#{id}")
- PartyCommitteeVO selectPartyCommitteeById(@Param("id")Long id);
- @Select("select * from com_pb_service_team where id=#{id}")
- ComPbServiceTeamVO selectComPbServiceTeamById(@Param("id")Long id);
-
- @Select("select * from com_act_message_back where msg_id=#{id} order by create_at desc")
- List<ComActMessageBackVO> selectMsgBackList(@Param("id")Long id);
-
- @Select("<script>" +
- "select * from com_act_message " +
- " where " +
- " ((sendto_user_id in (select id from com_pb_member_role t1 where t1.phone=#{comActMessageVO.phone})) " +
- " or (sendto_user_id in (select id from com_pb_service_team t2 where t2.phone=#{comActMessageVO.phone})))" +
- "<if test='comActMessageVO.status != null'>" +
- " and status=#{comActMessageVO.status} \n" +
- " </if> " +
- " order by create_at desc"+
- "</script>")
- IPage<PageComActMessageVO> pageSendMeMessageApplets(Page page, @Param("comActMessageVO")ComActMessageVO comActMessageVO);
-
- @Select("select * from com_act_message where user_id=#{comActMessageVO.userId} order by create_at desc")
- IPage<PageComActMessageVO> pageMyMessageApplets(Page page, @Param("comActMessageVO")ComActMessageVO comActMessageVO);
- @Select("select * from com_act_message where sendto_user_id=#{comActMessageVO.sendtoUserId} and ispublic=1 order by create_at desc ")
- IPage<PageComActMessageVO> pageMessageByUserApplets(Page page, @Param("comActMessageVO")ComActMessageVO comActMessageVO);
-
- @Update("update com_act_message set ispublic=#{ispublic} where id=#{id}")
- void updatePublic(@Param("ispublic") Integer ispublic,@Param("id") Long id);
-
- @Select("<script> " +
- "SELECT t.id,t.msg_content,t.photo_pah,t.phone,t.sendto_user_id,t.sendto_user_name,t.status,t.ispublic," +
- "t.user_id,t.user_account,t.user_name,t.user_phone,t.community_id,t.create_at,t.type, u.phone as userAccount \n" +
- "FROM \n" +
- " com_act_message t LEFT JOIN sys_user u ON t.user_id = u.user_id " +
- " where t.community_id=#{comActMessageVO.communityId}\n" +
- "<if test='comActMessageVO.userAccount != null and comActMessageVO.userAccount.trim() != ""'>" +
- " and u.phone=#{comActMessageVO.userAccount} \n" +
- " </if> " +
- "<if test='comActMessageVO.userName != null and comActMessageVO.userName.trim() != ""'>" +
- " and t.user_name=#{comActMessageVO.userName} \n" +
- " </if> " +
- "<if test='comActMessageVO.userPhone != null and comActMessageVO.userPhone.trim() != ""'>" +
- " and t.user_phone=#{comActMessageVO.userPhone} \n" +
- " </if> " +
- "<if test='comActMessageVO.msgContent != null and comActMessageVO.msgContent.trim() != ""'>" +
- " and t.msg_content like concat('%',#{comActMessageVO.msgContent},'%') \n" +
- " </if> " +
- "<if test='comActMessageVO.status != null and comActMessageVO.status != 0'>" +
- " and t.`status`=#{comActMessageVO.status} \n" +
- " </if> " +
- "<if test='comActMessageVO.ispublic != null and comActMessageVO.ispublic != 0'>" +
- " and t.ispublic=#{comActMessageVO.ispublic} \n" +
- " </if> " +
- "<if test='comActMessageVO.sendtoUserName != null and comActMessageVO.sendtoUserName.trim() != ""'>" +
- " and t.sendto_user_name=#{comActMessageVO.sendtoUserName} \n" +
- " </if> " +
- "<if test='comActMessageVO.publishAtBegin != null '>" +
- "AND t.create_at BETWEEN #{comActMessageVO.publishAtBegin} \n" +
- "AND #{comActMessageVO.publishAtEnd} \n" +
- " </if> " +
- "<if test='comActMessageVO.type != null and comActMessageVO.type !=0'>" +
- " AND t.type=#{comActMessageVO.type} \n" +
- " </if> " +
- " order by create_at desc"+
- "</script>")
- IPage<PageComActMessageVO> pageMyCommunityMessageApplets(Page page, @Param("comActMessageVO")ComActMessageVO comActMessageVO);
+ @Select("select * from com_pb_member_role where id=#{id}")
+ PartyCommitteeVO selectPartyCommitteeById(@Param("id") Long id);
+
+ @Select("select * from com_pb_service_team where id=#{id}")
+ ComPbServiceTeamVO selectComPbServiceTeamById(@Param("id") Long id);
+
+ @Select("select * from com_act_message_back where msg_id=#{id} order by create_at desc")
+ List<ComActMessageBackVO> selectMsgBackList(@Param("id") Long id);
+
+ @Select("<script>" + "select * from com_act_message " + " where "
+ + " ((sendto_user_id in (select id from com_pb_member_role t1 where t1.phone=#{comActMessageVO.phone}) AND type = 2) "
+ + " or (sendto_user_id in (select id from com_pb_service_team t2 where t2.phone=#{comActMessageVO.phone}) AND type = 1) "
+ + " or (sendto_user_id in (select id from com_act_dpc t3 where t3.phone=#{comActMessageVO.phone}) AND type = 3)) "
+ + "<if test='comActMessageVO.status != null'>" + " and status=#{comActMessageVO.status} \n" + " </if> "
+ + " order by create_at desc" + "</script>")
+ IPage<PageComActMessageVO> pageSendMeMessageApplets(Page page,
+ @Param("comActMessageVO") ComActMessageVO comActMessageVO);
+
+ @Select("select * from com_act_message where user_id=#{comActMessageVO.userId} order by create_at desc")
+ IPage<PageComActMessageVO> pageMyMessageApplets(Page page,
+ @Param("comActMessageVO") ComActMessageVO comActMessageVO);
+
+ @Select("select * from com_act_message where sendto_user_id=#{comActMessageVO.sendtoUserId} and ispublic=1 order by create_at desc ")
+ IPage<PageComActMessageVO> pageMessageByUserApplets(Page page,
+ @Param("comActMessageVO") ComActMessageVO comActMessageVO);
+
+ @Update("update com_act_message set ispublic=#{ispublic} where id=#{id}")
+ void updatePublic(@Param("ispublic") Integer ispublic, @Param("id") Long id);
+
+ @Select("<script> "
+ + "SELECT t.id,t.msg_content,t.photo_pah,t.phone,t.sendto_user_id,t.sendto_user_name,t.status,t.ispublic,"
+ + "t.user_id,t.user_account,t.user_name,t.user_phone,t.community_id,t.create_at,t.type, u.phone as userAccount \n"
+ + "FROM \n" + " com_act_message t LEFT JOIN sys_user u ON t.user_id = u.user_id "
+ + " where t.community_id = ${comActMessageVO.communityId}\n"
+ + "<if test='comActMessageVO.userAccount != null and comActMessageVO.userAccount.trim() != ""'>"
+ + " and u.phone=#{comActMessageVO.userAccount} \n" + " </if> "
+ + "<if test='comActMessageVO.userName != null and comActMessageVO.userName.trim() != ""'>"
+ + " and t.user_name=#{comActMessageVO.userName} \n" + " </if> "
+ + "<if test='comActMessageVO.userPhone != null and comActMessageVO.userPhone.trim() != ""'>"
+ + " and t.user_phone=#{comActMessageVO.userPhone} \n" + " </if> "
+ + "<if test='comActMessageVO.msgContent != null and comActMessageVO.msgContent.trim() != ""'>"
+ + " and t.msg_content like concat('%',#{comActMessageVO.msgContent},'%') \n" + " </if> "
+ + "<if test='comActMessageVO.status != null and comActMessageVO.status != 0'>"
+ + " and t.`status`=#{comActMessageVO.status} \n" + " </if> "
+ + "<if test='comActMessageVO.ispublic != null and comActMessageVO.ispublic != 0'>"
+ + " and t.ispublic=#{comActMessageVO.ispublic} \n" + " </if> "
+ + "<if test='comActMessageVO.sendtoUserName != null and comActMessageVO.sendtoUserName.trim() != ""'>"
+ + " and t.sendto_user_name=#{comActMessageVO.sendtoUserName} \n" + " </if> "
+ + "<if test='comActMessageVO.publishAtBegin != null '>"
+ + "AND t.create_at BETWEEN #{comActMessageVO.publishAtBegin} \n" + "AND #{comActMessageVO.publishAtEnd} \n"
+ + " </if> " + "<if test='comActMessageVO.type != null and comActMessageVO.type !=0'>"
+ + " AND t.type=#{comActMessageVO.type} \n" + " </if> " + " order by create_at desc" + "</script>")
+ IPage<PageComActMessageVO> pageMyCommunityMessageApplets(Page page,
+ @Param("comActMessageVO") ComActMessageVO comActMessageVO);
}
--
Gitblit v1.7.1