|
|
|
@@ -10,6 +10,7 @@ import com.iformall.domain.vo.WxCouponOrderCVo; |
|
|
|
import com.iformall.enums.EnumCouponChannelActivityStatus; |
|
|
|
import com.iformall.enums.EnumCouponOrderStatus; |
|
|
|
import com.iformall.enums.EnumCouponOrderValidStatus; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.WxCouponOrderService; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
@@ -84,7 +85,15 @@ public class WxCouponOrderController extends BaseController { |
|
|
|
if (couponOrderId == null) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
} |
|
|
|
WxCouponOrderCVo wxCouponOrderCVo = wxCouponOrderService.detailCUserVo(getUser().getId(), couponOrderId); |
|
|
|
WxCouponOrderCVo wxCouponOrderCVo = wxCouponOrderService.detailCUserVo(couponOrderId); |
|
|
|
|
|
|
|
if (wxCouponOrderCVo == null) { |
|
|
|
return new ResultData(ErrorCode.COUPON_ORDER_IS_NULL); |
|
|
|
} |
|
|
|
|
|
|
|
if (!wxCouponOrderCVo.getCUserId().equals(getUserId())) { |
|
|
|
return new ResultData(ErrorCode.COUPON_ORDER_IS_NULL); |
|
|
|
} |
|
|
|
Date now = new Date(); |
|
|
|
if (wxCouponOrderCVo.getValidStartDate() != null && wxCouponOrderCVo.getValidEndDate() != null ) { |
|
|
|
if (wxCouponOrderCVo.getValidStartDate().getTime() > now.getTime()) { |
|
|
|
|