Browse Source

[拼团][修改][状态]

release_toaliyun_real
gongbiao 7 years ago
parent
commit
549b2673b2
1 changed files with 13 additions and 11 deletions
  1. +13
    -11
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java

+ 13
- 11
mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java View File

@@ -229,17 +229,19 @@ public class WxOrderGroupServiceImpl implements WxOrderGroupService {
public void updateGroupStatus(WxOrderGroup wxOrderGroup) { public void updateGroupStatus(WxOrderGroup wxOrderGroup) {
Long id = wxOrderGroup.getId(); Long id = wxOrderGroup.getId();
WxOrderGroup group = wxOrderGroupMapper.selectByPrimaryKey(id); WxOrderGroup group = wxOrderGroupMapper.selectByPrimaryKey(id);
WxCoupon wxCoupon = wxCouponMapper.selectByPrimaryKey(wxOrderGroup.getCouponId());
Integer status = wxCoupon.getStatus();
if (status.equals(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode())) {
group.setStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode());
returnMoney(group);
}
// 查看是否超时
Date expiredDate = group.getExpiredDate();
if (new Date().after(expiredDate)) {
group.setStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_OVERTIME.getCode());
returnMoney(group);
if (group.getStatus().equals(EnumOrderStatus.ORDER_STATUS_COOPERATING.getCode())) {
WxCoupon wxCoupon = wxCouponMapper.selectByPrimaryKey(wxOrderGroup.getCouponId());
Integer status = wxCoupon.getStatus();
if (status.equals(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode())) {
group.setStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode());
returnMoney(group);
}
// 查看是否超时
Date expiredDate = group.getExpiredDate();
if (new Date().after(expiredDate)) {
group.setStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_OVERTIME.getCode());
returnMoney(group);
}
} }
} }




Loading…
Cancel
Save