From 970ed0f8df6a19e4e3dae062c4e2e2232a0b97d0 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期三, 21 四月 2021 11:06:45 +0800
Subject: [PATCH] 删除商家bug修复

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopGoodsDAO.java |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopGoodsDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopGoodsDAO.java
index e4c3c05..91ba70e 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopGoodsDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopGoodsDAO.java
@@ -6,7 +6,7 @@
 import com.panzhihua.common.model.dtos.shop.ComShopGoodsDTO;
 import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO;
 import com.panzhihua.common.model.vos.shop.ComShopGoodsVO;
-import com.panzhihua.common.model.vos.shop.ComShopStoreVO;
+import com.panzhihua.common.model.vos.shop.PageShopStoreVO;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO;
@@ -27,18 +27,23 @@
 
     @Select("<script>" +
             "select c.id,c.type_id,css.name as storeName,c.name,c.store_id,c.goods_pic,c.images,c.status,c.sale,c.original_price,c.price,c.unit,c.order,c.stock,c.details,c.remark,c.goods_describe,c.delivery_type,c.delete_status,c.create_at,c.update_at from com_shop_goods c \n" +
-            "right join com_shop_store css on c.store_id=css.id\n" +
+            " left join com_shop_store css on c.store_id=css.id\n" +
             " <where>" +
+            " and c.delete_status = 1 " +
             "<if test='pageComShopGoodsDTO.storeName != null and pageComShopGoodsDTO.storeName.trim() != &quot;&quot;'>" +
             "and css.name like concat('%',#{pageComShopGoodsDTO.storeName},'%') \n" +
             " </if> " +
             "<if test='pageComShopGoodsDTO.name != null and pageComShopGoodsDTO.name.trim() != &quot;&quot;'>" +
             "and c.name like concat('%',#{pageComShopGoodsDTO.name},'%') \n" +
             " </if> " +
+            "<if test='pageComShopGoodsDTO.storeId != null'>" +
+            "and css.id=#{pageComShopGoodsDTO.storeId} \n" +
+            " </if> " +
             "<if test='pageComShopGoodsDTO.status != null'>" +
             "and c.status like concat('%',#{pageComShopGoodsDTO.status},'%') \n" +
             " </if> " +
             " </where>" +
+            " order by c.create_at desc" +
             "</script>")
     IPage<PageShopGoodsVO> pageShopGoods(Page page, @Param("pageComShopGoodsDTO")  PageComShopGoodsDTO pageComShopGoodsDTO);
 
@@ -64,10 +69,14 @@
      */
     @Select("<script> " +
             "select id,`name`,store_id,goods_pic,images,`status`,sale,original_price,price,unit" +
-            ",`order`,stock,details,delivery_type from com_shop_goods as csg " +
-            " where 1=1  and csg.delete_status = 1 and csg.status = 1" +
+            ",`order`,stock,details,delivery_type, create_at " +
+            " from com_shop_goods as csg " +
+            " where 1=1  and csg.delete_status = 1 " +
             "<if test='comShopGoodsDTO.name != null and comShopGoodsDTO.name !=&quot;&quot;'>" +
             " AND csg.`name` like concat('%',#{comShopGoodsDTO.name},'%') " +
+            " </if> " +
+            "<if test='comShopGoodsDTO.status != null '>" +
+            " AND csg.`status` = #{comShopGoodsDTO.status}" +
             " </if> " +
             "<if test='comShopGoodsDTO.storeId != null '>" +
             " AND csg.store_id = #{comShopGoodsDTO.storeId} " +
@@ -80,6 +89,6 @@
             " </if> " +
             " order by sale desc,create_at desc " +
             " </script>")
-    IPage<ComShopGoodsVO> pageShopGoods(Page page, @Param("comShopGoodsDTO") ComShopGoodsDTO comShopGoodsDTO);
+    IPage<ComShopGoodsVO> pageShopGoodByApps(Page page, @Param("comShopGoodsDTO") ComShopGoodsDTO comShopGoodsDTO);
 
 }

--
Gitblit v1.7.1