Просмотр исходного кода

[修改]会员生日,测试任务执行

release_toaliyun_real
Burce 6 лет назад
Родитель
Сommit
6b057bca91
2 измененных файлов: 10 добавлений и 4 удалений
  1. +9
    -3
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponSendController.java
  2. +1
    -1
      mallinkSchedule/src/main/java/com/iformall/schedule/CouponSendSchedule.java

+ 9
- 3
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponSendController.java Просмотреть файл

@@ -77,11 +77,17 @@ public class WxCouponSendController extends BaseController {
@ApiImplicitParam(name = "sendType", value = "注券类型(生日券=8)", dataType = "int", paramType = "query", required = true),
})
@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())) {
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();
}

@@ -90,7 +96,7 @@ public class WxCouponSendController extends BaseController {
@ApiImplicitParams({
@ApiImplicitParam(name = "sendType", value = "注券类型(生日券=8)", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "注券-获取配置")
public ResultData getConfig(@NotNull Integer sendType) {
public ResultData getConfig(Integer sendType) {
WxCouponSend wxCouponSend = wxCouponSendService.getConfig(sendType, getTenantId());
return new ResultData(Objects.isNull(wxCouponSend) ? null : wxCouponSend.getConditions());
}


+ 1
- 1
mallinkSchedule/src/main/java/com/iformall/schedule/CouponSendSchedule.java Просмотреть файл

@@ -211,7 +211,7 @@ public class CouponSendSchedule {
/**
* 生日券发放
*/
@Scheduled(cron = "0 30 14 * * ?") // 测试每天8:30点发券
@Scheduled(cron = "0 30 15 * * ?") // 测试每天8:30点发券
public void birthdayCouponSendSchedule() {
logger.info("生日发券: 任务开始");
List<WxMall> mallList = wxMallMapper.findList(new WxMall());


Загрузка…
Отмена
Сохранить