字符串拼接
This commit is contained in:
@@ -110,7 +110,7 @@ public class SchsystemController {
|
|||||||
.stream().filter(s-> Arrays.asList(schsystemIds).contains(s.getId()))
|
.stream().filter(s-> Arrays.asList(schsystemIds).contains(s.getId()))
|
||||||
.map(s->s.getName()).collect(Collectors.toList());
|
.map(s->s.getName()).collect(Collectors.toList());
|
||||||
|
|
||||||
LogContextHolder.setDescription(String.format("为学校 %d 绑定学制:%s", schName,String.join(",",schsystemNames) ));
|
LogContextHolder.setDescription(String.format("为学校 %s 绑定学制:%s", schName,String.join(",",schsystemNames) ));
|
||||||
if (schsystemIds == null || schsystemIds.length == 0) {
|
if (schsystemIds == null || schsystemIds.length == 0) {
|
||||||
throw new DException("学制ID列表无效");
|
throw new DException("学制ID列表无效");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ public class SchDicSubjectService implements ISchDicSubjectService {
|
|||||||
Map<Integer,String> schsystemMap= schBinSchsystemService.getSchBinSchsystemMap(user.getSchId());
|
Map<Integer,String> schsystemMap= schBinSchsystemService.getSchBinSchsystemMap(user.getSchId());
|
||||||
String schsystemName= schsystemMap.get(entity.getSchSystemId());
|
String schsystemName= schsystemMap.get(entity.getSchSystemId());
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
String content = String.format("新增学科:%s(学制:%d)", entity.getName(), schsystemName);
|
String content = String.format("新增学科:%s(学制:%s)", entity.getName(), schsystemName);
|
||||||
return content;
|
return content;
|
||||||
} else {
|
} else {
|
||||||
// 对比旧实体与新实体
|
// 对比旧实体与新实体
|
||||||
@@ -232,7 +232,7 @@ public class SchDicSubjectService implements ISchDicSubjectService {
|
|||||||
// 若有其他可修改字段,同样处理
|
// 若有其他可修改字段,同样处理
|
||||||
} else {
|
} else {
|
||||||
// 如果oldEntity为空,直接记录新名称(但更新时一定会有oldEntity)
|
// 如果oldEntity为空,直接记录新名称(但更新时一定会有oldEntity)
|
||||||
detail.append(String.format("%s(学制:%d)", entity.getName(), schsystemName));
|
detail.append(String.format("%s(学制:%s)", entity.getName(), schsystemName));
|
||||||
}
|
}
|
||||||
if (detail.length() == "更新学科:".length()) {
|
if (detail.length() == "更新学科:".length()) {
|
||||||
detail.append("无实际变更");
|
detail.append("无实际变更");
|
||||||
|
|||||||
Reference in New Issue
Block a user