字典items结果默认按sort_id排序

This commit is contained in:
mazhicheng 2019-12-28 15:06:09 +08:00
parent b52c54c216
commit 222bd7f124
2 changed files with 2 additions and 6 deletions

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "./mybatis-3-mapper.dtd">
<mapper namespace="com.diboot.core.mapper.DictionaryMapper">
</mapper>

View File

@ -43,7 +43,8 @@ public class DictionaryServiceImpl extends BaseServiceImpl<DictionaryMapper, Dic
Wrapper queryDictionary = new QueryWrapper<Dictionary>().lambda()
.select(Dictionary::getItemName, Dictionary::getItemValue)
.eq(Dictionary::getType, type)
.gt(Dictionary::getParentId, 0);
.gt(Dictionary::getParentId, 0)
.orderByAsc(Dictionary::getSortId);
// 返回构建条件
return getKeyValueList(queryDictionary);
}