【system】整理校验组,去掉group1-5

pull/3/head
fengshuonan 2021-01-01 22:18:18 +08:00
parent 2e19f3f42c
commit 07c579699d
4 changed files with 16 additions and 44 deletions

View File

@ -99,34 +99,4 @@ public class BaseRequest implements Serializable {
public @interface updateStatus {
}
/**
* 1
*/
public @interface groupOne {
}
/**
* 2
*/
public @interface groupTwo {
}
/**
* 3
*/
public @interface groupThree {
}
/**
* 4
*/
public @interface groupFour {
}
/**
* 5
*/
public @interface groupFive {
}
}

View File

@ -3,7 +3,6 @@ package cn.stylefeng.roses.kernel.timer.modular.controller;
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.resource.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.timer.modular.param.SysTimersParam;
@ -71,7 +70,7 @@ public class SysTimersController {
* @date 2020/7/1 14:34
*/
@PostResource(name = "启动定时任务", path = "/sysTimers/start")
public ResponseData start(@RequestBody @Validated(BaseRequest.groupOne.class) SysTimersParam sysTimersParam) {
public ResponseData start(@RequestBody @Validated(SysTimersParam.startTimer.class) SysTimersParam sysTimersParam) {
sysTimersService.start(sysTimersParam);
return new SuccessResponseData();
}
@ -83,7 +82,7 @@ public class SysTimersController {
* @date 2020/7/1 14:34
*/
@PostResource(name = "停止定时任务", path = "/sysTimers/stop")
public ResponseData stop(@RequestBody @Validated(BaseRequest.groupOne.class) SysTimersParam sysTimersParam) {
public ResponseData stop(@RequestBody @Validated(SysTimersParam.stopTimer.class) SysTimersParam sysTimersParam) {
sysTimersService.stop(sysTimersParam);
return new SuccessResponseData();
}

View File

@ -20,7 +20,7 @@ public class SysTimersParam extends BaseRequest {
/**
* id
*/
@NotNull(message = "主键timerId不能为空", groups = {edit.class, detail.class, delete.class, groupOne.class})
@NotNull(message = "主键timerId不能为空", groups = {edit.class, detail.class, delete.class, startTimer.class, stopTimer.class})
private Long timerId;
/**
@ -51,4 +51,16 @@ public class SysTimersParam extends BaseRequest {
*/
private String remark;
/**
*
*/
public @interface startTimer {
}
/**
*
*/
public @interface stopTimer {
}
}

View File

@ -26,7 +26,7 @@ public class SysUserRequest extends BaseRequest {
/**
*
*/
@NotNull(message = "userId不能为空", groups = {edit.class, delete.class, detail.class, start.class, stop.class, grantRole.class, grantData.class, updateInfo.class, updatePwd.class, resetPwd.class, changeStatus.class, updateAvatar.class})
@NotNull(message = "userId不能为空", groups = {edit.class, delete.class, detail.class, grantRole.class, grantData.class, updateInfo.class, updatePwd.class, resetPwd.class, changeStatus.class, updateAvatar.class})
private Long userId;
/**
@ -136,63 +136,54 @@ public class SysUserRequest extends BaseRequest {
*
*/
public @interface updatePwd {
}
/**
*
*/
public @interface resetPwd {
}
/**
*
*/
public @interface updateAvatar {
}
/**
*
*/
public @interface stop {
}
/**
*
*/
public @interface start {
}
/**
*
*/
public @interface updateInfo {
}
/**
*
*/
public @interface grantRole {
}
/**
*
*/
public @interface grantData {
}
/**
*
*/
public @interface changeStatus {
}
}