|
|
|
@@ -20,6 +20,7 @@ import com.iformall.domain.vo.WxCouponPasswordCountInfoVO; |
|
|
|
import com.iformall.domain.vo.WxCouponPasswordVo; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.WxCardInfoService; |
|
|
|
import com.iformall.service.WxCouponPasswordService; |
|
|
|
import com.iformall.utils.Constant; |
|
|
|
|
|
|
|
@@ -66,6 +67,8 @@ public class WxCouponPasswordController extends BaseController { |
|
|
|
private AsyncTask asyncTask; |
|
|
|
@Autowired |
|
|
|
private String fmUploadDir; |
|
|
|
@Autowired |
|
|
|
private WxCardInfoService wxCardInfoService; |
|
|
|
|
|
|
|
@ApiOperation("分页列表接口") |
|
|
|
@GetMapping("/list") |
|
|
|
@@ -203,8 +206,10 @@ public class WxCouponPasswordController extends BaseController { |
|
|
|
if (couponPassword.getIsStop().intValue() == EnumYesOrNo.YES.getCode().intValue() ) { |
|
|
|
return new ResultData(ResultData.ERROR, "已停用,不能设置。"); |
|
|
|
} |
|
|
|
if (couponPassword.getPrice() > 0 ) { |
|
|
|
return new ResultData(ResultData.ERROR, "已设置面额,不能再次设置面额。"); |
|
|
|
//已经绑定了的不能设置 |
|
|
|
WxCardInfo cardInfo = wxCardInfoService.getByCouponPasswordId(wxCouponPassword.getId(), wxCouponPassword); |
|
|
|
if (null != cardInfo) { |
|
|
|
return new ResultData(ResultData.ERROR, "卡已绑定,不能再次设置面额。"); |
|
|
|
} |
|
|
|
wxCouponPasswordService.setPrice(wxCouponPassword); |
|
|
|
return new ResultData(); |
|
|
|
|