Browse Source

修复postgresql字典模块类型转换失败的问题

test
smallchill 5 years ago
parent
commit
c08074423d
  1. 5
      blade-service/blade-system/src/main/java/org/springblade/system/controller/DictBizController.java
  2. 5
      blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java
  3. 2
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/DictBizMapper.xml
  4. 2
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/DictMapper.xml

5
blade-service/blade-system/src/main/java/org/springblade/system/controller/DictBizController.java

@ -104,8 +104,9 @@ public class DictBizController extends BladeController {
})
@ApiOperationSupport(order = 4)
@ApiOperation(value = "列表", notes = "传入dict")
public R<IPage<DictBizVO>> childList(@ApiIgnore @RequestParam Map<String, Object> dict, Query query) {
IPage<DictBiz> page = dictService.page(Condition.getPage(query), Condition.getQueryWrapper(dict, DictBiz.class).lambda().orderByAsc(DictBiz::getSort));
public R<IPage<DictBizVO>> childList(@ApiIgnore @RequestParam Map<String, Object> dict, @RequestParam(required = false, defaultValue = "-1") Long parentId, Query query) {
dict.remove("parentId");
IPage<DictBiz> page = dictService.page(Condition.getPage(query), Condition.getQueryWrapper(dict, DictBiz.class).lambda().eq(DictBiz::getParentId, parentId).orderByAsc(DictBiz::getSort));
return R.data(DictBizWrapper.build().pageVO(page));
}

5
blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java

@ -107,8 +107,9 @@ public class DictController extends BladeController {
})
@ApiOperationSupport(order = 4)
@ApiOperation(value = "列表", notes = "传入dict")
public R<IPage<DictVO>> childList(@ApiIgnore @RequestParam Map<String, Object> dict, Query query) {
IPage<Dict> page = dictService.page(Condition.getPage(query), Condition.getQueryWrapper(dict, Dict.class).lambda().orderByAsc(Dict::getSort));
public R<IPage<DictVO>> childList(@ApiIgnore @RequestParam Map<String, Object> dict, @RequestParam(required = false, defaultValue = "-1") Long parentId, Query query) {
dict.remove("parentId");
IPage<Dict> page = dictService.page(Condition.getPage(query), Condition.getQueryWrapper(dict, Dict.class).lambda().eq(Dict::getParentId, parentId).orderByAsc(Dict::getSort));
return R.data(DictWrapper.build().pageVO(page));
}

2
blade-service/blade-system/src/main/java/org/springblade/system/mapper/DictBizMapper.xml

@ -37,7 +37,7 @@
</select>-->
<select id="getList" resultMap="dictResultMap">
select code, dict_key, dict_value, sort, remark from blade_dict_biz where code = #{param1} and dict_key >= 0 and is_sealed = 0 and is_deleted = 0
select code, dict_key, dict_value, sort, remark from blade_dict_biz where code = #{param1} and parent_id > 0 and is_sealed = 0 and is_deleted = 0
</select>
<select id="tree" resultMap="treeNodeResultMap">

2
blade-service/blade-system/src/main/java/org/springblade/system/mapper/DictMapper.xml

@ -40,7 +40,7 @@
</select>-->
<select id="getList" resultMap="dictResultMap">
select code, dict_key, dict_value, sort, remark from blade_dict where code = #{param1} and dict_key >= 0 and is_sealed = 0 and is_deleted = 0
select code, dict_key, dict_value, sort, remark from blade_dict where code = #{param1} and parent_id > 0 and is_sealed = 0 and is_deleted = 0
</select>
<select id="tree" resultMap="treeNodeResultMap">

Loading…
Cancel
Save