From 7b7c169b96b5d49cd4fca66e5efe4a8f85239b51 Mon Sep 17 00:00:00 2001
From: tangxiaobao <303826152@qq.com>
Date: 星期四, 09 九月 2021 18:18:22 +0800
Subject: [PATCH] 用户设置标签bug修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserFeedbackDAO.java |   78 ++++++++++++++-------------------------
 1 files changed, 28 insertions(+), 50 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserFeedbackDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserFeedbackDAO.java
index d1b58f1..79982b5 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserFeedbackDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserFeedbackDAO.java
@@ -1,14 +1,15 @@
 package com.panzhihua.service_user.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.user.PageFeedBackDTO;
 import com.panzhihua.common.model.vos.user.SysUserFeedbackVO;
 import com.panzhihua.service_user.model.dos.SysUserFeedbackDO;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
 
 /**
  * @program: springcloud_k8s_panzhihuazhihuishequ
@@ -18,55 +19,32 @@
  **/
 @Mapper
 public interface SysUserFeedbackDAO extends BaseMapper<SysUserFeedbackDO> {
-    //    @Select("<script> " +
-//            " <where>" +
-//            "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
-//            " </if> " +
-//            "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
-//            " </if> " +
-//            "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
-//            " </if> " +
-//            " </where>" +
-//            "</script>")
+    // @Select("<script> " +
+    // " <where>" +
+    // "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
+    // " </if> " +
+    // "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
+    // " </if> " +
+    // "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
+    // " </if> " +
+    // " </where>" +
+    // "</script>")
 
-    @Select("<script> " +
-            "select \n" +
-            "u.name,\n" +
-            "u.nick_name,\n" +
-            "f.id,\n" +
-            "u.phone,\n" +
-            "f.create_at,\n" +
-            "f.content,\n" +
-            "f.photo_path,\n" +
-            "c.name communityName\n" +
-            "from sys_user_feedback f\n" +
-            "join sys_user u on f.user_id=u.user_id\n" +
-            "<if test='pageFeedBackDTO.phone != null and pageFeedBackDTO.phone.trim() != &quot;&quot;'>" +
-            "and u.phone=#{pageFeedBackDTO.phone}\n" +
-            " </if> " +
-            "<if test='pageFeedBackDTO.name != null and pageFeedBackDTO.name.trim() != &quot;&quot;'>" +
-            "and u.name like concat('%',#{pageFeedBackDTO.name},'%')   \n" +
-            " </if> " +
-            "<if test='pageFeedBackDTO.nickName != null and pageFeedBackDTO.nickName.trim() != &quot;&quot;'>" +
-            "and u.nick_name=like concat('%',#{pageFeedBackDTO.nickName},'%') \n" +
-            " </if> " +
-            "join com_act c on u.community_id=c.community_id\n" +
-            "order by f.create_at desc\n" +
-            "</script>")
+    @Select("<script> " + "select \n" + "u.name,\n" + "u.nick_name,\n" + "f.id,\n" + "u.phone,\n" + "f.create_at,\n"
+        + "f.content,\n" + "f.photo_path,\n" + "c.name communityName\n" + "from sys_user_feedback f\n"
+        + "left join sys_user u on f.user_id=u.user_id\n" + "left join com_act c on u.community_id=c.community_id\n"
+        + "<where>" + "<if test='pageFeedBackDTO.phone != null and pageFeedBackDTO.phone.trim() != &quot;&quot;'>"
+        + "and u.phone like concat('%',#{pageFeedBackDTO.phone},'%') \n" + " </if> "
+        + "<if test='pageFeedBackDTO.name != null and pageFeedBackDTO.name.trim() != &quot;&quot;'>"
+        + "and u.name like concat('%',#{pageFeedBackDTO.name},'%')   \n" + " </if> "
+        + "<if test='pageFeedBackDTO.nickName != null and pageFeedBackDTO.nickName.trim() != &quot;&quot;'>"
+        + "and u.nick_name like concat('%',#{pageFeedBackDTO.nickName},'%') \n" + " </if> " + "</where> "
+        + "order by f.create_at desc\n" + "</script>")
     IPage<SysUserFeedbackVO> pageFeedback(Page page, @Param("pageFeedBackDTO") PageFeedBackDTO pageFeedBackDTO);
 
-    @Select("select \n" +
-            "u.name,\n" +
-            "u.nick_name,\n" +
-            "f.id,\n" +
-            "f.content,\n" +
-            "f.photo_path,\n" +
-            "u.phone,\n" +
-            "f.create_at,\n" +
-            "c.name communityName\n" +
-            "from sys_user_feedback f\n" +
-            "join sys_user u on f.user_id=u.user_id\n" +
-            "join com_act c on u.community_id=c.community_id\n" +
-            "where f.id=#{id}\n")
+    @Select("select \n" + "u.name,\n" + "u.nick_name,\n" + "f.id,\n" + "f.content,\n" + "f.photo_path,\n" + "u.phone,\n"
+        + "f.create_at,\n" + "c.name communityName\n" + "from sys_user_feedback f\n"
+        + "join sys_user u on f.user_id=u.user_id\n" + "join com_act c on u.community_id=c.community_id\n"
+        + "where f.id=#{id}\n")
     SysUserFeedbackVO detailFeedback(Long id);
 }

--
Gitblit v1.7.1