!223 优化秒杀活动获取时,当前时间大于活动最后一个时间时,显示最后一个时间
Merge pull request !223 from OceansDeep/feature/pg
This commit is contained in:
commit
88338877b0
@ -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());
|
||||
|
@ -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<OrderItemVO> getOrderItems() {
|
||||
if (CharSequenceUtil.isEmpty(groupGoodsId)) {
|
||||
return new ArrayList<>();
|
||||
|
@ -60,7 +60,7 @@ public interface OrderMapper extends BaseMapper<Order> {
|
||||
* @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" +
|
||||
|
@ -339,8 +339,9 @@ public class SeckillApplyServiceImpl extends ServiceImpl<SeckillApplyMapper, Sec
|
||||
Arrays.sort(hoursSored);
|
||||
for (int i = 0; i < hoursSored.length; i++) {
|
||||
SeckillTimelineVO tempTimeline = new SeckillTimelineVO();
|
||||
boolean hoursSoredHour = (hoursSored[i] >= 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());
|
||||
//当前时间的秒数
|
||||
|
Loading…
x
Reference in New Issue
Block a user