店铺导出订单列表
This commit is contained in:
parent
73002148d4
commit
b7e439e177
@ -82,9 +82,6 @@ public class GoodsBuyerController {
|
||||
@NotNull(message = "SKU ID不能为空") @PathVariable("skuId") String skuId) {
|
||||
|
||||
Map<String, Object> map = goodsSkuService.getGoodsSkuDetail(goodsId, skuId);
|
||||
|
||||
|
||||
|
||||
return ResultUtil.data(map);
|
||||
}
|
||||
|
||||
|
@ -142,15 +142,4 @@ public interface PromotionGoodsService extends IService<PromotionGoods> {
|
||||
*/
|
||||
void updatePromotionGoodsStock(PromotionTypeEnum typeEnum, String promotionId, String skuId, Integer quantity);
|
||||
|
||||
|
||||
/**
|
||||
* 分页获取根据条件获取促销商品
|
||||
*
|
||||
* @param goodsName 商品名称
|
||||
* @param categoryPath 商品分类
|
||||
* @param promotionType 促销类型
|
||||
* @param pageVo 分页参数
|
||||
* @return 促销商品信息
|
||||
*/
|
||||
IPage<PromotionGoods> getPromotionGoodsPage(String goodsName, String categoryPath, String promotionType, PageVO pageVo);
|
||||
}
|
@ -87,10 +87,10 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> 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<CouponMapper, Coupon> 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<CouponMapper, Coupon> 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;
|
||||
|
@ -335,30 +335,6 @@ public class PromotionGoodsServiceImpl extends ServiceImpl<PromotionGoodsMapper,
|
||||
stringRedisTemplate.opsForValue().set(promotionStockKey, quantity.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取根据条件获取促销商品
|
||||
*
|
||||
* @param goodsName 商品名称
|
||||
* @param categoryPath 商品分类
|
||||
* @param promotionType 促销类型
|
||||
* @param pageVo 分页参数
|
||||
* @return 促销商品信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<PromotionGoods> getPromotionGoodsPage(String goodsName, String categoryPath, String promotionType, PageVO pageVo) {
|
||||
LambdaQueryWrapper<PromotionGoods> 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<PromotionGoodsDTO> promotionGoodsPage, List<FullDiscountVO> fullDiscountVOS, PageVO pageVo) {
|
||||
List<PromotionGoodsDTO> promotionGoodsDTOList = new ArrayList<>();
|
||||
int total = 0;
|
||||
|
@ -42,11 +42,9 @@ public class CouponManagerController {
|
||||
|
||||
@ApiOperation(value = "获取优惠券列表")
|
||||
@GetMapping
|
||||
public ResultMessage<IPage<CouponVO>> getCouponList(CouponSearchParams queryParam, PageVO page) {
|
||||
page.setNotConvert(true);
|
||||
public ResultMessage<IPage<Coupon>> getCouponList(CouponSearchParams queryParam, PageVO page) {
|
||||
queryParam.setStoreId("platform");
|
||||
IPage<CouponVO> coupons = couponService.getCouponsByPageFromMongo(queryParam, page);
|
||||
return ResultUtil.data(coupons);
|
||||
return ResultUtil.data(couponService.getCouponsByPage(queryParam, page));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取优惠券详情")
|
||||
|
@ -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<List<OrderExportDTO>> queryExportOrder(OrderSearchParams orderSearchParams) {
|
||||
return ResultUtil.data(orderService.queryExportOrder(orderSearchParams));
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user