修复JSR380不能生效的问题
This commit is contained in:
parent
32c51c1f62
commit
a419b3d405
@ -6,6 +6,7 @@ import com.xhpc.board.domain.QueryUserListResponse;
|
||||
import com.xhpc.board.service.XhpcMessageBoardService;
|
||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -48,7 +49,7 @@ public class XhpcMessageBoardController {
|
||||
* @since version-1.0
|
||||
*/
|
||||
@GetMapping("/user/list")
|
||||
public AjaxResult queryUserList(QueryUserListRequest param) throws Exception {
|
||||
public AjaxResult queryUserList(@Validated QueryUserListRequest param) throws Exception {
|
||||
|
||||
QueryUserListResponse queryUserListResponse = xhpcMessageBoardService.queryUserList(param);
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ import javax.validation.constraints.NotNull;
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
|
||||
public class QueryUserListRequest {
|
||||
|
||||
/**
|
||||
@ -33,31 +34,28 @@ public class QueryUserListRequest {
|
||||
* currentPage
|
||||
*/
|
||||
@JsonProperty("currentPage")
|
||||
@NotNull(message = "currentPage的参数名不正确或者currentPage的值为空,检查传入参数")
|
||||
@NotBlank(message = "currentPage的参数为''字符串,请检查传入参数")
|
||||
@NotNull(message = "currentPage的参数名不正确或者currentPage的值为空,请检查传入参数")
|
||||
@Min(value = 1, message = "分页参数最小为1")
|
||||
private Integer currentPage;
|
||||
/**
|
||||
* items
|
||||
*/
|
||||
@JsonProperty("items")
|
||||
@NotNull(message = "items的参数名不正确或者items的值为空,检查传入参数")
|
||||
@NotBlank(message = "items的参数为''字符串,请检查传入参数")
|
||||
@NotNull(message = "items的参数名不正确或者items的值为空,请检查传入参数")
|
||||
@Min(value = 1, message = "每页显示至少1条数据")
|
||||
private Integer items;
|
||||
/**
|
||||
* tenantId
|
||||
*/
|
||||
@JsonProperty("tenantId")
|
||||
@NotNull(message = "tenantId的参数名不正确或者tenantId的值为空,检查传入参数")
|
||||
@NotNull(message = "tenantId的参数名不正确或者tenantId的值为空,请检查传入参数")
|
||||
@NotBlank(message = "tenantId的参数为''字符串,请检查传入参数")
|
||||
private String tenantId;
|
||||
/**
|
||||
* tenantType
|
||||
*/
|
||||
@JsonProperty("tenantType")
|
||||
@NotNull(message = "tenantType的参数名不正确或者tenantType的值为空,检查传入参数")
|
||||
@NotBlank(message = "tenantType的参数为''字符串,请检查传入参数")
|
||||
@NotNull(message = "tenantType的参数名不正确或者tenantType的值为空,请检查传入参数")
|
||||
private Integer tenantType;
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user