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>
|
||||
<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>
|
||||
|
@ -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>
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除参数配置
|
||||
*/
|
||||
|
@ -24,7 +24,6 @@ public class SysClientBo extends BaseEntity {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotNull(message = "id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@ -24,7 +24,6 @@ public class SysConfigBo extends BaseEntity {
|
||||
/**
|
||||
* 参数主键
|
||||
*/
|
||||
@NotNull(message = "参数主键不能为空", groups = { EditGroup.class })
|
||||
private Long configId;
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,6 @@ public class SysDeptBo extends BaseEntity {
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@NotNull(message = "部门id不能为空", groups = { EditGroup.class })
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,6 @@ public class SysMenuBo extends BaseEntity {
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@NotNull(message = "菜单ID不能为空", groups = { EditGroup.class })
|
||||
private Long menuId;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -25,7 +25,6 @@ public class SysPostBo extends BaseEntity {
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
@NotNull(message = "岗位ID不能为空", groups = { EditGroup.class })
|
||||
private Long postId;
|
||||
|
||||
/**
|
||||
|
@ -28,7 +28,6 @@ public class SysRoleBo extends BaseEntity {
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
@NotNull(message = "角色ID不能为空", groups = { EditGroup.class })
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
|
@ -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"
|
||||
},
|
||||
|
@ -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({
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user