diff --git a/framework/src/main/java/cn/lili/modules/order/order/entity/dos/Order.java b/framework/src/main/java/cn/lili/modules/order/order/entity/dos/Order.java index 8c0129514668ab6d542ea56988ddd785307a25ae..0bc211fcbecf3b677acc13f997271f2d3571432c 100644 --- a/framework/src/main/java/cn/lili/modules/order/order/entity/dos/Order.java +++ b/framework/src/main/java/cn/lili/modules/order/order/entity/dos/Order.java @@ -1,6 +1,6 @@ package cn.lili.modules.order.order.entity.dos; -import cn.hutool.core.util.StrUtil; +import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.json.JSONUtil; import cn.lili.common.enums.ClientTypeEnum; import cn.lili.common.enums.PromotionTypeEnum; @@ -262,12 +262,14 @@ public class Order extends BaseEntity { //判断是否为普通订单、促销订单 if (tradeDTO.getCartTypeEnum().equals(CartTypeEnum.CART) || tradeDTO.getCartTypeEnum().equals(CartTypeEnum.BUY_NOW)) { this.setOrderType(OrderTypeEnum.NORMAL.name()); + this.setOrderPromotionType(OrderPromotionTypeEnum.NORMAL.name()); } else if (tradeDTO.getCartTypeEnum().equals(CartTypeEnum.VIRTUAL)) { this.setOrderType(OrderTypeEnum.VIRTUAL.name()); + this.setOrderPromotionType(OrderPromotionTypeEnum.NORMAL.name()); } else { //促销订单(拼团、积分)-判断购买的是虚拟商品还是实物商品 String goodsType = cartVO.getCheckedSkuList().get(0).getGoodsSku().getGoodsType(); - if (StrUtil.isEmpty(goodsType) || goodsType.equals(GoodsTypeEnum.PHYSICAL_GOODS.name())) { + if (CharSequenceUtil.isEmpty(goodsType) || goodsType.equals(GoodsTypeEnum.PHYSICAL_GOODS.name())) { this.setOrderType(OrderTypeEnum.NORMAL.name()); } else { this.setOrderType(OrderTypeEnum.VIRTUAL.name()); diff --git a/framework/src/main/java/cn/lili/modules/order/order/entity/vo/OrderSimpleVO.java b/framework/src/main/java/cn/lili/modules/order/order/entity/vo/OrderSimpleVO.java index 711ffd92aa7c76718358ae64e3022ea5375f13bd..8ff6dcf65c0d895898b5414fbc6cc285c5362a42 100644 --- a/framework/src/main/java/cn/lili/modules/order/order/entity/vo/OrderSimpleVO.java +++ b/framework/src/main/java/cn/lili/modules/order/order/entity/vo/OrderSimpleVO.java @@ -34,13 +34,13 @@ public class OrderSimpleVO { private Date createTime; /** - * @see OrderStatusEnum + * @see cn.lili.modules.order.order.entity.enums.OrderStatusEnum */ @ApiModelProperty(value = "订单状态") private String orderStatus; /** - * @see PayStatusEnum + * @see cn.lili.modules.order.order.entity.enums.PayStatusEnum */ @ApiModelProperty(value = "付款状态") private String payStatus; @@ -100,21 +100,21 @@ public class OrderSimpleVO { @Setter private String groupGoodsPrice; /** - * @see OrderItemAfterSaleStatusEnum + * @see cn.lili.modules.order.order.entity.enums.OrderItemAfterSaleStatusEnum */ @ApiModelProperty(hidden = true, value = "item 售后状态", allowableValues = "NOT_APPLIED(未申请),ALREADY_APPLIED(已申请),EXPIRED(已失效不允许申请售后)") @Setter private String groupAfterSaleStatus; /** - * @see OrderComplaintStatusEnum + * @see cn.lili.modules.order.order.entity.enums.OrderComplaintStatusEnum */ @ApiModelProperty(hidden = true, value = "item 投诉状态") @Setter private String groupComplainStatus; /** - * @see CommentStatusEnum + * @see cn.lili.modules.order.order.entity.enums.CommentStatusEnum */ @ApiModelProperty(hidden = true, value = "item 评价状态") @Setter @@ -122,17 +122,23 @@ public class OrderSimpleVO { /** - * @see OrderTypeEnum + * @see cn.lili.modules.order.order.entity.enums.OrderTypeEnum */ @ApiModelProperty(value = "订单类型") private String orderType; /** - * @see DeliverStatusEnum + * @see cn.lili.modules.order.order.entity.enums.DeliverStatusEnum */ @ApiModelProperty(value = "货运状态") private String deliverStatus; + /** + * @see cn.lili.modules.order.order.entity.enums.OrderPromotionTypeEnum + */ + @ApiModelProperty(value = "订单促销类型") + private String orderPromotionType; + public List getOrderItems() { if (CharSequenceUtil.isEmpty(groupGoodsId)) { return new ArrayList<>(); diff --git a/framework/src/main/java/cn/lili/modules/order/order/mapper/OrderMapper.java b/framework/src/main/java/cn/lili/modules/order/order/mapper/OrderMapper.java index 27487d8248e8fe040ed069fccbfc559f9fcf9a10..ba39b890b530e83b5c9d4245a50e624f8e537404 100644 --- a/framework/src/main/java/cn/lili/modules/order/order/mapper/OrderMapper.java +++ b/framework/src/main/java/cn/lili/modules/order/order/mapper/OrderMapper.java @@ -60,7 +60,7 @@ public interface OrderMapper extends BaseMapper { * @param queryWrapper 查询条件 * @return 简短订单分页 */ - @Select("select o.sn,o.flow_price,o.create_time,o.order_status,o.pay_status,o.payment_method,o.payment_time,o.member_name,o.store_name as store_name,o.store_id as store_id,o.client_type,o.order_type,o.deliver_status " + + @Select("select o.sn,o.flow_price,o.create_time,o.order_status,o.pay_status,o.payment_method,o.payment_time,o.member_name,o.store_name as store_name,o.store_id as store_id,o.client_type,o.order_type,o.deliver_status,o.order_promotion_type " + ",GROUP_CONCAT(oi.goods_id) as group_goods_id," + " GROUP_CONCAT(oi.sku_id) as group_sku_id," + " GROUP_CONCAT(oi.num) as group_num" + diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillApplyServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillApplyServiceImpl.java index 7369ff78512e16ba97bfe7c3c9777375ef864d74..1b7b8f5507a14207776077503fc04934d8c6ec5e 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillApplyServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillApplyServiceImpl.java @@ -339,8 +339,9 @@ public class SeckillApplyServiceImpl extends ServiceImpl= hour || i + 1 == hoursSored.length); - if (hoursSoredHour) { + boolean hoursSoredHour = (hoursSored[i] >= hour || ((i + 1) < hoursSored.length && hoursSored[i + 1] > hour)); + boolean lastHour = i == hoursSored.length - 1 && hoursSored[i] < hour; + if (hoursSoredHour || lastHour) { SimpleDateFormat format = new SimpleDateFormat(DatePattern.NORM_DATE_PATTERN); String date = format.format(new Date()); //当前时间的秒数