|
|
|
@@ -62,13 +62,7 @@ public class WxCouponSendController extends BaseController { |
|
|
|
if (null == wxCouponSend) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); |
|
|
|
} |
|
|
|
wxCouponSend.setTenantId(getTenantId()); |
|
|
|
wxCouponSend.setStatus(EnumCouponSendStatus.VALID.getCode()); |
|
|
|
List<WxCouponSendVo> wxCouponSendList = wxCouponSendService.listAsPage(wxCouponSend, 1, 1).getList(); |
|
|
|
if (wxCouponSendList != null && wxCouponSendList.size() > 0) { |
|
|
|
return new ResultData(ErrorCode.COUPON_SEND_IS_EXISTED); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WxCoupon wxCoupon = wxCouponService.getById(wxCouponSend.getCouponId()); |
|
|
|
if (!wxCoupon.getStatus().equals(EnumCouponStatus.COUPON_STATUS_THROW_IN.getCode()) ){ |
|
|
|
return new ResultData(ErrorCode.COUPON_IS_TAKE_OFF); |
|
|
|
|