日志备份功能
This commit is contained in:
parent
58043280ee
commit
5f53206f33
|
|
@ -138,7 +138,7 @@ public class SysPostController extends BaseController
|
|||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return error("系统异常");
|
||||
return error("人力资源已分配,不能删除");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -92,4 +92,6 @@ public interface SysDictDataMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
|
||||
|
||||
int getdictDatasInfo(String dictType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,14 +73,15 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
|
|||
@Override
|
||||
public List<SysDictData> selectDictDataByType(String dictType)
|
||||
{
|
||||
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
|
||||
if (StringUtils.isNotEmpty(dictDatas))
|
||||
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
|
||||
/* if (StringUtils.isNotEmpty(dictDatas))
|
||||
{
|
||||
return dictDatas;
|
||||
}
|
||||
dictDatas = dictDataMapper.selectDictDataByType(dictType);
|
||||
if (StringUtils.isNotEmpty(dictDatas))
|
||||
}*/
|
||||
int count =dictDataMapper.getdictDatasInfo(dictType);
|
||||
if (count>0)
|
||||
{
|
||||
dictDatas = dictDataMapper.selectDictDataByType(dictType);
|
||||
DictUtils.setDictCache(dictType, dictDatas);
|
||||
return dictDatas;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="countDictDataByType" resultType="Integer">
|
||||
select count(1) from sys_dict_data where dict_type=#{dictType}
|
||||
</select>
|
||||
<select id="getdictDatasInfo" resultType="java.lang.Integer">
|
||||
select count(1) from sys_dict_type where dict_type=#{dictType} and status = '0'
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictDataById" parameterType="Long">
|
||||
delete from sys_dict_data where dict_code = #{dictCode}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND post_name like concat('%', #{postName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
order by post_sort
|
||||
</select>
|
||||
|
||||
<select id="selectPostAll" resultMap="SysPostResult">
|
||||
|
|
|
|||
Loading…
Reference in New Issue