mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-11 05:19:00 +08:00
♻️ Refactoring code.dict的type改为dictType
This commit is contained in:
1 parent
944a45ce9a
commit
300e9e6779
3 files changed
+3
-3
No files matched your search
+1
-1
@@ -67,7 +67,7 @@ public class SysDictItem extends Model<SysDictItem> {
|
||||
* 类型
|
||||
*/
|
||||
@ApiModelProperty(value = "类型")
|
||||
private String type;
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ public class SysDictController {
|
||||
@GetMapping("/type/{type}")
|
||||
@Cacheable(value = CacheConstants.DICT_DETAILS, key = "#type", unless = "#result.data.isEmpty()")
|
||||
public R getDictByType(@PathVariable String type) {
|
||||
return R.ok(sysDictItemService.list(Wrappers.<SysDictItem>query().lambda().eq(SysDictItem::getType, type)));
|
||||
return R.ok(sysDictItemService.list(Wrappers.<SysDictItem>query().lambda().eq(SysDictItem::getDictType, type)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
dictService.saveBatch(dictList.stream().peek(d -> d.setId(null)).collect(Collectors.toList()));
|
||||
// 处理字典项最新关联的字典ID
|
||||
List<SysDictItem> itemList = dictList.stream().flatMap(dict -> dictItemList.stream()
|
||||
.filter(item -> item.getType().equals(dict.getDictType())).peek(item -> {
|
||||
.filter(item -> item.getDictType().equals(dict.getDictType())).peek(item -> {
|
||||
item.setDictId(dict.getId());
|
||||
item.setId(null);
|
||||
})).collect(Collectors.toList());
|
||||
|
||||
Reference in new issue
Block a user