BO类去掉在ID字段上的@NotNull校验

This commit is contained in:
dataprince 2023-10-26 09:10:09 +08:00
parent f2a3dfa070
commit 716c422a27
15 changed files with 38 additions and 22 deletions

12
pom.xml
View File

@ -28,7 +28,7 @@
<pagehelper.version>5.3.3</pagehelper.version>
<fastjson.version>2.0.34</fastjson.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>
<poi.version>5.2.3</poi.version>
<easyexcel.version>3.3.2</easyexcel.version>
@ -198,11 +198,11 @@
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>commons-io</groupId>-->
<!-- <artifactId>commons-io</artifactId>-->
<!-- <version>${commons.io.version}</version>-->
<!-- </dependency>-->
<!-- excel工具 -->
<dependency>

View File

@ -61,10 +61,10 @@
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>commons-io</groupId>-->
<!-- <artifactId>commons-io</artifactId>-->
<!-- </dependency>-->
<!-- excel工具 -->
<dependency>

View File

@ -110,6 +110,20 @@ public class SysConfigController extends BaseController {
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();
}
/**
* 删除参数配置
*/

View File

@ -24,7 +24,6 @@ public class SysClientBo extends BaseEntity {
/**
* id
*/
@NotNull(message = "id不能为空", groups = { EditGroup.class })
private Long id;
/**

View File

@ -24,7 +24,6 @@ public class SysConfigBo extends BaseEntity {
/**
* 参数主键
*/
@NotNull(message = "参数主键不能为空", groups = { EditGroup.class })
private Long configId;
/**

View File

@ -26,7 +26,6 @@ public class SysDeptBo extends BaseEntity {
/**
* 部门id
*/
@NotNull(message = "部门id不能为空", groups = { EditGroup.class })
private Long deptId;
/**

View File

@ -6,7 +6,6 @@ import com.ruoyi.common.orm.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysDictData;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -25,7 +24,6 @@ public class SysDictDataBo extends BaseEntity {
/**
* 字典编码
*/
@NotNull(message = "字典编码不能为空", groups = { EditGroup.class })
private Long dictCode;
/**

View File

@ -6,7 +6,6 @@ import com.ruoyi.common.orm.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysDictType;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;
@ -26,7 +25,6 @@ public class SysDictTypeBo extends BaseEntity {
/**
* 字典主键
*/
@NotNull(message = "字典主键不能为空", groups = { EditGroup.class })
private Long dictId;
/**

View File

@ -26,7 +26,6 @@ public class SysMenuBo extends BaseEntity {
/**
* 菜单ID
*/
@NotNull(message = "菜单ID不能为空", groups = { EditGroup.class })
private Long menuId;
/**

View File

@ -7,7 +7,6 @@ import com.ruoyi.common.orm.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysNotice;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -26,7 +25,6 @@ public class SysNoticeBo extends BaseEntity {
/**
* 公告ID
*/
@NotNull(message = "公告ID不能为空", groups = { EditGroup.class })
private Long noticeId;
/**

View File

@ -25,7 +25,6 @@ public class SysPostBo extends BaseEntity {
/**
* 岗位ID
*/
@NotNull(message = "岗位ID不能为空", groups = { EditGroup.class })
private Long postId;
/**

View File

@ -28,7 +28,6 @@ public class SysRoleBo extends BaseEntity {
/**
* 角色ID
*/
@NotNull(message = "角色ID不能为空", groups = { EditGroup.class })
private Long roleId;
/**

View File

@ -50,6 +50,7 @@
"nprogress": "0.2.0",
"vue": "3.2.45",
"vue-cropper": "1.0.3",
"vue-i18n": "9.2.2",
"vue-router": "4.1.4",
"vuex": "4.0.2"
},

View File

@ -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) {
return request({

View File

@ -4,6 +4,7 @@ import { createI18n } from 'vue-i18n';
// 本地语言包
import enUSLocale from './en_US';
import zhCNLocale from './zh_CN';
import {useStorage} from "@vueuse/core";
const messages = {
zh_CN: {