Commit 7cb014f7 by fengshuonan

更新数据库小写

parent f940da5a
......@@ -285,7 +285,7 @@ public class ConstantFactory implements IConstantFactory {
return null;
} else {
QueryWrapper<Dict> wrapper = new QueryWrapper<>();
List<Dict> dicts = dictMapper.selectList(wrapper.eq("PID", id));
List<Dict> dicts = dictMapper.selectList(wrapper.eq("pid", id));
if (dicts == null || dicts.size() == 0) {
return null;
} else {
......
......@@ -43,8 +43,8 @@ public class DictService extends ServiceImpl<DictMapper, Dict> {
//判断是否已经存在同编码或同名称字典
QueryWrapper<Dict> dictQueryWrapper = new QueryWrapper<>();
dictQueryWrapper
.and(i -> i.eq("CODE", param.getCode()).or().eq("NAME", param.getName()))
.and(i -> i.eq("DICT_TYPE_ID", param.getDictTypeId()));
.and(i -> i.eq("code", param.getCode()).or().eq("name", param.getName()))
.and(i -> i.eq("dict_type_id", param.getDictTypeId()));
List<Dict> list = this.list(dictQueryWrapper);
if (list != null && list.size() > 0) {
throw new ServiceException(BizExceptionEnum.DICT_EXISTED);
......@@ -91,9 +91,9 @@ public class DictService extends ServiceImpl<DictMapper, Dict> {
//判断编码是否重复
QueryWrapper<Dict> wrapper = new QueryWrapper<Dict>()
.and(i -> i.eq("CODE", newEntity.getCode()).or().eq("NAME", newEntity.getName()))
.and(i -> i.ne("DICT_ID", newEntity.getDictId()))
.and(i -> i.eq("DICT_TYPE_ID", param.getDictTypeId()));
.and(i -> i.eq("code", newEntity.getCode()).or().eq("name", newEntity.getName()))
.and(i -> i.ne("dict_id", newEntity.getDictId()))
.and(i -> i.eq("dict_type_id", param.getDictTypeId()));
int dicts = this.count(wrapper);
if (dicts > 0) {
throw new ServiceException(BizExceptionEnum.DICT_EXISTED);
......@@ -133,13 +133,13 @@ public class DictService extends ServiceImpl<DictMapper, Dict> {
*/
public LayuiPageInfo findPageBySpec(DictParam param) {
QueryWrapper<Dict> objectQueryWrapper = new QueryWrapper<>();
objectQueryWrapper.eq("DICT_TYPE_ID", param.getDictTypeId());
objectQueryWrapper.eq("dict_type_id", param.getDictTypeId());
if (ToolUtil.isNotEmpty(param.getCondition())) {
objectQueryWrapper.and(i -> i.eq("CODE", param.getCondition()).or().eq("NAME", param.getCondition()));
objectQueryWrapper.and(i -> i.eq("code", param.getCondition()).or().eq("name", param.getCondition()));
}
objectQueryWrapper.orderByAsc("SORT");
objectQueryWrapper.orderByAsc("sort");
List<Dict> list = this.list(objectQueryWrapper);
......
......@@ -40,7 +40,7 @@ public class DictTypeService extends ServiceImpl<DictTypeMapper, DictType> {
//判断是否已经存在同编码或同名称字典
QueryWrapper<DictType> dictQueryWrapper = new QueryWrapper<>();
dictQueryWrapper.eq("CODE", param.getCode()).or().eq("NAME", param.getName());
dictQueryWrapper.eq("code", param.getCode()).or().eq("name", param.getName());
List<DictType> list = this.list(dictQueryWrapper);
if (list != null && list.size() > 0) {
throw new ServiceException(BizExceptionEnum.DICT_EXISTED);
......@@ -77,8 +77,8 @@ public class DictTypeService extends ServiceImpl<DictTypeMapper, DictType> {
//判断编码是否重复
QueryWrapper<DictType> wrapper = new QueryWrapper<DictType>()
.and(i -> i.eq("CODE", newEntity.getCode()).or().eq("NAME", newEntity.getName()))
.and(i -> i.ne("DICT_TYPE_ID", newEntity.getDictTypeId()));
.and(i -> i.eq("code", newEntity.getCode()).or().eq("name", newEntity.getName()))
.and(i -> i.ne("dict_type_id", newEntity.getDictTypeId()));
int dicts = this.count(wrapper);
if (dicts > 0) {
throw new ServiceException(BizExceptionEnum.DICT_EXISTED);
......@@ -117,16 +117,16 @@ public class DictTypeService extends ServiceImpl<DictTypeMapper, DictType> {
Page pageContext = getPageContext();
QueryWrapper<DictType> objectQueryWrapper = new QueryWrapper<>();
if (ToolUtil.isNotEmpty(param.getCondition())) {
objectQueryWrapper.and(i -> i.eq("CODE", param.getCondition()).or().eq("NAME", param.getCondition()));
objectQueryWrapper.and(i -> i.eq("code", param.getCondition()).or().eq("name", param.getCondition()));
}
if (ToolUtil.isNotEmpty(param.getStatus())) {
objectQueryWrapper.and(i -> i.eq("STATUS", param.getStatus()));
objectQueryWrapper.and(i -> i.eq("status", param.getStatus()));
}
if (ToolUtil.isNotEmpty(param.getSystemFlag())) {
objectQueryWrapper.and(i -> i.eq("SYSTEM_FLAG", param.getSystemFlag()));
objectQueryWrapper.and(i -> i.eq("system_flag", param.getSystemFlag()));
}
pageContext.setAsc("SORT");
pageContext.setAsc("sort");
IPage page = this.page(pageContext, objectQueryWrapper);
return LayuiPageFactory.createPageInfo(page);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment