修改字典同步修改数据

This commit is contained in:
RuoYi
2018-07-23 20:34:01 +08:00
parent 58b4a50fdb
commit ef5687b71c
12 changed files with 23 additions and 23 deletions

View File

@ -87,4 +87,13 @@ public interface DictDataMapper
*/
public int updateDictData(DictData dictData);
/**
* 同步修改字典类型
*
* @param oldDictType 旧字典类型
* @param newDictType 新旧字典类型
* @return 结果
*/
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
}

View File

@ -117,6 +117,8 @@ public class DictTypeServiceImpl implements IDictTypeService
public int updateDictType(DictType dictType)
{
dictType.setUpdateBy(ShiroUtils.getLoginName());
DictType oldDict = dictTypeMapper.selectDictTypeById(dictType.getDictId());
dictDataMapper.updateDictDataType(oldDict.getDictType(), dictType.getDictType());
return dictTypeMapper.updateDictType(dictType);
}