|
|
|
@@ -2,14 +2,19 @@ package com.iformall.controller.market; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.annotation.SystemControllerLog; |
|
|
|
import com.iformall.annotation.TenantIgnore; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.controller.base.BaseController; |
|
|
|
import com.iformall.domain.po.base.BaseEntity; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.domain.po.WxCoupon; |
|
|
|
import com.iformall.domain.po.WxCouponPassword; |
|
|
|
import com.iformall.domain.vo.WxCouponPasswordCountInfoVO; |
|
|
|
import com.iformall.domain.vo.WxCouponPasswordVo; |
|
|
|
import com.iformall.enums.EnumCouponPasswordStatus; |
|
|
|
import com.iformall.enums.EnumCouponSubsidyType; |
|
|
|
import com.iformall.enums.EnumYesOrNo; |
|
|
|
import com.iformall.service.WxCouponPasswordService; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
@@ -112,6 +117,25 @@ public class WxCouponPasswordController extends BaseController { |
|
|
|
} |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
@TenantIgnore |
|
|
|
@ApiOperation("后置设置金额") |
|
|
|
@PostMapping("setPrice") |
|
|
|
public ResultData setPrice(@RequestBody WxCouponPassword wxCouponPassword) { |
|
|
|
wxCouponPassword.updateTenantInfo(getTenantInfo()); |
|
|
|
WxCouponPassword couponPassword = wxCouponPasswordService.getById(wxCouponPassword.getId()); |
|
|
|
if (null == couponPassword ) { |
|
|
|
return new ResultData(ResultData.ERROR, "卡密未查询到。"+wxCouponPassword.getId()); |
|
|
|
} |
|
|
|
if (couponPassword.getIsStop().intValue() == EnumYesOrNo.YES.getCode().intValue() ) { |
|
|
|
return new ResultData(ResultData.ERROR, "已停用,不能设置。"); |
|
|
|
} |
|
|
|
if (couponPassword.getPrice() > 0 ) { |
|
|
|
return new ResultData(ResultData.ERROR, "已设置面额,不能再次设置面额。"); |
|
|
|
} |
|
|
|
wxCouponPasswordService.setPrice(couponPassword); |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |