use of com.ruoyi.common.core.domain.entity.SysDictType in project wumei-smart by kerwincui.
the class SysDictTypeServiceImpl method loadingDictCache.
/**
* 加载字典缓存数据
*/
@Override
public void loadingDictCache() {
List<SysDictType> dictTypeList = dictTypeMapper.selectDictTypeAll();
for (SysDictType dictType : dictTypeList) {
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dictType.getDictType());
DictUtils.setDictCache(dictType.getDictType(), dictDatas);
}
}
use of com.ruoyi.common.core.domain.entity.SysDictType in project RuoYi-Vue by yangzongzhuan.
the class SysDictTypeServiceImpl method updateDictType.
/**
* 修改保存字典类型信息
*
* @param dict 字典类型信息
* @return 结果
*/
@Override
@Transactional
public int updateDictType(SysDictType dict) {
SysDictType oldDict = dictTypeMapper.selectDictTypeById(dict.getDictId());
dictDataMapper.updateDictDataType(oldDict.getDictType(), dict.getDictType());
int row = dictTypeMapper.updateDictType(dict);
if (row > 0) {
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dict.getDictType());
DictUtils.setDictCache(dict.getDictType(), dictDatas);
}
return row;
}
use of com.ruoyi.common.core.domain.entity.SysDictType in project hocassian-media-matrix by hokaso.
the class SysDictTypeServiceImpl method updateDictType.
/**
* 修改保存字典类型信息
*
* @param dictType 字典类型信息
* @return 结果
*/
@Override
@Transactional
public int updateDictType(SysDictType dictType) {
SysDictType oldDict = dictTypeMapper.selectDictTypeById(dictType.getDictId());
dictDataMapper.updateDictDataType(oldDict.getDictType(), dictType.getDictType());
int row = dictTypeMapper.updateDictType(dictType);
if (row > 0) {
DictUtils.clearDictCache();
}
return row;
}
use of com.ruoyi.common.core.domain.entity.SysDictType in project wumei-smart by kerwincui.
the class SysDictTypeServiceImpl method updateDictType.
/**
* 修改保存字典类型信息
*
* @param dict 字典类型信息
* @return 结果
*/
@Override
@Transactional
public int updateDictType(SysDictType dict) {
SysDictType oldDict = dictTypeMapper.selectDictTypeById(dict.getDictId());
dictDataMapper.updateDictDataType(oldDict.getDictType(), dict.getDictType());
int row = dictTypeMapper.updateDictType(dict);
if (row > 0) {
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dict.getDictType());
DictUtils.setDictCache(dict.getDictType(), dictDatas);
}
return row;
}
use of com.ruoyi.common.core.domain.entity.SysDictType in project wumei-smart by kerwincui.
the class SysDictTypeServiceImpl method checkDictTypeUnique.
/**
* 校验字典类型称是否唯一
*
* @param dict 字典类型
* @return 结果
*/
@Override
public String checkDictTypeUnique(SysDictType dict) {
Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId();
SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType());
if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue()) {
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
}
Aggregations