【8.0】【config】整理字典和配置的基础类

pull/57/head
fengshuonan 2023-07-10 21:00:43 +08:00
parent 826787f901
commit 555f70c3af
4 changed files with 18 additions and 27 deletions

View File

@ -31,7 +31,6 @@ import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**

View File

@ -298,10 +298,8 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
String searchText = sysConfigParam.getSearchText(); String searchText = sysConfigParam.getSearchText();
if (ObjectUtil.isNotEmpty(searchText)) { if (ObjectUtil.isNotEmpty(searchText)) {
queryWrapper.and(wq -> { queryWrapper.and(wq -> {
wq.like(SysConfig::getConfigName, searchText) wq.like(SysConfig::getConfigName, searchText).or().like(SysConfig::getConfigCode, searchText).or()
.or().like(SysConfig::getConfigCode, searchText) .like(SysConfig::getConfigValue, searchText).or().like(SysConfig::getRemark, searchText);
.or().like(SysConfig::getConfigValue, searchText)
.or().like(SysConfig::getRemark, searchText);
}); });
} }

View File

@ -27,7 +27,6 @@ package cn.stylefeng.roses.kernel.dict.modular.pojo.request;
import cn.stylefeng.roses.kernel.dict.modular.entity.SysDict; import cn.stylefeng.roses.kernel.dict.modular.entity.SysDict;
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription; import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest; import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest.batchDelete;
import cn.stylefeng.roses.kernel.validator.api.validators.status.StatusValue; import cn.stylefeng.roses.kernel.validator.api.validators.status.StatusValue;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@ -141,18 +141,14 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, SysDict> implements
// 填充拼音 // 填充拼音
sysDict.setDictNamePinyin(pinYinApi.parseEveryPinyinFirstLetter(sysDict.getDictName())); sysDict.setDictNamePinyin(pinYinApi.parseEveryPinyinFirstLetter(sysDict.getDictName()));
// 填充pids
//String pids = this.createPids(sysDict.getDictParentId());
//sysDict.setDictPids(pids);
this.updateById(sysDict); this.updateById(sysDict);
} }
@Override @Override
public SysDict detail(DictRequest dictRequest) { public SysDict detail(DictRequest dictRequest) {
SysDict sysDict= this.querySysDict(dictRequest); SysDict sysDict = this.querySysDict(dictRequest);
if(ObjectUtil.isNotEmpty(sysDict.getDictTypeId())) { if (ObjectUtil.isNotEmpty(sysDict.getDictTypeId())) {
SysDictType sysDictType=dictTypeService.getById(sysDict.getDictTypeId()); SysDictType sysDictType = dictTypeService.getById(sysDict.getDictTypeId());
sysDict.setDictTypeName(sysDictType.getDictTypeName()); sysDict.setDictTypeName(sysDictType.getDictTypeName());
} }
return sysDict; return sysDict;
@ -363,9 +359,8 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, SysDict> implements
String searchText = dictRequest.getSearchText(); String searchText = dictRequest.getSearchText();
if (ObjectUtil.isNotEmpty(searchText)) { if (ObjectUtil.isNotEmpty(searchText)) {
queryWrapper.and(wq -> { queryWrapper.and(wq -> {
wq.like(SysDict::getDictName, searchText) wq.like(SysDict::getDictName, searchText).or().like(SysDict::getDictCode, searchText).or()
.or().like(SysDict::getDictCode, searchText) .like(SysDict::getDictNamePinyin, searchText);
.or().like(SysDict::getDictNamePinyin, searchText);
}); });
} }