修复优化促销

This commit is contained in:
paulGao
2021-12-25 18:35:44 +08:00
parent 825e44b353
commit f9a8675942
37 changed files with 177 additions and 191 deletions

View File

@@ -13,6 +13,7 @@ import cn.lili.modules.promotion.entity.vos.CouponSearchParams;
import cn.lili.modules.promotion.entity.vos.CouponVO;
import cn.lili.modules.promotion.service.CouponService;
import cn.lili.modules.promotion.service.MemberCouponService;
import cn.lili.modules.promotion.tools.PromotionTools;
import cn.lili.mybatis.util.PageUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -42,7 +43,7 @@ public class CouponManagerController {
@ApiOperation(value = "获取优惠券列表")
@GetMapping
public ResultMessage<IPage<CouponVO>> getCouponList(CouponSearchParams queryParam, PageVO page) {
queryParam.setStoreId("platform");
queryParam.setStoreId(PromotionTools.PLATFORM_ID);
return ResultUtil.data(couponService.pageVOFindAll(queryParam, page));
}
@@ -111,8 +112,8 @@ public class CouponManagerController {
if (currentUser == null) {
throw new ServiceException(ResultCode.USER_NOT_EXIST);
}
couponVO.setStoreId("platform");
couponVO.setStoreName("platform");
couponVO.setStoreId(PromotionTools.PLATFORM_ID);
couponVO.setStoreName(PromotionTools.PLATFORM_NAME);
}
}

View File

@@ -136,7 +136,7 @@ class EsTest {
List<EsGoodsIndex> esGoodsIndices = new ArrayList<>();
for (GoodsSku goodsSku : list) {
EsGoodsIndex index = new EsGoodsIndex(goodsSku);
Map<String, Object> goodsCurrentPromotionMap = promotionService.getGoodsCurrentPromotionMap(index);
Map<String, Object> goodsCurrentPromotionMap = promotionService.getGoodsPromotionMap(index);
index.setPromotionMap(goodsCurrentPromotionMap);
esGoodsIndices.add(index);
cache.put(GoodsSkuService.getStockCacheKey(goodsSku.getId()), goodsSku.getQuantity());