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