数据字典,新增动态SQL
This commit is contained in:
parent
7f2bac7d76
commit
097194fe00
|
|
@ -275,6 +275,8 @@ create table sys_dict_type
|
||||||
id bigint IDENTITY NOT NULL,
|
id bigint IDENTITY NOT NULL,
|
||||||
dict_type varchar(100),
|
dict_type varchar(100),
|
||||||
dict_name varchar(255),
|
dict_name varchar(255),
|
||||||
|
dict_source int default 0,
|
||||||
|
dict_sql varchar(500),
|
||||||
remark varchar(255),
|
remark varchar(255),
|
||||||
sort int,
|
sort int,
|
||||||
version int,
|
version int,
|
||||||
|
|
@ -290,6 +292,8 @@ COMMENT ON TABLE sys_dict_type IS '字典类型';
|
||||||
COMMENT ON COLUMN sys_dict_type.id IS 'id';
|
COMMENT ON COLUMN sys_dict_type.id IS 'id';
|
||||||
COMMENT ON COLUMN sys_dict_type.dict_type IS '字典类型';
|
COMMENT ON COLUMN sys_dict_type.dict_type IS '字典类型';
|
||||||
COMMENT ON COLUMN sys_dict_type.dict_name IS '字典名称';
|
COMMENT ON COLUMN sys_dict_type.dict_name IS '字典名称';
|
||||||
|
COMMENT ON COLUMN sys_dict_type.dict_source IS '来源 0:字典数据 1:动态SQL';
|
||||||
|
COMMENT ON COLUMN sys_dict_type.dict_sql IS '动态SQL';
|
||||||
COMMENT ON COLUMN sys_dict_type.remark IS '备注';
|
COMMENT ON COLUMN sys_dict_type.remark IS '备注';
|
||||||
COMMENT ON COLUMN sys_dict_type.sort IS '排序';
|
COMMENT ON COLUMN sys_dict_type.sort IS '排序';
|
||||||
COMMENT ON COLUMN sys_dict_type.version IS '版本号';
|
COMMENT ON COLUMN sys_dict_type.version IS '版本号';
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,8 @@ create table sys_dict_type
|
||||||
id bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
|
id bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||||
dict_type varchar(100) NOT NULL COMMENT '字典类型',
|
dict_type varchar(100) NOT NULL COMMENT '字典类型',
|
||||||
dict_name varchar(255) NOT NULL COMMENT '字典名称',
|
dict_name varchar(255) NOT NULL COMMENT '字典名称',
|
||||||
|
dict_source tinyint default 0 COMMENT '来源 0:字典数据 1:动态SQL',
|
||||||
|
dict_sql varchar(500) COMMENT '动态SQL',
|
||||||
remark varchar(255) COMMENT '备注',
|
remark varchar(255) COMMENT '备注',
|
||||||
sort int COMMENT '排序',
|
sort int COMMENT '排序',
|
||||||
version int COMMENT '版本号',
|
version int COMMENT '版本号',
|
||||||
|
|
|
||||||
|
|
@ -275,6 +275,8 @@ create table sys_dict_type
|
||||||
id bigserial NOT NULL,
|
id bigserial NOT NULL,
|
||||||
dict_type varchar(100),
|
dict_type varchar(100),
|
||||||
dict_name varchar(255),
|
dict_name varchar(255),
|
||||||
|
dict_source int default 0,
|
||||||
|
dict_sql varchar(500),
|
||||||
remark varchar(255),
|
remark varchar(255),
|
||||||
sort int,
|
sort int,
|
||||||
version int,
|
version int,
|
||||||
|
|
@ -290,6 +292,8 @@ COMMENT ON TABLE sys_dict_type IS '字典类型';
|
||||||
COMMENT ON COLUMN sys_dict_type.id IS 'id';
|
COMMENT ON COLUMN sys_dict_type.id IS 'id';
|
||||||
COMMENT ON COLUMN sys_dict_type.dict_type IS '字典类型';
|
COMMENT ON COLUMN sys_dict_type.dict_type IS '字典类型';
|
||||||
COMMENT ON COLUMN sys_dict_type.dict_name IS '字典名称';
|
COMMENT ON COLUMN sys_dict_type.dict_name IS '字典名称';
|
||||||
|
COMMENT ON COLUMN sys_dict_type.dict_source IS '来源 0:字典数据 1:动态SQL';
|
||||||
|
COMMENT ON COLUMN sys_dict_type.dict_sql IS '动态SQL';
|
||||||
COMMENT ON COLUMN sys_dict_type.remark IS '备注';
|
COMMENT ON COLUMN sys_dict_type.remark IS '备注';
|
||||||
COMMENT ON COLUMN sys_dict_type.sort IS '排序';
|
COMMENT ON COLUMN sys_dict_type.sort IS '排序';
|
||||||
COMMENT ON COLUMN sys_dict_type.version IS '版本号';
|
COMMENT ON COLUMN sys_dict_type.version IS '版本号';
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ import net.maku.framework.common.page.PageResult;
|
||||||
import net.maku.framework.common.utils.Result;
|
import net.maku.framework.common.utils.Result;
|
||||||
import net.maku.system.convert.SysDictTypeConvert;
|
import net.maku.system.convert.SysDictTypeConvert;
|
||||||
import net.maku.system.entity.SysDictTypeEntity;
|
import net.maku.system.entity.SysDictTypeEntity;
|
||||||
import net.maku.system.service.SysDictTypeService;
|
|
||||||
import net.maku.system.vo.SysDictVO;
|
|
||||||
import net.maku.system.query.SysDictTypeQuery;
|
import net.maku.system.query.SysDictTypeQuery;
|
||||||
|
import net.maku.system.service.SysDictTypeService;
|
||||||
import net.maku.system.vo.SysDictTypeVO;
|
import net.maku.system.vo.SysDictTypeVO;
|
||||||
|
import net.maku.system.vo.SysDictVO;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("sys/dict/type")
|
@RequestMapping("sys/dict/type")
|
||||||
@Tag(name="字典类型")
|
@Tag(name = "字典类型")
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class SysDictTypeController {
|
public class SysDictTypeController {
|
||||||
private final SysDictTypeService sysDictTypeService;
|
private final SysDictTypeService sysDictTypeService;
|
||||||
|
|
@ -32,16 +32,27 @@ public class SysDictTypeController {
|
||||||
@GetMapping("page")
|
@GetMapping("page")
|
||||||
@Operation(summary = "分页")
|
@Operation(summary = "分页")
|
||||||
@PreAuthorize("hasAuthority('sys:dict:page')")
|
@PreAuthorize("hasAuthority('sys:dict:page')")
|
||||||
public Result<PageResult<SysDictTypeVO>> page(@Valid SysDictTypeQuery query){
|
public Result<PageResult<SysDictTypeVO>> page(@Valid SysDictTypeQuery query) {
|
||||||
PageResult<SysDictTypeVO> page = sysDictTypeService.page(query);
|
PageResult<SysDictTypeVO> page = sysDictTypeService.page(query);
|
||||||
|
|
||||||
return Result.ok(page);
|
return Result.ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("list/sql")
|
||||||
|
@Operation(summary = "动态SQL数据")
|
||||||
|
@PreAuthorize("hasAuthority('sys:dict:page')")
|
||||||
|
public Result<PageResult<SysDictVO.DictData>> listSql(Long id) {
|
||||||
|
List<SysDictVO.DictData> list = sysDictTypeService.getDictSql(id);
|
||||||
|
|
||||||
|
PageResult<SysDictVO.DictData> page = new PageResult<>(list, list.size());
|
||||||
|
|
||||||
|
return Result.ok(page);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("{id}")
|
@GetMapping("{id}")
|
||||||
@Operation(summary = "信息")
|
@Operation(summary = "信息")
|
||||||
@PreAuthorize("hasAuthority('sys:dict:info')")
|
@PreAuthorize("hasAuthority('sys:dict:info')")
|
||||||
public Result<SysDictTypeVO> get(@PathVariable("id") Long id){
|
public Result<SysDictTypeVO> get(@PathVariable("id") Long id) {
|
||||||
SysDictTypeEntity entity = sysDictTypeService.getById(id);
|
SysDictTypeEntity entity = sysDictTypeService.getById(id);
|
||||||
|
|
||||||
return Result.ok(SysDictTypeConvert.INSTANCE.convert(entity));
|
return Result.ok(SysDictTypeConvert.INSTANCE.convert(entity));
|
||||||
|
|
@ -50,7 +61,7 @@ public class SysDictTypeController {
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Operation(summary = "保存")
|
@Operation(summary = "保存")
|
||||||
@PreAuthorize("hasAuthority('sys:dict:save')")
|
@PreAuthorize("hasAuthority('sys:dict:save')")
|
||||||
public Result<String> save(@RequestBody @Valid SysDictTypeVO vo){
|
public Result<String> save(@RequestBody @Valid SysDictTypeVO vo) {
|
||||||
sysDictTypeService.save(vo);
|
sysDictTypeService.save(vo);
|
||||||
|
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
|
|
@ -59,7 +70,7 @@ public class SysDictTypeController {
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
@PreAuthorize("hasAuthority('sys:dict:update')")
|
@PreAuthorize("hasAuthority('sys:dict:update')")
|
||||||
public Result<String> update(@RequestBody @Valid SysDictTypeVO vo){
|
public Result<String> update(@RequestBody @Valid SysDictTypeVO vo) {
|
||||||
sysDictTypeService.update(vo);
|
sysDictTypeService.update(vo);
|
||||||
|
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
|
|
@ -68,7 +79,7 @@ public class SysDictTypeController {
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
@Operation(summary = "删除")
|
@Operation(summary = "删除")
|
||||||
@PreAuthorize("hasAuthority('sys:dict:delete')")
|
@PreAuthorize("hasAuthority('sys:dict:delete')")
|
||||||
public Result<String> delete(@RequestBody List<Long> idList){
|
public Result<String> delete(@RequestBody List<Long> idList) {
|
||||||
sysDictTypeService.delete(idList);
|
sysDictTypeService.delete(idList);
|
||||||
|
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
|
|
@ -76,7 +87,7 @@ public class SysDictTypeController {
|
||||||
|
|
||||||
@GetMapping("all")
|
@GetMapping("all")
|
||||||
@Operation(summary = "全部字典数据")
|
@Operation(summary = "全部字典数据")
|
||||||
public Result<List<SysDictVO>> all(){
|
public Result<List<SysDictVO>> all() {
|
||||||
List<SysDictVO> dictList = sysDictTypeService.getDictList();
|
List<SysDictVO> dictList = sysDictTypeService.getDictList();
|
||||||
|
|
||||||
return Result.ok(dictList);
|
return Result.ok(dictList);
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,5 @@ import java.util.List;
|
||||||
public interface SysDictDataDao extends BaseDao<SysDictDataEntity> {
|
public interface SysDictDataDao extends BaseDao<SysDictDataEntity> {
|
||||||
|
|
||||||
@Select("${sql}")
|
@Select("${sql}")
|
||||||
List<SysDictVO.DictData> selectListForSql(@Param("sql") String sql);
|
List<SysDictVO.DictData> getListForSql(@Param("sql") String sql);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,28 +14,28 @@ import net.maku.framework.common.entity.BaseEntity;
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@TableName("sys_dict_type")
|
@TableName("sys_dict_type")
|
||||||
public class SysDictTypeEntity extends BaseEntity {
|
public class SysDictTypeEntity extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 字典类型
|
* 字典类型
|
||||||
*/
|
*/
|
||||||
private String dictType;
|
private String dictType;
|
||||||
/**
|
/**
|
||||||
* 字典名称
|
* 字典名称
|
||||||
*/
|
*/
|
||||||
private String dictName;
|
private String dictName;
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
*/
|
*/
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
/**
|
/**
|
||||||
* 类型:1 静态常量 2 动态SQL
|
* 来源 0:字典数据 1:动态SQL
|
||||||
*/
|
*/
|
||||||
private Integer type;
|
private Integer dictSource;
|
||||||
/**
|
/**
|
||||||
* 动态sql
|
* 动态sql
|
||||||
*/
|
*/
|
||||||
private String sourceSql;
|
private String dictSql;
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package net.maku.system.enums;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典数据来源
|
||||||
|
*
|
||||||
|
* @author 阿沐 babamu@126.com
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum DictSourceEnum {
|
||||||
|
/**
|
||||||
|
* 字典数据
|
||||||
|
*/
|
||||||
|
DICT(0),
|
||||||
|
/**
|
||||||
|
* 动态SQL
|
||||||
|
*/
|
||||||
|
SQL(1);
|
||||||
|
|
||||||
|
private final int value;
|
||||||
|
}
|
||||||
|
|
@ -3,9 +3,9 @@ package net.maku.system.service;
|
||||||
import net.maku.framework.common.page.PageResult;
|
import net.maku.framework.common.page.PageResult;
|
||||||
import net.maku.framework.common.service.BaseService;
|
import net.maku.framework.common.service.BaseService;
|
||||||
import net.maku.system.entity.SysDictTypeEntity;
|
import net.maku.system.entity.SysDictTypeEntity;
|
||||||
import net.maku.system.vo.SysDictVO;
|
|
||||||
import net.maku.system.query.SysDictTypeQuery;
|
import net.maku.system.query.SysDictTypeQuery;
|
||||||
import net.maku.system.vo.SysDictTypeVO;
|
import net.maku.system.vo.SysDictTypeVO;
|
||||||
|
import net.maku.system.vo.SysDictVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -25,6 +25,11 @@ public interface SysDictTypeService extends BaseService<SysDictTypeEntity> {
|
||||||
void delete(List<Long> idList);
|
void delete(List<Long> idList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 获取动态SQL数据
|
||||||
|
*/
|
||||||
|
List<SysDictVO.DictData> getDictSql(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
* 获取全部字典列表
|
* 获取全部字典列表
|
||||||
*/
|
*/
|
||||||
List<SysDictVO> getDictList();
|
List<SysDictVO> getDictList();
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import net.maku.framework.common.exception.ServerException;
|
||||||
import net.maku.framework.common.page.PageResult;
|
import net.maku.framework.common.page.PageResult;
|
||||||
import net.maku.framework.common.service.impl.BaseServiceImpl;
|
import net.maku.framework.common.service.impl.BaseServiceImpl;
|
||||||
import net.maku.system.convert.SysDictTypeConvert;
|
import net.maku.system.convert.SysDictTypeConvert;
|
||||||
|
|
@ -14,11 +15,11 @@ import net.maku.system.dao.SysDictDataDao;
|
||||||
import net.maku.system.dao.SysDictTypeDao;
|
import net.maku.system.dao.SysDictTypeDao;
|
||||||
import net.maku.system.entity.SysDictDataEntity;
|
import net.maku.system.entity.SysDictDataEntity;
|
||||||
import net.maku.system.entity.SysDictTypeEntity;
|
import net.maku.system.entity.SysDictTypeEntity;
|
||||||
import net.maku.system.service.SysDictTypeService;
|
import net.maku.system.enums.DictSourceEnum;
|
||||||
import net.maku.system.vo.SysDictVO;
|
|
||||||
import net.maku.system.query.SysDictTypeQuery;
|
import net.maku.system.query.SysDictTypeQuery;
|
||||||
|
import net.maku.system.service.SysDictTypeService;
|
||||||
import net.maku.system.vo.SysDictTypeVO;
|
import net.maku.system.vo.SysDictTypeVO;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import net.maku.system.vo.SysDictVO;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
@ -41,7 +42,7 @@ public class SysDictTypeServiceImpl extends BaseServiceImpl<SysDictTypeDao, SysD
|
||||||
return new PageResult<>(SysDictTypeConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
return new PageResult<>(SysDictTypeConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
private Wrapper<SysDictTypeEntity> getWrapper(SysDictTypeQuery query){
|
private Wrapper<SysDictTypeEntity> getWrapper(SysDictTypeQuery query) {
|
||||||
LambdaQueryWrapper<SysDictTypeEntity> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SysDictTypeEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.like(StrUtil.isNotBlank(query.getDictType()), SysDictTypeEntity::getDictType, query.getDictType());
|
wrapper.like(StrUtil.isNotBlank(query.getDictType()), SysDictTypeEntity::getDictType, query.getDictType());
|
||||||
wrapper.like(StrUtil.isNotBlank(query.getDictName()), SysDictTypeEntity::getDictName, query.getDictName());
|
wrapper.like(StrUtil.isNotBlank(query.getDictName()), SysDictTypeEntity::getDictName, query.getDictName());
|
||||||
|
|
@ -73,6 +74,16 @@ public class SysDictTypeServiceImpl extends BaseServiceImpl<SysDictTypeDao, SysD
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
public List<SysDictVO.DictData> getDictSql(Long id) {
|
||||||
|
SysDictTypeEntity entity = this.getById(id);
|
||||||
|
try {
|
||||||
|
return sysDictDataDao.getListForSql(entity.getDictSql());
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServerException("动态SQL执行失败,请检查SQL是否正确!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public List<SysDictVO> getDictList() {
|
public List<SysDictVO> getDictList() {
|
||||||
// 全部字典类型列表
|
// 全部字典类型列表
|
||||||
List<SysDictTypeEntity> typeList = this.list(Wrappers.emptyWrapper());
|
List<SysDictTypeEntity> typeList = this.list(Wrappers.emptyWrapper());
|
||||||
|
|
@ -83,25 +94,24 @@ public class SysDictTypeServiceImpl extends BaseServiceImpl<SysDictTypeDao, SysD
|
||||||
|
|
||||||
// 全部字典列表
|
// 全部字典列表
|
||||||
List<SysDictVO> dictList = new ArrayList<>(typeList.size());
|
List<SysDictVO> dictList = new ArrayList<>(typeList.size());
|
||||||
for (SysDictTypeEntity type : typeList){
|
for (SysDictTypeEntity type : typeList) {
|
||||||
SysDictVO dict = new SysDictVO();
|
SysDictVO dict = new SysDictVO();
|
||||||
dict.setDictType(type.getDictType());
|
dict.setDictType(type.getDictType());
|
||||||
|
|
||||||
for (SysDictDataEntity data : dataList){
|
for (SysDictDataEntity data : dataList) {
|
||||||
if(type.getId().equals(data.getDictTypeId())){
|
if (type.getId().equals(data.getDictTypeId())) {
|
||||||
dict.getDataList().add(new SysDictVO.DictData(data.getDictLabel(), data.getDictValue()));
|
dict.getDataList().add(new SysDictVO.DictData(data.getDictLabel(), data.getDictValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type.getType() == 2){
|
// 数据来源动态SQL
|
||||||
|
if (type.getDictSource() == DictSourceEnum.SQL.getValue()) {
|
||||||
// 增加动态列表
|
// 增加动态列表
|
||||||
String sql = type.getSourceSql();
|
String sql = type.getDictSql();
|
||||||
if(StringUtils.isNotBlank(sql)){
|
try {
|
||||||
try {
|
dict.setDataList(sysDictDataDao.getListForSql(sql));
|
||||||
dict.setDataList(sysDictDataDao.selectListForSql(sql));
|
} catch (Exception e) {
|
||||||
} catch (Exception e) {
|
log.error("增加动态字典异常: type=" + type, e);
|
||||||
log.error("增加动态字典异常: type=" + type, e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,37 +18,37 @@ import java.util.Date;
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "字典类型")
|
@Schema(description = "字典类型")
|
||||||
public class SysDictTypeVO implements Serializable {
|
public class SysDictTypeVO implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Schema(description = "id")
|
@Schema(description = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "字典类型", required = true)
|
@Schema(description = "字典类型", required = true)
|
||||||
@NotBlank(message = "字典类型不能为空")
|
@NotBlank(message = "字典类型不能为空")
|
||||||
private String dictType;
|
private String dictType;
|
||||||
|
|
||||||
@Schema(description = "字典名称", required = true)
|
@Schema(description = "字典名称", required = true)
|
||||||
@NotBlank(message = "字典名称不能为空")
|
@NotBlank(message = "字典名称不能为空")
|
||||||
private String dictName;
|
private String dictName;
|
||||||
|
|
||||||
@Schema(description = "备注")
|
@Schema(description = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@Schema(description = "排序", required = true)
|
@Schema(description = "排序", required = true)
|
||||||
@Min(value = 0, message = "排序值不能小于0")
|
@Min(value = 0, message = "排序值不能小于0")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
@Schema(description = "创建时间")
|
||||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
@Schema(description = "更新时间")
|
@Schema(description = "更新时间")
|
||||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
@Schema(description = "类型:1 静态常量 2 动态SQL")
|
@Schema(description = "来源 0:字典数据 1:动态SQL")
|
||||||
private Integer type;
|
private Integer dictSource;
|
||||||
|
|
||||||
@Schema(description = "动态sql")
|
@Schema(description = "动态sql")
|
||||||
private String sourceSql;
|
private String dictSql;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user