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

Commit 2d0e8d77 authored by 胡佳晨's avatar 胡佳晨

修改 参数验证 config-dev的rabbitmq

parent 50255531
...@@ -8,13 +8,13 @@ import javax.validation.constraints.NotNull; ...@@ -8,13 +8,13 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class PayAgainParam { public class PayAgainParam {
@ApiModelProperty(value = "订单id") @ApiModelProperty(value = "订单id")
@NotNull(message = "必传") @NotNull(message = "订单id不能为空")
private String orderId; private String orderId;
@ApiModelProperty(value = "支付类型") @ApiModelProperty(value = "支付类型")
@NotNull(message = "必传") @NotNull(message = "支付类型不能为空")
private String payType; private String payType;
@ApiModelProperty(value = "支付来源") @ApiModelProperty(value = "支付来源")
@NotNull(message = "必传") @NotNull(message = "支付来源不能为空")
private String deviceFrom; private String deviceFrom;
@ApiModelProperty(value = "openId") @ApiModelProperty(value = "openId")
private String openId; private String openId;
......
...@@ -14,17 +14,18 @@ import java.util.List; ...@@ -14,17 +14,18 @@ import java.util.List;
@Data @Data
public class PayOrderParam { public class PayOrderParam {
@ApiModelProperty(value = "演出id") @ApiModelProperty(value = "演出id")
@NotNull(message = "必传") @NotNull(message = "演出id不能为空")
private String performanceId; private String performanceId;
@ApiModelProperty(value = "场次id") @ApiModelProperty(value = "场次id")
@NotNull(message = "必传") @NotNull(message = "场次id不能为空")
private String timeId; private String timeId;
@ApiModelProperty(value = "票种id") @ApiModelProperty(value = "票种id")
@NotNull(message = "票种id不能为空")
@NotNull(message = "必传") @NotNull(message = "必传")
private String ticketId; private String ticketId;
@ApiModelProperty(value = "数量") @ApiModelProperty(value = "数量")
@NotNull(message = "必传") @NotNull(message = "数量不能为空")
@Min(value = 1,message = "太小了") @Min(value = 1,message = "不能小于0")
private Integer number; private Integer number;
// @ApiModelProperty(value = "是否学生票") // @ApiModelProperty(value = "是否学生票")
...@@ -40,18 +41,20 @@ public class PayOrderParam { ...@@ -40,18 +41,20 @@ public class PayOrderParam {
@ApiModelProperty(value = "入场人id数组") @ApiModelProperty(value = "入场人id数组")
private List<String> enterIdList; private List<String> enterIdList;
@ApiModelProperty(value = "代理id") @ApiModelProperty(value = "代理id")
@NotNull(message = "必传") @NotNull(message = "代理id不能为空")
private String agentId; private String agentId;
@ApiModelProperty(value = "快递类型 1寄付 2到付") @ApiModelProperty(value = "快递类型 1寄付 2到付")
@NotNull(message = "必传") @NotNull(message = "快递方式不能为空")
@Max(2)
@Max(1)
private Integer expressType; private Integer expressType;
@ApiModelProperty(value = "支付类型") @ApiModelProperty(value = "支付类型")
@NotNull(message = "必传") @NotNull(message = "支付类型不能为空")
private String payType; private String payType;
@ApiModelProperty(value = "支付来源") @ApiModelProperty(value = "支付来源")
@NotNull(message = "必传") @NotNull(message = "支付来源")
private String deviceFrom; private String deviceFrom;
@ApiModelProperty(value = "openId") @ApiModelProperty(value = "openId")
private String openId; private String openId;
......
...@@ -79,7 +79,7 @@ public class KylinOrderTicketsController { ...@@ -79,7 +79,7 @@ public class KylinOrderTicketsController {
@GetMapping("checkPayment") @GetMapping("checkPayment")
@ApiOperation("订单状态") @ApiOperation("订单状态")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<HashMap> checkOrderResult(@RequestParam("orderId") @NotNull String orderId) { public ResponseDto<HashMap> checkOrderResult(@RequestParam("orderId") @NotNull(message = "订单id不能为空") String orderId) {
Integer status = orderTicketsService.checkOrderResult(orderId).getData(); Integer status = orderTicketsService.checkOrderResult(orderId).getData();
HashMap<String,Integer> map = new HashMap<>(); HashMap<String,Integer> map = new HashMap<>();
map.put("status",status); map.put("status",status);
......
...@@ -13,6 +13,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -13,6 +13,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponse;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
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.constraints.Min; import javax.validation.constraints.Min;
...@@ -29,6 +30,7 @@ import javax.validation.constraints.NotNull; ...@@ -29,6 +30,7 @@ import javax.validation.constraints.NotNull;
@Api(tags = "第三方-验票账号") @Api(tags = "第三方-验票账号")
@RestController @RestController
@RequestMapping("partner/checkUser") @RequestMapping("partner/checkUser")
@Validated
public class KylinCheckUserPartnerController { public class KylinCheckUserPartnerController {
@Autowired @Autowired
......
...@@ -13,6 +13,7 @@ import io.swagger.annotations.Api; ...@@ -13,6 +13,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponse;
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;
...@@ -33,6 +34,7 @@ import java.util.List; ...@@ -33,6 +34,7 @@ import java.util.List;
@Api(tags = "第三方-验票账号关联演出") @Api(tags = "第三方-验票账号关联演出")
@RestController @RestController
@RequestMapping("partner/checkUser/performance") @RequestMapping("partner/checkUser/performance")
@Validated
public class KylinCheckUserPerformancesPartnerController { public class KylinCheckUserPerformancesPartnerController {
@Autowired @Autowired
......
...@@ -9,6 +9,7 @@ import io.swagger.annotations.Api; ...@@ -9,6 +9,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponse;
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;
...@@ -25,6 +26,7 @@ import javax.validation.constraints.NotNull; ...@@ -25,6 +26,7 @@ import javax.validation.constraints.NotNull;
@Api(tags = "第三方-场次",position = 1002) @Api(tags = "第三方-场次",position = 1002)
@RestController @RestController
@RequestMapping("partner/times") @RequestMapping("partner/times")
@Validated
public class KylinTicketTimesPartnerController { public class KylinTicketTimesPartnerController {
@Autowired @Autowired
......
...@@ -9,6 +9,7 @@ import io.swagger.annotations.Api; ...@@ -9,6 +9,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponse;
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;
...@@ -25,6 +26,7 @@ import javax.validation.constraints.NotNull; ...@@ -25,6 +26,7 @@ import javax.validation.constraints.NotNull;
@Api(tags = "第三方-票",position = 1003) @Api(tags = "第三方-票",position = 1003)
@RestController @RestController
@RequestMapping("partner/ticket") @RequestMapping("partner/ticket")
@Validated
public class KylinTicketsPartnerController { public class KylinTicketsPartnerController {
@Autowired @Autowired
......
...@@ -9,6 +9,7 @@ import io.swagger.annotations.Api; ...@@ -9,6 +9,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponse;
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;
...@@ -19,6 +20,7 @@ import java.util.Map; ...@@ -19,6 +20,7 @@ import java.util.Map;
@Api(tags = "第三方-演出",position = 1001) @Api(tags = "第三方-演出",position = 1001)
@RestController @RestController
@RequestMapping("partner/performance") @RequestMapping("partner/performance")
@Validated
public class PerformancePartnerController { public class PerformancePartnerController {
@Autowired @Autowired
......
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