记得上下班打卡 | git大法好,push需谨慎

Commit 955f59fd authored by jiangxiulong's avatar jiangxiulong

remind 参数验证

parent 4e050f32
...@@ -9,12 +9,15 @@ import io.swagger.annotations.ApiImplicitParams; ...@@ -9,12 +9,15 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
@Api(tags = "服务号-模版消息") @Api(tags = "服务号-模版消息")
@Slf4j @Slf4j
@Validated
@RestController @RestController
@RequestMapping("/wechatTemplate") @RequestMapping("/wechatTemplate")
public class SweetWechatTemplateController { public class SweetWechatTemplateController {
...@@ -42,9 +45,9 @@ public class SweetWechatTemplateController { ...@@ -42,9 +45,9 @@ public class SweetWechatTemplateController {
@ApiImplicitParam(type = "form", dataType = "String", name = "performancesId", value = "演出ID", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "performancesId", value = "演出ID", required = true),
}) })
public ResponseDto remind( public ResponseDto remind(
@RequestParam() String openId, @RequestParam("openId") @NotBlank(message = "openId不能为空") String openId,
@RequestParam() String unionId, @RequestParam("unionId") @NotBlank(message = "unionId不能为空") String unionId,
@RequestParam() String performancesId @RequestParam("performancesId") @NotBlank(message = "performancesId不能为空") String performancesId
) { ) {
return sweetTemplateService.remind(openId, unionId, performancesId); return sweetTemplateService.remind(openId, unionId, performancesId);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment