|
|
|
@@ -137,7 +137,7 @@ public class WxCouponChannelController extends BaseController { |
|
|
|
@SystemControllerLog(description = "设置渠道库存") |
|
|
|
public ResultData setChannelStock(@RequestBody WxCouponChannel wxCouponChannel) { |
|
|
|
if (null == wxCouponChannel.getChannelStock() || wxCouponChannel.getChannelStock() <= 0) { |
|
|
|
return new ResultData(Result.ERROR, "库存未设置或者库存小于0, 如不需要可点击释放库存."); |
|
|
|
return new ResultData(Result.ERROR, "库存未设置或者库存小于0, 如不需要可点击解除锁定库存."); |
|
|
|
} |
|
|
|
wxCouponChannel.updateTenantInfo(getTenantInfo()); |
|
|
|
WxCoupon coupon = wxCouponService.getById(wxCouponChannel.getCouponId(), wxCouponChannel.getTenantId()); |
|
|
|
@@ -150,7 +150,7 @@ public class WxCouponChannelController extends BaseController { |
|
|
|
return new ResultData(Result.SUCCESS, "设置成功", ""); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("释放锁定库存") |
|
|
|
@ApiOperation("解除锁定库存") |
|
|
|
@PostMapping("/releaseChannelStock") |
|
|
|
@SystemControllerLog(description = "释放渠道锁定库存") |
|
|
|
public ResultData releaseChannelStock(@RequestBody WxCouponChannel wxCouponChannel) { |
|
|
|
@@ -164,14 +164,24 @@ public class WxCouponChannelController extends BaseController { |
|
|
|
@ApiOperation("设置价格") |
|
|
|
@PostMapping("/setChannelPrice") |
|
|
|
@SystemControllerLog(description = "设置渠道价格") |
|
|
|
public ResultData findChannelByCouponId(@RequestBody WxCouponChannel wxCouponChannel) { |
|
|
|
if (null != wxCouponChannel.getChannelPrice() && wxCouponChannel.getChannelPrice() <= 0) { |
|
|
|
return new ResultData(Result.ERROR, "价格不能小于0, 如不需要可设置为空."); |
|
|
|
public ResultData setChannelPrice(@RequestBody WxCouponChannel wxCouponChannel) { |
|
|
|
if (null == wxCouponChannel.getChannelPrice() || wxCouponChannel.getChannelPrice() < 0) { |
|
|
|
return new ResultData(Result.ERROR, "价格未设置或者价格小于0, 如不需要可点击解除价格设置."); |
|
|
|
} |
|
|
|
wxCouponChannel.updateTenantInfo(getTenantInfo()); |
|
|
|
wxCouponChannelService.setChannelPrice(wxCouponChannel); |
|
|
|
return new ResultData(Result.SUCCESS, "设置成功", ""); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("解除价格设置") |
|
|
|
@PostMapping("/releaseSetChannelPrice") |
|
|
|
@SystemControllerLog(description = "设置渠道价格") |
|
|
|
public ResultData releaseSetChannelPrice(@RequestBody WxCouponChannel wxCouponChannel) { |
|
|
|
wxCouponChannel.setChannelPrice(null); |
|
|
|
wxCouponChannel.updateTenantInfo(getTenantInfo()); |
|
|
|
wxCouponChannelService.setChannelPrice(wxCouponChannel); |
|
|
|
return new ResultData(Result.SUCCESS, "设置成功", ""); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |