|
|
|
@@ -6,6 +6,7 @@ import com.iformall.domain.po.WxCUser; |
|
|
|
import com.iformall.domain.po.WxCoupon; |
|
|
|
import com.iformall.domain.po.WxOrder; |
|
|
|
import com.iformall.enums.EnumOrderPressStatus; |
|
|
|
import com.iformall.enums.EnumOrderStatus; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.WxCouponService; |
|
|
|
import com.iformall.service.WxOrderPressService; |
|
|
|
@@ -77,6 +78,21 @@ public class WxPressOrderController extends BaseController { |
|
|
|
return new ResultData(ErrorCode.COUPON_PRESS_IS_OVERTIME); |
|
|
|
} |
|
|
|
|
|
|
|
if(order.getOrderStatus().equals(EnumOrderStatus.ORDER_STATUS_PAYMENT_SUCCESS.getCode())) { |
|
|
|
logger.error("砍价已支付:" + orderId); |
|
|
|
return new ResultData(ErrorCode.ORDER_HAD_PAY); |
|
|
|
} |
|
|
|
|
|
|
|
if(order.getOrderStatus().equals(EnumOrderStatus.ORDER_STATUS_PRESS_COMPLETE.getCode())) { |
|
|
|
logger.error("砍价已完成:" + orderId); |
|
|
|
return new ResultData(ErrorCode.ORDER_PRESS_IS_COMPLETE); |
|
|
|
} |
|
|
|
|
|
|
|
if(order.getOrderStatus().equals(EnumOrderStatus.ORDER_STATUS_PRESS_CANCEL.getCode())) { |
|
|
|
logger.error("砍价已取消:" + orderId); |
|
|
|
return new ResultData(ErrorCode.ORDER_HAD_CANCEL); |
|
|
|
} |
|
|
|
|
|
|
|
if(order.getPressCurrentNum() + 1 > coupon.getPressLimitNum()) { |
|
|
|
logger.error("砍价已结束:" + orderId); |
|
|
|
return new ResultData(ErrorCode.COUPON_PRESS_HAD_FINISHED); |
|
|
|
|