店铺导出订单列表
This commit is contained in:
parent
73002148d4
commit
b7e439e177
@ -82,9 +82,6 @@ public class GoodsBuyerController {
|
|||||||
@NotNull(message = "SKU ID不能为空") @PathVariable("skuId") String skuId) {
|
@NotNull(message = "SKU ID不能为空") @PathVariable("skuId") String skuId) {
|
||||||
|
|
||||||
Map<String, Object> map = goodsSkuService.getGoodsSkuDetail(goodsId, skuId);
|
Map<String, Object> map = goodsSkuService.getGoodsSkuDetail(goodsId, skuId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ResultUtil.data(map);
|
return ResultUtil.data(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,15 +142,4 @@ public interface PromotionGoodsService extends IService<PromotionGoods> {
|
|||||||
*/
|
*/
|
||||||
void updatePromotionGoodsStock(PromotionTypeEnum typeEnum, String promotionId, String skuId, Integer quantity);
|
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.save(coupon);
|
||||||
// 如果优惠券类型为部分商品则将促销活动商品更新
|
// 如果优惠券类型为部分商品则将促销活动商品更新
|
||||||
this.updateScopePromotionGoods(coupon);
|
this.updateScopePromotionGoods(coupon);
|
||||||
// 如果是动态时间优惠券不走延时任务
|
|
||||||
if (coupon.getRangeDayType().equals(CouponRangeDayEnum.FIXEDTIME.name())) {
|
|
||||||
// 保存到MONGO中
|
// 保存到MONGO中
|
||||||
this.mongoTemplate.save(coupon);
|
this.mongoTemplate.save(coupon);
|
||||||
|
// 如果是动态时间优惠券不走延时任务
|
||||||
|
if (coupon.getRangeDayType().equals(CouponRangeDayEnum.FIXEDTIME.name())) {
|
||||||
PromotionMessage promotionMessage = new PromotionMessage(coupon.getId(), PromotionTypeEnum.COUPON.name(), PromotionStatusEnum.START.name(), coupon.getStartTime(), coupon.getEndTime());
|
PromotionMessage promotionMessage = new PromotionMessage(coupon.getId(), PromotionTypeEnum.COUPON.name(), PromotionStatusEnum.START.name(), coupon.getStartTime(), coupon.getEndTime());
|
||||||
TimeTriggerMsg timeTriggerMsg = new TimeTriggerMsg(TimeExecuteConstant.PROMOTION_EXECUTOR,
|
TimeTriggerMsg timeTriggerMsg = new TimeTriggerMsg(TimeExecuteConstant.PROMOTION_EXECUTOR,
|
||||||
coupon.getStartTime().getTime(),
|
coupon.getStartTime().getTime(),
|
||||||
@ -114,14 +114,17 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
|
|||||||
this.updateScopePromotionGoods(couponVO);
|
this.updateScopePromotionGoods(couponVO);
|
||||||
// 保存到MONGO中
|
// 保存到MONGO中
|
||||||
this.mongoTemplate.save(couponVO);
|
this.mongoTemplate.save(couponVO);
|
||||||
PromotionMessage promotionMessage = new PromotionMessage(couponVO.getId(), PromotionTypeEnum.COUPON.name(), PromotionStatusEnum.START.name(), coupon.getStartTime(), coupon.getEndTime());
|
// 如果是动态时间优惠券不走延时任务
|
||||||
|
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,
|
this.timeTrigger.edit(TimeExecuteConstant.PROMOTION_EXECUTOR,
|
||||||
promotionMessage,
|
promotionMessage,
|
||||||
coupon.getStartTime().getTime(), couponVO.getStartTime().getTime(),
|
coupon.getStartTime().getTime(), couponVO.getStartTime().getTime(),
|
||||||
DelayQueueTools.wrapperUniqueKey(DelayQueueType.PROMOTION, (promotionMessage.getPromotionType() + promotionMessage.getPromotionId())),
|
DelayQueueTools.wrapperUniqueKey(DelayQueueType.PROMOTION, (promotionMessage.getPromotionType() + promotionMessage.getPromotionId())),
|
||||||
DateUtil.getDelayTime(couponVO.getStartTime().getTime()),
|
DateUtil.getDelayTime(couponVO.getStartTime().getTime()),
|
||||||
rocketmqCustomProperties.getPromotionTopic());
|
rocketmqCustomProperties.getPromotionTopic());
|
||||||
|
}
|
||||||
return couponVO;
|
return couponVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,6 +144,8 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
|
|||||||
couponVO.setPromotionStatus(promotionStatus.name());
|
couponVO.setPromotionStatus(promotionStatus.name());
|
||||||
this.updateById(couponVO);
|
this.updateById(couponVO);
|
||||||
this.mongoTemplate.save(couponVO);
|
this.mongoTemplate.save(couponVO);
|
||||||
|
// 如果是动态时间优惠券不走延时任务
|
||||||
|
if (couponVO.getRangeDayType().equals(CouponRangeDayEnum.FIXEDTIME.name())) {
|
||||||
if (promotionStatus.name().equals(PromotionStatusEnum.START.name())) {
|
if (promotionStatus.name().equals(PromotionStatusEnum.START.name())) {
|
||||||
PromotionMessage promotionMessage = new PromotionMessage(couponVO.getId(), PromotionTypeEnum.COUPON.name(), PromotionStatusEnum.START.name(), couponVO.getStartTime(), couponVO.getEndTime());
|
PromotionMessage promotionMessage = new PromotionMessage(couponVO.getId(), PromotionTypeEnum.COUPON.name(), PromotionStatusEnum.START.name(), couponVO.getStartTime(), couponVO.getEndTime());
|
||||||
// 更新延时任务
|
// 更新延时任务
|
||||||
@ -152,6 +157,7 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
|
|||||||
rocketmqCustomProperties.getPromotionTopic());
|
rocketmqCustomProperties.getPromotionTopic());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,30 +335,6 @@ public class PromotionGoodsServiceImpl extends ServiceImpl<PromotionGoodsMapper,
|
|||||||
stringRedisTemplate.opsForValue().set(promotionStockKey, quantity.toString());
|
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) {
|
private void setFullDiscountPromotionGoods(IPage<PromotionGoodsDTO> promotionGoodsPage, List<FullDiscountVO> fullDiscountVOS, PageVO pageVo) {
|
||||||
List<PromotionGoodsDTO> promotionGoodsDTOList = new ArrayList<>();
|
List<PromotionGoodsDTO> promotionGoodsDTOList = new ArrayList<>();
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
@ -42,11 +42,9 @@ public class CouponManagerController {
|
|||||||
|
|
||||||
@ApiOperation(value = "获取优惠券列表")
|
@ApiOperation(value = "获取优惠券列表")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ResultMessage<IPage<CouponVO>> getCouponList(CouponSearchParams queryParam, PageVO page) {
|
public ResultMessage<IPage<Coupon>> getCouponList(CouponSearchParams queryParam, PageVO page) {
|
||||||
page.setNotConvert(true);
|
|
||||||
queryParam.setStoreId("platform");
|
queryParam.setStoreId("platform");
|
||||||
IPage<CouponVO> coupons = couponService.getCouponsByPageFromMongo(queryParam, page);
|
return ResultUtil.data(couponService.getCouponsByPage(queryParam, page));
|
||||||
return ResultUtil.data(coupons);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "获取优惠券详情")
|
@ApiOperation(value = "获取优惠券详情")
|
||||||
|
@ -7,6 +7,7 @@ import cn.lili.common.enums.ResultUtil;
|
|||||||
import cn.lili.common.vo.ResultMessage;
|
import cn.lili.common.vo.ResultMessage;
|
||||||
import cn.lili.modules.member.entity.dto.MemberAddressDTO;
|
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.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.dto.OrderSearchParams;
|
||||||
import cn.lili.modules.order.order.entity.vo.OrderDetailVO;
|
import cn.lili.modules.order.order.entity.vo.OrderDetailVO;
|
||||||
import cn.lili.modules.order.order.entity.vo.OrderSimpleVO;
|
import cn.lili.modules.order.order.entity.vo.OrderSimpleVO;
|
||||||
@ -178,6 +179,11 @@ public class OrderStoreController {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
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