From 6fff9ddba2486cbc3ffb6cecf9beac5fcea63cae Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期三, 20 三月 2024 17:25:08 +0800
Subject: [PATCH] 修改党员双报到 列表积分不显示5
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoCommentDAO.java | 59 +++++++++++++++++++++++++----------------------------------
1 files changed, 25 insertions(+), 34 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoCommentDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoCommentDAO.java
index 1d726f7..c2f5533 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoCommentDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoCommentDAO.java
@@ -1,15 +1,15 @@
package com.panzhihua.service_community.dao;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
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.dtos.community.PageComActEasyPhotoCommentDTO;
-import com.panzhihua.common.model.dtos.partybuilding.PageComPbServiceTeamDTO;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoCommentVO;
import com.panzhihua.service_community.model.dos.ComActEasyPhotoCommentDO;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
/**
* @program: springcloud_k8s_panzhihuazhihuishequ
@@ -19,35 +19,26 @@
**/
@Mapper
public interface ComActEasyPhotoCommentDAO extends BaseMapper<ComActEasyPhotoCommentDO> {
- // @Select("<script> " +
-// " <where>" +
-// "<if test='nameCn != null and nameCn.trim() != ""'>" +
-// " </if> " +
-// "<if test='nameCn != null and nameCn.trim() != ""'>" +
-// " </if> " +
-// "<if test='nameCn != null and nameCn.trim() != ""'>" +
-// " </if> " +
-// " </where>" +
-// "</script>")
- @Select("select * from (" +
- "SELECT \n" +
- "m.id,\n" +
- "m.`comment`,\n" +
- "e.`name`,\n" +
- "e.`nick_name`,\n" +
- "e.image_url url,\n" +
- "m.create_at,\n" +
- "if(u1.id is null,0,1)haveSign,\n" +
- "COUNT(u.id)num\n" +
- "FROM\n" +
- "com_act_easy_photo_comment m \n" +
- "JOIN sys_user e on m.user_id=e.user_id\n" +
- "LEFT JOIN com_act_easy_photo_comment_user u on m.id=u.easy_photo_comment_id\n" +
- "LEFT JOIN com_act_easy_photo_comment_user u1 on m.id=u1.easy_photo_comment_id and u1.user_id=#{comActEasyPhotoCommentDTO.userId}\n" +
- "where m.easy_photo_id=#{comActEasyPhotoCommentDTO.id} " +
- "GROUP BY m.id\n" +
- " )t order by t.num desc")
- IPage<ComActEasyPhotoCommentVO> pageComActEasyPhotoComment(Page page, @Param("comActEasyPhotoCommentDTO") PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO);
-
+ // @Select("<script> " +
+ // " <where>" +
+ // "<if test='nameCn != null and nameCn.trim() != ""'>" +
+ // " </if> " +
+ // "<if test='nameCn != null and nameCn.trim() != ""'>" +
+ // " </if> " +
+ // "<if test='nameCn != null and nameCn.trim() != ""'>" +
+ // " </if> " +
+ // " </where>" +
+ // "</script>")
+ @Select("<script> " + "select * from (" + "SELECT \n" + "m.id,\n" + "m.`comment`,\n" + "e.`name`,\n"
+ + "e.`nick_name`,\n" + "e.image_url url,\n" + "m.create_at,\n"
+ + "<if test='comActEasyPhotoCommentDTO.userId != null'>" + " if(u1.id is null,0,1)haveSign,\n" + "</if> "
+ + "COUNT(u.id)num\n" + "FROM\n" + "com_act_easy_photo_comment m \n" + "JOIN sys_user e on m.user_id=e.user_id\n"
+ + "LEFT JOIN com_act_easy_photo_comment_user u on m.id=u.easy_photo_comment_id\n"
+ + "<if test='comActEasyPhotoCommentDTO.userId != null'>"
+ + " LEFT JOIN com_act_easy_photo_comment_user u1 on m.id=u1.easy_photo_comment_id and u1.user_id=#{comActEasyPhotoCommentDTO.userId}\n"
+ + "</if> " + "where m.easy_photo_id=#{comActEasyPhotoCommentDTO.id} " + "GROUP BY m.id\n"
+ + " )t order by t.num desc, t.create_at DESC </script>")
+ IPage<ComActEasyPhotoCommentVO> pageComActEasyPhotoComment(Page page,
+ @Param("comActEasyPhotoCommentDTO") PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO);
}
--
Gitblit v1.7.1