diff --git a/buyer-api/src/main/java/cn/lili/controller/goods/GoodsBuyerController.java b/buyer-api/src/main/java/cn/lili/controller/goods/GoodsBuyerController.java index f655ce92..e8e0b982 100644 --- a/buyer-api/src/main/java/cn/lili/controller/goods/GoodsBuyerController.java +++ b/buyer-api/src/main/java/cn/lili/controller/goods/GoodsBuyerController.java @@ -82,9 +82,6 @@ public class GoodsBuyerController { @NotNull(message = "SKU ID不能为空") @PathVariable("skuId") String skuId) { Map map = goodsSkuService.getGoodsSkuDetail(goodsId, skuId); - - - return ResultUtil.data(map); } diff --git a/framework/src/main/java/cn/lili/modules/promotion/service/PromotionGoodsService.java b/framework/src/main/java/cn/lili/modules/promotion/service/PromotionGoodsService.java index 7eb8d5e3..de04aea4 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/service/PromotionGoodsService.java +++ b/framework/src/main/java/cn/lili/modules/promotion/service/PromotionGoodsService.java @@ -142,15 +142,4 @@ public interface PromotionGoodsService extends IService { */ void updatePromotionGoodsStock(PromotionTypeEnum typeEnum, String promotionId, String skuId, Integer quantity); - - /** - * 分页获取根据条件获取促销商品 - * - * @param goodsName 商品名称 - * @param categoryPath 商品分类 - * @param promotionType 促销类型 - * @param pageVo 分页参数 - * @return 促销商品信息 - */ - IPage getPromotionGoodsPage(String goodsName, String categoryPath, String promotionType, PageVO pageVo); } \ No newline at end of file diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/CouponServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/CouponServiceImpl.java index 0ca21fd2..86224b20 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/CouponServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/CouponServiceImpl.java @@ -87,10 +87,10 @@ public class CouponServiceImpl extends ServiceImpl impleme this.save(coupon); // 如果优惠券类型为部分商品则将促销活动商品更新 this.updateScopePromotionGoods(coupon); + // 保存到MONGO中 + this.mongoTemplate.save(coupon); // 如果是动态时间优惠券不走延时任务 if (coupon.getRangeDayType().equals(CouponRangeDayEnum.FIXEDTIME.name())) { - // 保存到MONGO中 - this.mongoTemplate.save(coupon); PromotionMessage promotionMessage = new PromotionMessage(coupon.getId(), PromotionTypeEnum.COUPON.name(), PromotionStatusEnum.START.name(), coupon.getStartTime(), coupon.getEndTime()); TimeTriggerMsg timeTriggerMsg = new TimeTriggerMsg(TimeExecuteConstant.PROMOTION_EXECUTOR, coupon.getStartTime().getTime(), @@ -114,14 +114,17 @@ public class CouponServiceImpl extends ServiceImpl impleme this.updateScopePromotionGoods(couponVO); // 保存到MONGO中 this.mongoTemplate.save(couponVO); - PromotionMessage promotionMessage = new PromotionMessage(couponVO.getId(), PromotionTypeEnum.COUPON.name(), PromotionStatusEnum.START.name(), coupon.getStartTime(), coupon.getEndTime()); - // 更新延时任务 - this.timeTrigger.edit(TimeExecuteConstant.PROMOTION_EXECUTOR, - promotionMessage, - coupon.getStartTime().getTime(), couponVO.getStartTime().getTime(), - DelayQueueTools.wrapperUniqueKey(DelayQueueType.PROMOTION, (promotionMessage.getPromotionType() + promotionMessage.getPromotionId())), - DateUtil.getDelayTime(couponVO.getStartTime().getTime()), - rocketmqCustomProperties.getPromotionTopic()); + // 如果是动态时间优惠券不走延时任务 + if (coupon.getRangeDayType().equals(CouponRangeDayEnum.FIXEDTIME.name())) { + // 更新延时任务 + PromotionMessage promotionMessage = new PromotionMessage(couponVO.getId(), PromotionTypeEnum.COUPON.name(), PromotionStatusEnum.START.name(), coupon.getStartTime(), coupon.getEndTime()); + this.timeTrigger.edit(TimeExecuteConstant.PROMOTION_EXECUTOR, + promotionMessage, + coupon.getStartTime().getTime(), couponVO.getStartTime().getTime(), + DelayQueueTools.wrapperUniqueKey(DelayQueueType.PROMOTION, (promotionMessage.getPromotionType() + promotionMessage.getPromotionId())), + DateUtil.getDelayTime(couponVO.getStartTime().getTime()), + rocketmqCustomProperties.getPromotionTopic()); + } return couponVO; } @@ -141,15 +144,18 @@ public class CouponServiceImpl extends ServiceImpl impleme couponVO.setPromotionStatus(promotionStatus.name()); this.updateById(couponVO); this.mongoTemplate.save(couponVO); - if (promotionStatus.name().equals(PromotionStatusEnum.START.name())) { - PromotionMessage promotionMessage = new PromotionMessage(couponVO.getId(), PromotionTypeEnum.COUPON.name(), PromotionStatusEnum.START.name(), couponVO.getStartTime(), couponVO.getEndTime()); - // 更新延时任务 - this.timeTrigger.edit(TimeExecuteConstant.PROMOTION_EXECUTOR, - promotionMessage, - couponVO.getStartTime().getTime(), couponVO.getStartTime().getTime(), - DelayQueueTools.wrapperUniqueKey(DelayQueueType.PROMOTION, (promotionMessage.getPromotionType() + promotionMessage.getPromotionId())), - DateUtil.getDelayTime(couponVO.getStartTime().getTime()), - rocketmqCustomProperties.getPromotionTopic()); + // 如果是动态时间优惠券不走延时任务 + if (couponVO.getRangeDayType().equals(CouponRangeDayEnum.FIXEDTIME.name())) { + if (promotionStatus.name().equals(PromotionStatusEnum.START.name())) { + PromotionMessage promotionMessage = new PromotionMessage(couponVO.getId(), PromotionTypeEnum.COUPON.name(), PromotionStatusEnum.START.name(), couponVO.getStartTime(), couponVO.getEndTime()); + // 更新延时任务 + this.timeTrigger.edit(TimeExecuteConstant.PROMOTION_EXECUTOR, + promotionMessage, + couponVO.getStartTime().getTime(), couponVO.getStartTime().getTime(), + DelayQueueTools.wrapperUniqueKey(DelayQueueType.PROMOTION, (promotionMessage.getPromotionType() + promotionMessage.getPromotionId())), + DateUtil.getDelayTime(couponVO.getStartTime().getTime()), + rocketmqCustomProperties.getPromotionTopic()); + } } } return true; diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java index 5cc883de..76990684 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java @@ -335,30 +335,6 @@ public class PromotionGoodsServiceImpl extends ServiceImpl getPromotionGoodsPage(String goodsName, String categoryPath, String promotionType, PageVO pageVo) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - if (CharSequenceUtil.isNotEmpty(goodsName)) { - queryWrapper.like(PromotionGoods::getGoodsName, goodsName); - } - if (CharSequenceUtil.isNotEmpty(categoryPath)) { - queryWrapper.like(PromotionGoods::getCategoryPath, categoryPath); - } - if (CharSequenceUtil.isNotEmpty(promotionType)) { - queryWrapper.eq(PromotionGoods::getPromotionType, promotionType); - } - return this.page(PageUtil.initPage(pageVo), queryWrapper); - } - private void setFullDiscountPromotionGoods(IPage promotionGoodsPage, List fullDiscountVOS, PageVO pageVo) { List promotionGoodsDTOList = new ArrayList<>(); int total = 0; diff --git a/manager-api/src/main/java/cn/lili/controller/promotion/CouponManagerController.java b/manager-api/src/main/java/cn/lili/controller/promotion/CouponManagerController.java index 9c8cbd31..cdc4ec46 100644 --- a/manager-api/src/main/java/cn/lili/controller/promotion/CouponManagerController.java +++ b/manager-api/src/main/java/cn/lili/controller/promotion/CouponManagerController.java @@ -42,11 +42,9 @@ public class CouponManagerController { @ApiOperation(value = "获取优惠券列表") @GetMapping - public ResultMessage> getCouponList(CouponSearchParams queryParam, PageVO page) { - page.setNotConvert(true); + public ResultMessage> getCouponList(CouponSearchParams queryParam, PageVO page) { queryParam.setStoreId("platform"); - IPage coupons = couponService.getCouponsByPageFromMongo(queryParam, page); - return ResultUtil.data(coupons); + return ResultUtil.data(couponService.getCouponsByPage(queryParam, page)); } @ApiOperation(value = "获取优惠券详情") diff --git a/seller-api/src/main/java/cn/lili/controller/trade/OrderStoreController.java b/seller-api/src/main/java/cn/lili/controller/trade/OrderStoreController.java index ca927927..69e0deb5 100644 --- a/seller-api/src/main/java/cn/lili/controller/trade/OrderStoreController.java +++ b/seller-api/src/main/java/cn/lili/controller/trade/OrderStoreController.java @@ -7,6 +7,7 @@ import cn.lili.common.enums.ResultUtil; import cn.lili.common.vo.ResultMessage; import cn.lili.modules.member.entity.dto.MemberAddressDTO; import cn.lili.modules.order.order.entity.dto.OrderBatchDeliverDTO; +import cn.lili.modules.order.order.entity.dto.OrderExportDTO; import cn.lili.modules.order.order.entity.dto.OrderSearchParams; import cn.lili.modules.order.order.entity.vo.OrderDetailVO; import cn.lili.modules.order.order.entity.vo.OrderSimpleVO; @@ -178,6 +179,11 @@ public class OrderStoreController { } catch (Exception e) { e.printStackTrace(); } + } + @ApiOperation(value = "查询订单导出列表") + @GetMapping("/queryExportOrder") + public ResultMessage> queryExportOrder(OrderSearchParams orderSearchParams) { + return ResultUtil.data(orderService.queryExportOrder(orderSearchParams)); } } \ No newline at end of file