no message

This commit is contained in:
cb 2025-06-24 16:19:24 +08:00
parent 704454a759
commit 47f5c7b039
6 changed files with 36 additions and 5 deletions

View File

@ -219,7 +219,7 @@ public class GoodsController extends BaseController {
startPage();
List<Goods> list = goodsService.selectGoodsList(goods);
logger.info("传入的类目id汇总{},获取到的所有商品{}",goods.getDeptGoodsCategoryIds(),list);
logger.info("传入的类目id汇总{},传入的goods信息为{},获取到的所有商品{}",goods.getDeptGoodsCategoryIds(),goods,list);
// 用于缓存店铺信息避免重复查询
Map<Long, Shop> shopCache = new HashMap<>();

View File

@ -42,6 +42,10 @@ public class CustomerSelection extends BaseEntity
@Excel(name = "选品类型 1.选取 2.屏蔽")
private Long selectionType;
/** 类型 */
@Excel(name = "类型")
private Integer type;
public List<Long> 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())

View File

@ -11,6 +11,7 @@
<result property="customerId" column="customer_id" />
<result property="deptCategoryId" column="dept_category_id" />
<result property="selectionType" column="selection_type" />
<result property="type" column="type" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
@ -19,7 +20,7 @@
</resultMap>
<sql id="selectCustomerSelectionVo">
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
</sql>
<select id="selectCustomerSelectionList" parameterType="CustomerSelection" resultMap="CustomerSelectionResult">
@ -30,6 +31,7 @@
<if test="customerId != null "> and customer_id = #{customerId}</if>
<if test="deptCategoryId != null "> and dept_category_id = #{deptCategoryId}</if>
<if test="selectionType != null "> and selection_type = #{selectionType}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
</where>
</select>
@ -46,6 +48,7 @@
<if test="customerId != null">customer_id,</if>
<if test="deptCategoryId != null">dept_category_id,</if>
<if test="selectionType != null">selection_type,</if>
<if test="type != null">type,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
@ -58,6 +61,7 @@
<if test="customerId != null">#{customerId},</if>
<if test="deptCategoryId != null">#{deptCategoryId},</if>
<if test="selectionType != null">#{selectionType},</if>
<if test="type != null">#{type},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
@ -74,6 +78,7 @@
<if test="customerId != null">customer_id = #{customerId},</if>
<if test="deptCategoryId != null">dept_category_id = #{deptCategoryId},</if>
<if test="selectionType != null">selection_type = #{selectionType},</if>
<if test="type != null">type = #{type},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>

View File

@ -109,5 +109,9 @@ public class Goods extends BaseEntity {
/** 经度 */
private Double longitude;
/** 到店服务 1-到店服务 2-到店服务+配送 3-到店服务+上门 */
@Excel(name = "到店服务")
private Integer storeService;
}

View File

@ -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);
}
}

View File

@ -29,17 +29,18 @@
<result property="areaDesc" column="area_desc" />
<result property="keyword" column="keyword" />
<result property="type" column="type" />
<result property="storeService" column="store_service" />
</resultMap>
<sql id="selectGoods">
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
</sql>
<sql id="selectGoodsWithArea">
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
</sql>
@ -62,6 +63,7 @@
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="areaDesc != null and areaDesc != ''">area_desc = #{areaDesc},</if>
<if test="type != null">type = #{type},</if>
<if test="storeService != null">store_service = #{storeService},</if>
<if test="shopId != null">shop_id = #{shopId},</if>
<if test="shopName != null and shopName != ''">shop_name = #{shopName},</if>
update_time = sysdate()
@ -97,6 +99,7 @@
<if test="areaDesc != null and areaDesc != ''">area_desc,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="type != null">type,</if>
<if test="storeService != null">store_service,</if>
create_time
)values(
<if test="goodsCode != null and goodsCode != ''">#{goodsCode},</if>
@ -119,6 +122,7 @@
<if test="areaDesc != null and areaDesc != ''">#{areaDesc},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="type != null">#{type},</if>
<if test="storeService != null">#{storeService},</if>
sysdate()
)
</insert>
@ -170,6 +174,9 @@
<if test="shopId != null">
AND g.shop_id = #{shopId}
</if>
<if test="storeService != null">
AND g.store_service = #{storeService}
</if>
</where>
/* 默认生成时间排序 */
order by create_time