From 2e64c232ab6b51b2cecf1ee96e1e9b709234f326 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期六, 21 八月 2021 16:35:14 +0800
Subject: [PATCH] 随手拍改版接口开发

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopStoreDAO.java |   64 ++++++++++++++++++++++++++++++-
 1 files changed, 61 insertions(+), 3 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopStoreDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopStoreDAO.java
index b21f2d9..58b916b 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopStoreDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopStoreDAO.java
@@ -4,7 +4,7 @@
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO;
-import com.panzhihua.common.model.vos.shop.ComShopStoreVO;
+import com.panzhihua.common.model.vos.shop.PageShopStoreVO;
 import com.panzhihua.service_community.model.dos.ComShopStoreDO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -18,7 +18,65 @@
 @Mapper
 public interface ComShopStoreDAO extends BaseMapper<ComShopStoreDO> {
 
-    @Select("select id,`name`,classify_id,logo,phone,delivery_type,remark,`status`,sale,sale_volume,store_detail from com_shop_store")
-    IPage<ComShopStoreVO> pageShopStore(Page page, @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO);
+    @Select("<script>" +
+            "select id,`name`,store_password,contacts,store_account,classify_id,logo,phone,delivery_type,remark,`status`," +
+            "sale,sale_volume,store_detail,create_at, store_describe from com_shop_store c" +
+            " <where>" +
+            "c.delete_status=1 and c.status = 1" +
+            "<if test='pageComShopStoreDTO.contacts != null and pageComShopStoreDTO.contacts.trim() != &quot;&quot;'>" +
+            "and c.contacts like concat('%',#{pageComShopStoreDTO.contacts},'%') \n" +
+            " </if> " +
+            "<if test='pageComShopStoreDTO.account != null and pageComShopStoreDTO.account.trim() != &quot;&quot;'>" +
+            "and c.store_account = #{pageComShopStoreDTO.account} \n" +
+            " </if> " +
+            "<if test='pageComShopStoreDTO.name != null and pageComShopStoreDTO.name.trim() != &quot;&quot;'>" +
+            "and c.`name` like concat('%',#{pageComShopStoreDTO.name},'%') \n" +
+            " </if> " +
+            "<if test='pageComShopStoreDTO.deliveryType != null'>" +
+            "and c.delivery_type =#{pageComShopStoreDTO.deliveryType}\n" +
+            " </if> " +
+            "<if test='pageComShopStoreDTO.status != null'>" +
+            "and c.status =#{pageComShopStoreDTO.status} \n" +
+            " </if> " +
+            " </where>" +
+            " order by c.create_at desc" +
+            "</script>")
+    IPage<PageShopStoreVO> pageShopStore(Page page, @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO);
 
+    @Select("<script>" +
+            "select id,`name`,store_password,contacts,store_account,classify_id,logo,phone,delivery_type,remark,`status`," +
+            "sale,sale_volume,store_detail,create_at,store_describe from com_shop_store c" +
+            " <where>" +
+            " and c.delete_status=1 " +
+            "<if test='pageComShopStoreDTO.contacts != null and pageComShopStoreDTO.contacts.trim() != &quot;&quot;'>" +
+            "and c.contacts like concat('%',#{pageComShopStoreDTO.contacts},'%') \n" +
+            " </if> " +
+            "<if test='pageComShopStoreDTO.account != null and pageComShopStoreDTO.account.trim() != &quot;&quot;'>" +
+            "and c.store_account = #{pageComShopStoreDTO.account} \n" +
+            " </if> " +
+            "<if test='pageComShopStoreDTO.name != null and pageComShopStoreDTO.name.trim() != &quot;&quot;'>" +
+            "and c.`name` like concat('%',#{pageComShopStoreDTO.name},'%') \n" +
+            " </if> " +
+            "<if test='pageComShopStoreDTO.deliveryType != null'>" +
+            "and c.delivery_type =#{pageComShopStoreDTO.deliveryType}\n" +
+            " </if> " +
+            "<if test='pageComShopStoreDTO.status != null'>" +
+            "and c.status =#{pageComShopStoreDTO.status} \n" +
+            " </if> " +
+            " </where>" +
+            " order by c.create_at desc" +
+            "</script>")
+    IPage<PageShopStoreVO> pageShopStoreByAdmin(Page page, @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO);
+
+    @Select("delete from sys_user where user_id = #{sysUserId}")
+    void deleteSysUserBySysUserId(@Param("sysUserId") Long sysUserId);
+
+    @Select("delete from sys_role where role_key = #{account}")
+    void deleteSysRoleByAccount(@Param("account") String account);
+
+    @Select("select count(user_id) from sys_user where phone=#{phone}")
+    int reasonableUserByPhone(@Param("phone") String phone);
+
+    @Select("select count(user_id) from sys_user where account=#{account} and type=5 ")
+    int reasonableUserByAccount(@Param("account") String account);
 }

--
Gitblit v1.7.1