|
|
|
@@ -2,6 +2,7 @@ package com.iformall.controller.market; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.annotation.SystemControllerLog; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.controller.base.BaseController; |
|
|
|
import com.iformall.domain.po.base.BaseEntity; |
|
|
|
@@ -15,10 +16,7 @@ import io.swagger.annotations.ApiOperation; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author gongbiao |
|
|
|
@@ -59,5 +57,27 @@ public class WxCouponPasswordController extends BaseController { |
|
|
|
return new ResultData(page); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "卡密延期", notes = "{\"couponId\":\"string\", \"expireDate\":\"string\"}") |
|
|
|
@PostMapping("/postpone") |
|
|
|
@SystemControllerLog(description = "卡密延期") |
|
|
|
public ResultData postpone(@RequestBody WxCouponPassword wxCouponPassword) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxCouponPasswordController::postpone"); |
|
|
|
if (wxCouponPassword.getCouponId() == null) { |
|
|
|
logger.error("couponId不能为空: "); |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
} |
|
|
|
WxCouponPassword couponPassword = new WxCouponPassword(); |
|
|
|
couponPassword.updateTenantInfo(getTenantInfo()); |
|
|
|
couponPassword.setCouponId(wxCouponPassword.getCouponId()); |
|
|
|
couponPassword.setExpireDate(wxCouponPassword.getExpireDate()); |
|
|
|
try { |
|
|
|
wxCouponPasswordService.postpone(couponPassword); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
return new ResultData(ErrorCode.COUPON_PASSWORD_POSTPONE_ERR); |
|
|
|
} |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |