BO类去掉在ID字段上的@NotNull校验
This commit is contained in:
parent
f2a3dfa070
commit
716c422a27
12
pom.xml
12
pom.xml
@ -28,7 +28,7 @@
|
|||||||
<pagehelper.version>5.3.3</pagehelper.version>
|
<pagehelper.version>5.3.3</pagehelper.version>
|
||||||
<fastjson.version>2.0.34</fastjson.version>
|
<fastjson.version>2.0.34</fastjson.version>
|
||||||
<oshi.version>6.4.4</oshi.version>
|
<oshi.version>6.4.4</oshi.version>
|
||||||
<commons.io.version>2.13.0</commons.io.version>
|
<!-- <commons.io.version>2.13.0</commons.io.version>-->
|
||||||
<commons.collections.version>3.2.2</commons.collections.version>
|
<commons.collections.version>3.2.2</commons.collections.version>
|
||||||
<poi.version>5.2.3</poi.version>
|
<poi.version>5.2.3</poi.version>
|
||||||
<easyexcel.version>3.3.2</easyexcel.version>
|
<easyexcel.version>3.3.2</easyexcel.version>
|
||||||
@ -198,11 +198,11 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- io常用工具类 -->
|
<!-- io常用工具类 -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>commons-io</groupId>
|
<!-- <groupId>commons-io</groupId>-->
|
||||||
<artifactId>commons-io</artifactId>
|
<!-- <artifactId>commons-io</artifactId>-->
|
||||||
<version>${commons.io.version}</version>
|
<!-- <version>${commons.io.version}</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- excel工具 -->
|
<!-- excel工具 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -61,10 +61,10 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- io常用工具类 -->
|
<!-- io常用工具类 -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>commons-io</groupId>
|
<!-- <groupId>commons-io</groupId>-->
|
||||||
<artifactId>commons-io</artifactId>
|
<!-- <artifactId>commons-io</artifactId>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- excel工具 -->
|
<!-- excel工具 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -110,6 +110,20 @@ public class SysConfigController extends BaseController {
|
|||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据参数键名修改参数配置
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:config:edit")
|
||||||
|
@Log(title = "参数管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/updateByKey")
|
||||||
|
public R<Void> updateByKey(@RequestBody SysConfigBo config) {
|
||||||
|
boolean updated = configService.updateConfig(config);
|
||||||
|
if (!updated) {
|
||||||
|
R.fail("修改参数'" + config.getConfigName() + "'失败!");
|
||||||
|
}
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除参数配置
|
* 删除参数配置
|
||||||
*/
|
*/
|
||||||
|
@ -24,7 +24,6 @@ public class SysClientBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "id不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,7 +24,6 @@ public class SysConfigBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 参数主键
|
* 参数主键
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "参数主键不能为空", groups = { EditGroup.class })
|
|
||||||
private Long configId;
|
private Long configId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,7 +26,6 @@ public class SysDeptBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "部门id不能为空", groups = { EditGroup.class })
|
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,7 +6,6 @@ import com.ruoyi.common.orm.core.domain.BaseEntity;
|
|||||||
import com.ruoyi.system.domain.SysDictData;
|
import com.ruoyi.system.domain.SysDictData;
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@ -25,7 +24,6 @@ public class SysDictDataBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 字典编码
|
* 字典编码
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "字典编码不能为空", groups = { EditGroup.class })
|
|
||||||
private Long dictCode;
|
private Long dictCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,7 +6,6 @@ import com.ruoyi.common.orm.core.domain.BaseEntity;
|
|||||||
import com.ruoyi.system.domain.SysDictType;
|
import com.ruoyi.system.domain.SysDictType;
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import jakarta.validation.constraints.Pattern;
|
import jakarta.validation.constraints.Pattern;
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -26,7 +25,6 @@ public class SysDictTypeBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 字典主键
|
* 字典主键
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "字典主键不能为空", groups = { EditGroup.class })
|
|
||||||
private Long dictId;
|
private Long dictId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,7 +26,6 @@ public class SysMenuBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 菜单ID
|
* 菜单ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "菜单ID不能为空", groups = { EditGroup.class })
|
|
||||||
private Long menuId;
|
private Long menuId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,7 +7,6 @@ import com.ruoyi.common.orm.core.domain.BaseEntity;
|
|||||||
import com.ruoyi.system.domain.SysNotice;
|
import com.ruoyi.system.domain.SysNotice;
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@ -26,7 +25,6 @@ public class SysNoticeBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 公告ID
|
* 公告ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "公告ID不能为空", groups = { EditGroup.class })
|
|
||||||
private Long noticeId;
|
private Long noticeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,7 +25,6 @@ public class SysPostBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 岗位ID
|
* 岗位ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "岗位ID不能为空", groups = { EditGroup.class })
|
|
||||||
private Long postId;
|
private Long postId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,7 +28,6 @@ public class SysRoleBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 角色ID
|
* 角色ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "角色ID不能为空", groups = { EditGroup.class })
|
|
||||||
private Long roleId;
|
private Long roleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"vue": "3.2.45",
|
"vue": "3.2.45",
|
||||||
"vue-cropper": "1.0.3",
|
"vue-cropper": "1.0.3",
|
||||||
|
"vue-i18n": "9.2.2",
|
||||||
"vue-router": "4.1.4",
|
"vue-router": "4.1.4",
|
||||||
"vuex": "4.0.2"
|
"vuex": "4.0.2"
|
||||||
},
|
},
|
||||||
|
@ -43,6 +43,18 @@ export function updateConfig(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改参数配置
|
||||||
|
export function updateConfigByKey(key, value) {
|
||||||
|
return request({
|
||||||
|
url: '/system/config/updateByKey',
|
||||||
|
method: 'put',
|
||||||
|
data: {
|
||||||
|
configKey: key,
|
||||||
|
configValue: value
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 删除参数配置
|
// 删除参数配置
|
||||||
export function delConfig(configId) {
|
export function delConfig(configId) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -4,6 +4,7 @@ import { createI18n } from 'vue-i18n';
|
|||||||
// 本地语言包
|
// 本地语言包
|
||||||
import enUSLocale from './en_US';
|
import enUSLocale from './en_US';
|
||||||
import zhCNLocale from './zh_CN';
|
import zhCNLocale from './zh_CN';
|
||||||
|
import {useStorage} from "@vueuse/core";
|
||||||
|
|
||||||
const messages = {
|
const messages = {
|
||||||
zh_CN: {
|
zh_CN: {
|
||||||
|
Loading…
Reference in New Issue
Block a user