opt:1.Param中@NotBlank和@NotNull国际化。2.音量设置接口。
This commit is contained in:
@@ -14,13 +14,13 @@ public class QueryErrorInfoPageParam {
|
||||
/**
|
||||
* 当前页
|
||||
*/
|
||||
@NotNull(message = "当前页不能为空")
|
||||
@NotNull(message = "{validation_page_num_empty}")
|
||||
private Integer pageNum;
|
||||
|
||||
/**
|
||||
* 页大小
|
||||
*/
|
||||
@NotNull(message = "页大小不能为空")
|
||||
@NotNull(message = "{validation_page_size_empty}")
|
||||
private Integer pageSize;
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,10 +43,10 @@ public class DeptVo extends BaseDTO implements Serializable {
|
||||
private Integer dept_sort;
|
||||
|
||||
|
||||
@NotBlank
|
||||
@NotBlank(message = "{validation_dept_name_empty}")
|
||||
private String name;
|
||||
|
||||
@NotNull
|
||||
@NotNull(message = "{validation_dept_is_used_empty}")
|
||||
private Boolean is_used;
|
||||
|
||||
private Long pid;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class RoleVo implements Serializable {
|
||||
|
||||
private Long role_id;
|
||||
|
||||
@NotBlank
|
||||
@NotBlank(message = "{validation_role_name_empty}")
|
||||
private String name;
|
||||
|
||||
private Integer level = 3;
|
||||
|
||||
@@ -14,24 +14,24 @@ public class GenerateQRCodeParam {
|
||||
/**
|
||||
* 房间号
|
||||
*/
|
||||
@NotBlank(message = "房间号不能为空")
|
||||
@NotBlank(message = "{validation_room_empty}")
|
||||
private String room;
|
||||
|
||||
/**
|
||||
* 二维码内容(文本/URL/WiFi配置等)
|
||||
*/
|
||||
@NotBlank(message = "二维码内容不能为空")
|
||||
@NotBlank(message = "{validation_qrcode_data_empty}")
|
||||
private String data;
|
||||
|
||||
/**
|
||||
* 二维码宽度(像素)
|
||||
*/
|
||||
@NotNull(message = "二维码宽度不能为空")
|
||||
@NotNull(message = "{validation_qrcode_width_empty}")
|
||||
private Integer width;
|
||||
|
||||
/**
|
||||
* 二维码高度(像素)
|
||||
*/
|
||||
@NotNull(message = "二维码高度不能为空")
|
||||
@NotNull(message = "{validation_qrcode_height_empty}")
|
||||
private Integer height;
|
||||
}
|
||||
|
||||
@@ -13,13 +13,13 @@ public class QueryQRCodeParam {
|
||||
/**
|
||||
* 当前页
|
||||
*/
|
||||
@NotNull(message = "当前页不能为空")
|
||||
@NotNull(message = "{validation_page_num_empty}")
|
||||
private Integer pageNum;
|
||||
|
||||
/**
|
||||
* 页大小
|
||||
*/
|
||||
@NotNull(message = "页大小不能为空")
|
||||
@NotNull(message = "{validation_page_size_empty}")
|
||||
private Integer pageSize;
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,37 +14,37 @@ public class UpdateQRCodeParam {
|
||||
/**
|
||||
* 二维码标识
|
||||
*/
|
||||
@NotBlank(message = "二维码标识不能为空")
|
||||
@NotBlank(message = "{validation_qrcode_id_empty}")
|
||||
private String qrcode_id;
|
||||
|
||||
/**
|
||||
* 修改之前的房间号
|
||||
*/
|
||||
@NotBlank(message = "修改之前的房间号不能为空")
|
||||
@NotBlank(message = "{validation_old_room_empty}")
|
||||
private String oldRoom;
|
||||
|
||||
/**
|
||||
* 修改之后的房间号
|
||||
*/
|
||||
@NotBlank(message = "修改之后的房间号不能为空")
|
||||
@NotBlank(message = "{validation_new_room_empty}")
|
||||
private String newRoom;
|
||||
|
||||
/**
|
||||
* 二维码内容
|
||||
*/
|
||||
@NotBlank(message = "二维码内容不能为空")
|
||||
@NotBlank(message = "{validation_qrcode_data_empty}")
|
||||
private String qrcode_data;
|
||||
|
||||
/**
|
||||
* 二维码宽度(像素)
|
||||
*/
|
||||
@NotNull(message = "二维码宽度不能为空")
|
||||
@NotNull(message = "{validation_qrcode_width_empty}")
|
||||
private Integer qrcode_width;
|
||||
|
||||
/**
|
||||
* 二维码高度(像素)
|
||||
*/
|
||||
@NotNull(message = "二维码高度不能为空")
|
||||
@NotNull(message = "{validation_qrcode_height_empty}")
|
||||
private Integer qrcode_height;
|
||||
|
||||
|
||||
|
||||
@@ -154,11 +154,16 @@ public class QRCodeServiceImpl implements QRCodeService {
|
||||
|
||||
@Override
|
||||
public WebResponse createTask(TaskRequestParam qrCodeTaskRequestParam) {
|
||||
// 判断该目标点是否存在任务,如果已存在则不能继续下发
|
||||
if (taskAPI.queryTaskInfoByDestination(qrCodeTaskRequestParam.getDestinations())){
|
||||
throw new BadRequestException(LangProcess.msg("qrcode_create_failed_exists_task"));
|
||||
}
|
||||
String mode = settingAPI.querySettingParamByCode("mode").getJSONObject("data").getString("value");
|
||||
// 判断是否在巡航模式 再巡航模式不能下发二维码任务
|
||||
if ("1".equals(mode)){
|
||||
throw new BadRequestException(LangProcess.msg("qrcode_create_failed_mode"));
|
||||
}
|
||||
|
||||
return taskAPI.createTask(qrCodeTaskRequestParam, TaskSourceEnum.QRCODE.getName());
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,6 @@ public class SecurityParam {
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@NotBlank(message = "密码不能为空")
|
||||
@NotBlank(message = "{validation_password_empty}")
|
||||
private String password;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user