mirror of https://gitee.com/stylefeng/roses
【DictType】系统配置字典新增
parent
fe243e0709
commit
be021cacea
|
@ -92,6 +92,19 @@ public class DictTypeController {
|
||||||
return new SuccessResponseData(detail);
|
return new SuccessResponseData(detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字典类型详情
|
||||||
|
*
|
||||||
|
* @author fengshuonan
|
||||||
|
* @date 2021/1/13 11:25
|
||||||
|
*/
|
||||||
|
@GetResource(name = "获取字典类型详情", path = "/dictType/getConfigDictTypeDetail", requiredPermission = false)
|
||||||
|
public ResponseData getConfigDictTypeDetail() {
|
||||||
|
SysDictType detail = this.dictTypeService.getConfigDictTypeDetail();
|
||||||
|
return new SuccessResponseData(detail);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取字典类型列表
|
* 获取字典类型列表
|
||||||
*
|
*
|
||||||
|
|
|
@ -91,4 +91,11 @@ public interface DictTypeService extends IService<SysDictType> {
|
||||||
*/
|
*/
|
||||||
SysDictType findDetail(Long dictTypeId);
|
SysDictType findDetail(Long dictTypeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字典详情
|
||||||
|
*
|
||||||
|
* @author huangyao
|
||||||
|
* @date 2021/1/10 17:27
|
||||||
|
*/
|
||||||
|
SysDictType getConfigDictTypeDetail();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.stylefeng.roses.kernel.dict.api.constants.DictConstants.CONFIG_GROUP_DICT_TYPE_CODE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典类型表 服务实现类
|
* 字典类型表 服务实现类
|
||||||
*
|
*
|
||||||
|
@ -175,6 +177,13 @@ public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, SysDictType
|
||||||
return this.baseMapper.findDetail(dictTypeId);
|
return this.baseMapper.findDetail(dictTypeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysDictType getConfigDictTypeDetail() {
|
||||||
|
LambdaQueryWrapper<SysDictType> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(SysDictType::getDictTypeCode, CONFIG_GROUP_DICT_TYPE_CODE);
|
||||||
|
return this.getOne(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验dictTypeClass是否是系统字典,如果是系统字典只能超级管理员操作
|
* 校验dictTypeClass是否是系统字典,如果是系统字典只能超级管理员操作
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue