Skip to content

Commit

Permalink
fix(extension/crud): 修复 DictField 映射错误
Browse files Browse the repository at this point in the history
Closes #IADTTC
  • Loading branch information
Charles7c committed Jul 18, 2024
1 parent dca7157 commit 65cfe91
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ public List<LabelValueResp> listDict(Q query, SortQuery sortQuery) {
List<T> entityList = baseMapper.selectList(queryWrapper);
// 解析映射
Map<String, String> fieldMapping = MapUtil.newHashMap(2);
fieldMapping.put(dictField.labelKey(), "label");
fieldMapping.put(dictField.valueKey(), "value");
fieldMapping.put(CharSequenceUtil.toCamelCase(dictField.labelKey()), "label");
fieldMapping.put(CharSequenceUtil.toCamelCase(dictField.valueKey()), "value");
return BeanUtil.copyToList(entityList, LabelValueResp.class, CopyOptions.create()
.setFieldMapping(fieldMapping));
}
Expand Down

0 comments on commit 65cfe91

Please sign in to comment.