Browse Source

对接拼团数据1

master
wangfukang 1 month ago
parent
commit
5e66642ffa
  1. 6
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/MallDeliveryOrderController.java
  2. 4
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeValueController.java
  3. 1
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java
  4. 2
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java
  5. 5
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/query/MallDeliveryOrderPageQuery.java

6
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.entity.MallOrder;
import cc.hiver.mall.pojo.query.MallDeliveryOrderPageQuery; import cc.hiver.mall.pojo.query.MallDeliveryOrderPageQuery;
import cc.hiver.mall.pojo.vo.WorkerRedisVo; 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.service.mybatis.MallDeliveryOrderService;
import cc.hiver.mall.utils.WaitOrderCacheUtil; import cc.hiver.mall.utils.WaitOrderCacheUtil;
import cc.hiver.mall.utils.WorkerOrderCacheUtil; import cc.hiver.mall.utils.WorkerOrderCacheUtil;
@ -49,6 +50,9 @@ public class MallDeliveryOrderController {
@Autowired @Autowired
JPushServiceImpl jPushService; JPushServiceImpl jPushService;
@Autowired
private MallAdPositionService mallAdPositionService;
@Autowired @Autowired
WorkerRedisCacheUtil workerRedisCacheUtil; WorkerRedisCacheUtil workerRedisCacheUtil;
@ -70,12 +74,14 @@ public class MallDeliveryOrderController {
//首先从缓存中查询 //首先从缓存中查询
Map<String, Object> cacheResult = waitOrderCacheUtil.getAll(q); Map<String, Object> cacheResult = waitOrderCacheUtil.getAll(q);
cacheResult.put("mallAds",mallAdPositionService.getAdsByRegionId(q.getRegionId(),q.getPaths()));
if (cacheResult != null) { if (cacheResult != null) {
return new ResultUtil<Object>().setData(cacheResult); return new ResultUtil<Object>().setData(cacheResult);
} }
//缓存未命中,查询数据库 //缓存未命中,查询数据库
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
result.put("mallAds",mallAdPositionService.getAdsByRegionId(q.getRegionId(),q.getPaths()));
if (q.getDeliveryType() == 4 && StrUtil.isNotBlank(q.getWorkerId())) { if (q.getDeliveryType() == 4 && StrUtil.isNotBlank(q.getWorkerId())) {
//先查当前用户指派单未确认接单数量 不用分页 //先查当前用户指派单未确认接单数量 不用分页
q.setHallOnly(false); q.setHallOnly(false);

4
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeValueController.java

@ -39,7 +39,7 @@ public class ProductAttributeValueController {
// 20240330 只能新增颜色和尺码,颜色统一改为*色、尺码统一转大写,加‘码’; // 20240330 只能新增颜色和尺码,颜色统一改为*色、尺码统一转大写,加‘码’;
// 根据规格id规格是颜色、还是尺码。 // 根据规格id规格是颜色、还是尺码。
final ProductAttribute productAttribute = productAttributeService.getById(attributeId); final ProductAttribute productAttribute = productAttributeService.getById(attributeId);
if("颜色".equals(productAttribute.getAttributeName())){ /*if("颜色".equals(productAttribute.getAttributeName())){
if(!value.contains("色")){ if(!value.contains("色")){
productAttributeValue.setValue(value + '色'); productAttributeValue.setValue(value + '色');
} }
@ -52,7 +52,7 @@ public class ProductAttributeValueController {
} }
}else{ }else{
// 暂不支持其他规格 // 暂不支持其他规格
} }*/
final QueryWrapper<ProductAttributeValue> queryWrapper = new QueryWrapper<>(); final QueryWrapper<ProductAttributeValue> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("attribute_id", attributeId); queryWrapper.eq("attribute_id", attributeId);
queryWrapper.eq("value", value); queryWrapper.eq("value", value);

1
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())){ if("[]".equals(product.getCustomerCategoryRule()) || "null".equals(product.getCustomerCategoryRule())){
product.setCustomerCategoryRule(""); product.setCustomerCategoryRule("");
} }
product.setTailWarn(CommonConstant.DATA_TYPE_ALL);
final boolean result = productService.save(product); final boolean result = productService.save(product);
// 如果有子图,那么新增子图信息 // 如果有子图,那么新增子图信息
final List<ProductPicture> productPictures = productVo.getProductPictures(); final List<ProductPicture> productPictures = productVo.getProductPictures();

2
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java

@ -131,7 +131,7 @@ public class Product implements Serializable {
@ApiModelProperty(value = "打印条码(自己制作的)") @ApiModelProperty(value = "打印条码(自己制作的)")
private String printBarcode; private String printBarcode;
@ApiModelProperty(value = "库存预警") @ApiModelProperty(value = "销量")
private Integer tailWarn; private Integer tailWarn;
@ApiModelProperty(value = "起售数量") @ApiModelProperty(value = "起售数量")

5
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 io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* 配送单分页查询对象 * 配送单分页查询对象
*/ */
@ -18,6 +20,9 @@ public class MallDeliveryOrderPageQuery extends HiverBasePageQuery {
@ApiModelProperty("转单对象id") @ApiModelProperty("转单对象id")
private String newWorker; private String newWorker;
@ApiModelProperty("广告位")
private List<String> paths;
@ApiModelProperty("店铺ID") @ApiModelProperty("店铺ID")
private String shopId; private String shopId;

Loading…
Cancel
Save