|
@@ -333,8 +333,6 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
|
|
log.info("优惠卷信息,{}", coupon);
|
|
log.info("优惠卷信息,{}", coupon);
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
//折扣券
|
|
//折扣券
|
|
if (coupon.getDiscountType() == 2) {
|
|
if (coupon.getDiscountType() == 2) {
|
|
//判断门槛金额
|
|
//判断门槛金额
|
|
@@ -358,7 +356,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
|
|
throw new ServiceException("不满足优惠券门槛金额");
|
|
throw new ServiceException("不满足优惠券门槛金额");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(orderVerificationVo.getTotalPrice().compareTo(BigDecimal.ZERO)<0){
|
|
|
|
|
|
+ if (orderVerificationVo.getTotalPrice().compareTo(BigDecimal.ZERO) < 0) {
|
|
throw new ServiceException("当前项目不可用");
|
|
throw new ServiceException("当前项目不可用");
|
|
}
|
|
}
|
|
return orderVerificationVo;
|
|
return orderVerificationVo;
|
|
@@ -442,12 +440,12 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public void orderPayManage(TWxUser user, TOrder orderNew) {
|
|
public void orderPayManage(TWxUser user, TOrder orderNew) {
|
|
//更新优惠卷状态
|
|
//更新优惠卷状态
|
|
- if(StringUtils.isNotBlank(orderNew.getCouponReceiveId())){
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(orderNew.getCouponReceiveId())) {
|
|
CouponReceive couponReceive = new CouponReceive();
|
|
CouponReceive couponReceive = new CouponReceive();
|
|
couponReceive.setId(orderNew.getCouponReceiveId());
|
|
couponReceive.setId(orderNew.getCouponReceiveId());
|
|
couponReceive.setUseState(MassageConstants.INTEGER_TWO);
|
|
couponReceive.setUseState(MassageConstants.INTEGER_TWO);
|
|
- if(!couponReceiveService.updateById(couponReceive)){
|
|
|
|
- log.error("优惠券状态更新失败id:,{}",orderNew.getCouponReceiveId());
|
|
|
|
|
|
+ if (!couponReceiveService.updateById(couponReceive)) {
|
|
|
|
+ log.error("优惠券状态更新失败id:,{}", orderNew.getCouponReceiveId());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -489,6 +487,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
|
|
orderParam.setPayType(orderNew.getPayType());
|
|
orderParam.setPayType(orderNew.getPayType());
|
|
orderParam.setcId(orderNew.getcId());
|
|
orderParam.setcId(orderNew.getcId());
|
|
orderParam.setnStatus(OrderStatusEnum.WAIT_JD.getCode());
|
|
orderParam.setnStatus(OrderStatusEnum.WAIT_JD.getCode());
|
|
|
|
+ orderParam.setPayTime(new Date());
|
|
//加钟的订单支付完直接服务中
|
|
//加钟的订单支付完直接服务中
|
|
if (StringUtils.isNotBlank(orderNew.getParentNo())) {
|
|
if (StringUtils.isNotBlank(orderNew.getParentNo())) {
|
|
orderParam.setnStatus(OrderStatusEnum.SERVICE.getCode());
|
|
orderParam.setnStatus(OrderStatusEnum.SERVICE.getCode());
|