|
|
@@ -77,11 +77,17 @@ public class WxCouponSendController extends BaseController { |
|
|
@ApiImplicitParam(name = "sendType", value = "注券类型(生日券=8)", dataType = "int", paramType = "query", required = true), |
|
|
@ApiImplicitParam(name = "sendType", value = "注券类型(生日券=8)", dataType = "int", paramType = "query", required = true), |
|
|
}) |
|
|
}) |
|
|
@SystemControllerLog(description = "注券-添加或更新配置") |
|
|
@SystemControllerLog(description = "注券-添加或更新配置") |
|
|
public ResultData addConfig(@NotNull Integer beforeDays, @NotNull Integer sendType) { |
|
|
|
|
|
|
|
|
public ResultData addConfig(Integer beforeDays, Integer sendType) { |
|
|
if(!Objects.equals(sendType,EnumCouponSendSendType.BIRTHDAY.getCode())) { |
|
|
if(!Objects.equals(sendType,EnumCouponSendSendType.BIRTHDAY.getCode())) { |
|
|
return new ResultData(ErrorCode.COUPON_VALID_NOT_SUPPORTED); |
|
|
return new ResultData(ErrorCode.COUPON_VALID_NOT_SUPPORTED); |
|
|
} |
|
|
} |
|
|
wxCouponSendService.saveOrUpdateConfig(beforeDays, sendType, getTenantId()); |
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
wxCouponSendService.saveOrUpdateConfig(beforeDays, sendType, getTenantId()); |
|
|
|
|
|
} catch (MallinkException e) { |
|
|
|
|
|
return new ResultData(e.getErrorCode(), e.getMessage()); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR, e.getMessage()); |
|
|
|
|
|
} |
|
|
return new ResultData(); |
|
|
return new ResultData(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -90,7 +96,7 @@ public class WxCouponSendController extends BaseController { |
|
|
@ApiImplicitParams({ |
|
|
@ApiImplicitParams({ |
|
|
@ApiImplicitParam(name = "sendType", value = "注券类型(生日券=8)", dataType = "int", paramType = "query", required = true)}) |
|
|
@ApiImplicitParam(name = "sendType", value = "注券类型(生日券=8)", dataType = "int", paramType = "query", required = true)}) |
|
|
@SystemControllerLog(description = "注券-获取配置") |
|
|
@SystemControllerLog(description = "注券-获取配置") |
|
|
public ResultData getConfig(@NotNull Integer sendType) { |
|
|
|
|
|
|
|
|
public ResultData getConfig(Integer sendType) { |
|
|
WxCouponSend wxCouponSend = wxCouponSendService.getConfig(sendType, getTenantId()); |
|
|
WxCouponSend wxCouponSend = wxCouponSendService.getConfig(sendType, getTenantId()); |
|
|
return new ResultData(Objects.isNull(wxCouponSend) ? null : wxCouponSend.getConditions()); |
|
|
return new ResultData(Objects.isNull(wxCouponSend) ? null : wxCouponSend.getConditions()); |
|
|
} |
|
|
} |
|
|
|