Finish Task #4531 Cost:4h 修复复制合同开票单位错误
This commit is contained in:
parent
026a6e86db
commit
8179745776
@ -252,7 +252,23 @@ public class InternationalServiceImpl extends ServiceImpl<InternationalMapper, I
|
||||
return list.stream()
|
||||
.collect(Collectors.groupingBy(el -> StrUtil.subBefore(el.getCode(),
|
||||
".",
|
||||
false), Collectors.toMap(International::getCode, International::getName)));
|
||||
false), Collectors.toMap(el -> StrUtil.subAfter(el.getCode(),
|
||||
".",
|
||||
false), International::getName)));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
International international = new International();
|
||||
international.setCode("client.msg");
|
||||
international.setName("客户端");
|
||||
List<International> list = Arrays.asList(international);
|
||||
Map<String, Map<String, String>> collect = list.stream()
|
||||
.collect(Collectors.groupingBy(el -> StrUtil.subBefore(el.getCode(),
|
||||
".",
|
||||
false), Collectors.toMap(el -> StrUtil.subAfter(el.getCode(),
|
||||
".",
|
||||
false), International::getName)));
|
||||
System.out.println(collect);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -269,7 +285,7 @@ public class InternationalServiceImpl extends ServiceImpl<InternationalMapper, I
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
boolean flag = saveBatch(list);
|
||||
if(flag){
|
||||
if (flag) {
|
||||
RedisUtil.hashMultiSet(sourceLang, list);
|
||||
}
|
||||
return flag;
|
||||
|
Loading…
x
Reference in New Issue
Block a user