diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/MallDeliveryOrderController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/MallDeliveryOrderController.java index 24066364..2177e124 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/MallDeliveryOrderController.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/MallDeliveryOrderController.java @@ -12,6 +12,7 @@ import cc.hiver.mall.entity.MallDeliveryOrder; import cc.hiver.mall.entity.MallOrder; import cc.hiver.mall.pojo.query.MallDeliveryOrderPageQuery; import cc.hiver.mall.pojo.vo.WorkerRedisVo; +import cc.hiver.mall.service.mybatis.MallAdPositionService; import cc.hiver.mall.service.mybatis.MallDeliveryOrderService; import cc.hiver.mall.utils.WaitOrderCacheUtil; import cc.hiver.mall.utils.WorkerOrderCacheUtil; @@ -49,6 +50,9 @@ public class MallDeliveryOrderController { @Autowired JPushServiceImpl jPushService; + @Autowired + private MallAdPositionService mallAdPositionService; + @Autowired WorkerRedisCacheUtil workerRedisCacheUtil; @@ -70,12 +74,14 @@ public class MallDeliveryOrderController { //首先从缓存中查询 Map cacheResult = waitOrderCacheUtil.getAll(q); + cacheResult.put("mallAds",mallAdPositionService.getAdsByRegionId(q.getRegionId(),q.getPaths())); if (cacheResult != null) { return new ResultUtil().setData(cacheResult); } //缓存未命中,查询数据库 Map result = new HashMap<>(); + result.put("mallAds",mallAdPositionService.getAdsByRegionId(q.getRegionId(),q.getPaths())); if (q.getDeliveryType() == 4 && StrUtil.isNotBlank(q.getWorkerId())) { //先查当前用户指派单未确认接单数量 不用分页 q.setHallOnly(false); diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeValueController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeValueController.java index 63684b9d..9f091ea2 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeValueController.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeValueController.java @@ -39,7 +39,7 @@ public class ProductAttributeValueController { // 20240330 只能新增颜色和尺码,颜色统一改为*色、尺码统一转大写,加‘码’; // 根据规格id规格是颜色、还是尺码。 final ProductAttribute productAttribute = productAttributeService.getById(attributeId); - if("颜色".equals(productAttribute.getAttributeName())){ + /*if("颜色".equals(productAttribute.getAttributeName())){ if(!value.contains("色")){ productAttributeValue.setValue(value + '色'); } @@ -52,7 +52,7 @@ public class ProductAttributeValueController { } }else{ // 暂不支持其他规格 - } + }*/ final QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("attribute_id", attributeId); queryWrapper.eq("value", value); diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java index d318cb5e..a89a9e4b 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java @@ -121,6 +121,7 @@ public class ProductController { if("[]".equals(product.getCustomerCategoryRule()) || "null".equals(product.getCustomerCategoryRule())){ product.setCustomerCategoryRule(""); } + product.setTailWarn(CommonConstant.DATA_TYPE_ALL); final boolean result = productService.save(product); // 如果有子图,那么新增子图信息 final List productPictures = productVo.getProductPictures(); diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java index 250a4250..a81bed7c 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java @@ -131,7 +131,7 @@ public class Product implements Serializable { @ApiModelProperty(value = "打印条码(自己制作的)") private String printBarcode; - @ApiModelProperty(value = "库存预警") + @ApiModelProperty(value = "销量") private Integer tailWarn; @ApiModelProperty(value = "起售数量") diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/query/MallDeliveryOrderPageQuery.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/query/MallDeliveryOrderPageQuery.java index 3dcd39a9..f3c6a581 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/query/MallDeliveryOrderPageQuery.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/query/MallDeliveryOrderPageQuery.java @@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.util.List; + /** * 配送单分页查询对象 */ @@ -18,6 +20,9 @@ public class MallDeliveryOrderPageQuery extends HiverBasePageQuery { @ApiModelProperty("转单对象id") private String newWorker; + @ApiModelProperty("广告位") + private List paths; + @ApiModelProperty("店铺ID") private String shopId;