From 47f5c7b039ad8f0b53e856b87a3459533beac9c9 Mon Sep 17 00:00:00 2001 From: cb <275647614@qq.com> Date: Tue, 24 Jun 2025 16:19:24 +0800 Subject: [PATCH] no message --- .../ghy/web/controller/goods/GoodsController.java | 2 +- .../ghy/customer/domain/CustomerSelection.java | 15 +++++++++++++++ .../mapper/customer/CustomerSelectionMapper.xml | 7 ++++++- .../src/main/java/com/ghy/goods/domain/Goods.java | 4 ++++ .../impl/DeptGoodsCategoryServiceImpl.java | 2 +- .../main/resources/mapper/goods/GoodsMapper.xml | 11 +++++++++-- 6 files changed, 36 insertions(+), 5 deletions(-) diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/goods/GoodsController.java b/ghy-admin/src/main/java/com/ghy/web/controller/goods/GoodsController.java index f5d1d241..1b4e96b2 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/goods/GoodsController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/goods/GoodsController.java @@ -219,7 +219,7 @@ public class GoodsController extends BaseController { startPage(); List list = goodsService.selectGoodsList(goods); - logger.info("传入的类目id汇总{},获取到的所有商品{}",goods.getDeptGoodsCategoryIds(),list); + logger.info("传入的类目id汇总{},传入的goods信息为{},获取到的所有商品{}",goods.getDeptGoodsCategoryIds(),goods,list); // 用于缓存店铺信息,避免重复查询 Map shopCache = new HashMap<>(); diff --git a/ghy-custom/src/main/java/com/ghy/customer/domain/CustomerSelection.java b/ghy-custom/src/main/java/com/ghy/customer/domain/CustomerSelection.java index 17e0da00..086d08b5 100644 --- a/ghy-custom/src/main/java/com/ghy/customer/domain/CustomerSelection.java +++ b/ghy-custom/src/main/java/com/ghy/customer/domain/CustomerSelection.java @@ -42,6 +42,10 @@ public class CustomerSelection extends BaseEntity @Excel(name = "选品类型 1.选取 2.屏蔽") private Long selectionType; + /** 类型 */ + @Excel(name = "类型") + private Integer type; + public List getDeptCategoryIds() { return deptCategoryIds; } @@ -105,6 +109,16 @@ public class CustomerSelection extends BaseEntity return selectionType; } + public void setType(Integer type) + { + this.type = type; + } + + public Integer getType() + { + return type; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -114,6 +128,7 @@ public class CustomerSelection extends BaseEntity .append("customerId", getCustomerId()) .append("deptCategoryId", getDeptCategoryId()) .append("selectionType", getSelectionType()) + .append("type", getType()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) diff --git a/ghy-custom/src/main/resources/mapper/customer/CustomerSelectionMapper.xml b/ghy-custom/src/main/resources/mapper/customer/CustomerSelectionMapper.xml index b389fa3e..e0dbb267 100644 --- a/ghy-custom/src/main/resources/mapper/customer/CustomerSelectionMapper.xml +++ b/ghy-custom/src/main/resources/mapper/customer/CustomerSelectionMapper.xml @@ -11,6 +11,7 @@ + @@ -19,7 +20,7 @@ - select id, work_id, dept_id, customer_id, dept_category_id, selection_type, create_by, create_time, update_by, update_time, remark from customer_selection + select id, work_id, dept_id, customer_id, dept_category_id, selection_type, type, create_by, create_time, update_by, update_time, remark from customer_selection @@ -46,6 +48,7 @@ customer_id, dept_category_id, selection_type, + type, create_by, create_time, update_by, @@ -58,6 +61,7 @@ #{customerId}, #{deptCategoryId}, #{selectionType}, + #{type}, #{createBy}, #{createTime}, #{updateBy}, @@ -74,6 +78,7 @@ customer_id = #{customerId}, dept_category_id = #{deptCategoryId}, selection_type = #{selectionType}, + type = #{type}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, diff --git a/ghy-goods/src/main/java/com/ghy/goods/domain/Goods.java b/ghy-goods/src/main/java/com/ghy/goods/domain/Goods.java index b8ea0395..bfda9bf4 100644 --- a/ghy-goods/src/main/java/com/ghy/goods/domain/Goods.java +++ b/ghy-goods/src/main/java/com/ghy/goods/domain/Goods.java @@ -109,5 +109,9 @@ public class Goods extends BaseEntity { /** 经度 */ private Double longitude; + /** 到店服务 1-到店服务 2-到店服务+配送 3-到店服务+上门 */ + @Excel(name = "到店服务") + private Integer storeService; + } diff --git a/ghy-goods/src/main/java/com/ghy/goods/service/impl/DeptGoodsCategoryServiceImpl.java b/ghy-goods/src/main/java/com/ghy/goods/service/impl/DeptGoodsCategoryServiceImpl.java index ca0bea2e..c05eda58 100644 --- a/ghy-goods/src/main/java/com/ghy/goods/service/impl/DeptGoodsCategoryServiceImpl.java +++ b/ghy-goods/src/main/java/com/ghy/goods/service/impl/DeptGoodsCategoryServiceImpl.java @@ -110,7 +110,7 @@ public class DeptGoodsCategoryServiceImpl implements DeptGoodsCategoryService { }else{ for (CustomerSelection customerSelection1 : customerSelections) { DeptGoodsCategory deptGoodsCategory1=deptGoodsCategoryMapper.selectOneByGoodsCategoryId(customerSelection1.getDeptCategoryId()); - if (customerSelection1.getSelectionType()==1&& Objects.equals(deptGoodsCategory.getType(), deptGoodsCategory1.getType())){ + if (customerSelection1.getSelectionType()==1){ goodsCategoryList.add(deptGoodsCategory1); } } diff --git a/ghy-goods/src/main/resources/mapper/goods/GoodsMapper.xml b/ghy-goods/src/main/resources/mapper/goods/GoodsMapper.xml index 6bbd52f0..3962d5ca 100644 --- a/ghy-goods/src/main/resources/mapper/goods/GoodsMapper.xml +++ b/ghy-goods/src/main/resources/mapper/goods/GoodsMapper.xml @@ -29,17 +29,18 @@ + SELECT goods_id, goods_code, dept_id, shop_id, shop_name, goods_name, goods_desc, warranty_period, serv_activity, goods_unit, expect_duration, goods_sort, worker_id, - dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark, area_desc, keyword,type + dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark, area_desc, keyword,type,store_service FROM goods SELECT DISTINCT g.goods_id, goods_code, dept_id, shop_id, shop_name, goods_name, goods_desc, goods_sort, worker_id, goods_unit, warranty_period, serv_activity, expect_duration, - dept_goods_category_id, goods_img_url, goods_video_url, status, g.create_by, g.create_time, g.remark, g.area_desc, g.keyword,g.type + dept_goods_category_id, goods_img_url, goods_video_url, status, g.create_by, g.create_time, g.remark, g.area_desc, g.keyword,g.type,g.store_service FROM goods g LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id @@ -62,6 +63,7 @@ update_by = #{updateBy}, area_desc = #{areaDesc}, type = #{type}, + store_service = #{storeService}, shop_id = #{shopId}, shop_name = #{shopName}, update_time = sysdate() @@ -97,6 +99,7 @@ area_desc, create_by, type, + store_service, create_time )values( #{goodsCode}, @@ -119,6 +122,7 @@ #{areaDesc}, #{createBy}, #{type}, + #{storeService}, sysdate() ) @@ -170,6 +174,9 @@ AND g.shop_id = #{shopId} + + AND g.store_service = #{storeService} + /* 默认生成时间排序 */ order by create_time