From d7ea73196c8eb7df71c20b4fdccbc1ef9eff96fe Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期二, 14 十二月 2021 16:14:06 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopGoodsDAO.java | 108 +++++++++++++++++++++++++----------------------------
1 files changed, 51 insertions(+), 57 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..b784743 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
@@ -1,21 +1,18 @@
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.shop.ComShopGoodsDTO;
+import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO;
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.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO;
import com.panzhihua.common.model.vos.shop.PageShopGoodsVO;
-import com.panzhihua.common.model.vos.shop.PageShopStoreVO;
import com.panzhihua.service_community.model.dos.ComShopGoodsDO;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
/**
* @auther lyq
@@ -25,61 +22,58 @@
@Mapper
public interface ComShopGoodsDAO extends BaseMapper<ComShopGoodsDO> {
- @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" +
- " <where>" +
- "<if test='pageComShopGoodsDTO.storeName != null and pageComShopGoodsDTO.storeName.trim() != ""'>" +
- "and css.name like concat('%',#{pageComShopGoodsDTO.storeName},'%') \n" +
- " </if> " +
- "<if test='pageComShopGoodsDTO.name != null and pageComShopGoodsDTO.name.trim() != ""'>" +
- "and c.name like concat('%',#{pageComShopGoodsDTO.name},'%') \n" +
- " </if> " +
- "<if test='pageComShopGoodsDTO.status != null'>" +
- "and c.status like concat('%',#{pageComShopGoodsDTO.status},'%') \n" +
- " </if> " +
- " </where>" +
- "</script>")
- IPage<PageShopGoodsVO> pageShopGoods(Page page, @Param("pageComShopGoodsDTO") PageComShopGoodsDTO pageComShopGoodsDTO);
+ @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"
+ + " left join com_shop_store css on c.store_id=css.id\n" + " <where>"
+ + " and c.delete_status = 1 and css.delete_status = 1 "
+ + "<if test='pageComShopGoodsDTO.storeName != null and pageComShopGoodsDTO.storeName.trim() != ""'>"
+ + "and css.name like concat('%',#{pageComShopGoodsDTO.storeName},'%') \n" + " </if> "
+ + "<if test='pageComShopGoodsDTO.name != null and pageComShopGoodsDTO.name.trim() != ""'>"
+ + "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);
/**
* 根据店铺id查询商品列表
- * @param page 分页参数
- * @param pageComShopStoreDTO 请求参数
- * @return 分页商品列表
+ *
+ * @param page
+ * 分页参数
+ * @param pageComShopStoreDTO
+ * 请求参数
+ * @return 分页商品列表
*/
- @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" +
- " where store_id = #{pageComShopStoreDTO.storeId} and delete_status = 1 and status = 1" +
- " order by sale desc,create_at desc "+
- "</script> ")
- IPage<ComShopGoodsVO> pageShopGoodsByStoreId(Page page, @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO);
+ @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"
+ + " where store_id = #{pageComShopStoreDTO.storeId} and delete_status = 1 and status = 1"
+ + " order by sale desc,create_at desc " + "</script> ")
+ IPage<ComShopGoodsVO> pageShopGoodsByStoreId(Page page,
+ @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO);
/**
* 分页查询商品列表
- * @param page 分页参数
- * @param comShopGoodsDTO 请求参数
- * @return 商品列表
+ *
+ * @param page
+ * 分页参数
+ * @param comShopGoodsDTO
+ * 请求参数
+ * @return 商品列表
*/
- @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" +
- "<if test='comShopGoodsDTO.name != null and comShopGoodsDTO.name !=""'>" +
- " AND csg.`name` like concat('%',#{comShopGoodsDTO.name},'%') " +
- " </if> " +
- "<if test='comShopGoodsDTO.storeId != null '>" +
- " AND csg.store_id = #{comShopGoodsDTO.storeId} " +
- " </if> " +
- "<if test='comShopGoodsDTO.status != null '>" +
- " AND csg.status = #{comShopGoodsDTO.status} " +
- " </if> " +
- "<if test='comShopGoodsDTO.deliveryType != null '>" +
- " AND csg.delivery_type = #{comShopGoodsDTO.deliveryType} " +
- " </if> " +
- " order by sale desc,create_at desc " +
- " </script>")
- IPage<ComShopGoodsVO> pageShopGoods(Page page, @Param("comShopGoodsDTO") ComShopGoodsDTO comShopGoodsDTO);
-
+ @Select("<script> "
+ + "select csg.id,csg.`name`,csg.store_id,csg.goods_pic,csg.images,csg.`status`,csg.sale,csg.original_price "
+ + ",csg.price,csg.unit,csg.`order`,csg.stock,csg.details,csg.delivery_type, csg.create_at "
+ + " from com_shop_goods as csg " + " left join com_shop_store as css on css.id = csg.store_id "
+ + " where 1=1 and csg.delete_status = 1 and css.`status` = 1"
+ + "<if test='comShopGoodsDTO.name != null and comShopGoodsDTO.name !=""'>"
+ + " 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} " + " </if> "
+ + "<if test='comShopGoodsDTO.status != null '>" + " AND csg.status = #{comShopGoodsDTO.status} " + " </if> "
+ + "<if test='comShopGoodsDTO.deliveryType != null '>"
+ + " AND csg.delivery_type = #{comShopGoodsDTO.deliveryType} " + " </if> "
+ + " order by sale desc,create_at desc " + " </script>")
+ IPage<ComShopGoodsVO> pageShopGoodByApps(Page page, @Param("comShopGoodsDTO") ComShopGoodsDTO comShopGoodsDTO);
}
--
Gitblit v1.7.1