From 1de0a85c067ceb62413d0f458899dca41b8322d0 Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期四, 17 十一月 2022 17:07:26 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructOtherBuildDAO.java | 71 ++++++++++++++---------------------
1 files changed, 28 insertions(+), 43 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructOtherBuildDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructOtherBuildDAO.java
index f82280f..7f005bd 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructOtherBuildDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructOtherBuildDAO.java
@@ -1,15 +1,16 @@
package com.panzhihua.service_community.dao;
+import java.util.List;
+
+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.vos.community.ComMngStructOtherBuildVO;
import com.panzhihua.service_community.model.dos.ComMngStructOtherBuildDO;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-
-import java.util.List;
/**
* @program: springcloud_k8s_panzhihuazhihuishequ
@@ -20,44 +21,28 @@
@Mapper
public interface ComMngStructOtherBuildDAO extends BaseMapper<ComMngStructOtherBuildDO> {
- // @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 \n" +
- "b.id,\n" +
- "b.`name`,\n" +
- "t.name buileTypeName,\n" +
- "b.square,\n" +
- "b.address,\n" +
- "b.`state`,\n" +
- "b.layer_type,\n" +
- "b.create_at\n" +
- "FROM\n" +
- "com_mng_struct_other_build b \n" +
- "join com_mng_struct_build_type t on b.type_id=t.id\n" +
- " <where>" +
- "<if test='comMngStructOtherBuildVO.name != null and comMngStructOtherBuildVO.name.trim() != ""'>" +
- "b.name like concat(#{comMngStructOtherBuildVO.name},'%') "+
- " </if> " +
- " </where>" +
- "</script>")
- IPage<ComMngStructOtherBuildVO> pageOtherBuild(Page page, @Param("comMngStructOtherBuildVO") ComMngStructOtherBuildVO comMngStructOtherBuildVO);
+ // @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 \n" + "b.id,\n" + "b.`name`,\n" + "t.name buileTypeName,\n" + "b.square,\n"
+ + "b.address,\n" + "b.`state`,\n" + "b.layer_type,\n" + "b.create_at\n" + "FROM\n"
+ + "com_mng_struct_other_build b \n" + "join com_mng_struct_build_type t on b.type_id=t.id\n" + " <where>"
+ + "<if test='comMngStructOtherBuildVO.name != null and comMngStructOtherBuildVO.name.trim() != ""'>"
+ + " and b.name like concat(#{comMngStructOtherBuildVO.name},'%') " + " </if> "
+ + "<if test='comMngStructOtherBuildVO.communityId != null'>"
+ + " and b.community_id = ${comMngStructOtherBuildVO.communityId} " + " </if> " + " </where>"
+ + " order by b.create_at desc" + "</script>")
+ IPage<ComMngStructOtherBuildVO> pageOtherBuild(Page page,
+ @Param("comMngStructOtherBuildVO") ComMngStructOtherBuildVO comMngStructOtherBuildVO);
- @Select("SELECT\n" +
- "b.type_id \n" +
- "FROM\n" +
- "com_mng_struct_other_build b\n" +
- "WHERE\n" +
- "b.community_id = #{communityId}\n" +
- "GROUP BY\n" +
- "b.type_id")
+ @Select("SELECT\n" + "b.type_id \n" + "FROM\n" + "com_mng_struct_other_build b\n" + "WHERE\n"
+ + "b.community_id = ${communityId}\n" + "GROUP BY\n" + "b.type_id")
List<Long> selectAllBuildTypeIds(Long communityId);
}
--
Gitblit v1.7.1