|
@@ -287,7 +287,6 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
return true;
|
|
|
}
|
|
|
List<String> idList = Arrays.asList(ids.split(","));
|
|
|
- StringBuffer errMsg = new StringBuffer();
|
|
|
Date now = DateUtil.now();
|
|
|
String person = UserUtils.getCurrentPrincipleID();
|
|
|
for (String id : idList) {
|
|
@@ -311,16 +310,23 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("question_id", Long.parseLong(id)));
|
|
|
if (ListUtil.isNotEmpty(moduleDetails)) {
|
|
|
+ StringBuffer errMsg = new StringBuffer();
|
|
|
+ StringBuffer finalMsg = new StringBuffer();
|
|
|
List<Long> moduleIds = moduleDetails.stream().map(row -> row.getModuleId()).collect(Collectors.toList());
|
|
|
List<String> moduleNames = moduleInfoFacade.list(new QueryWrapper<ModuleInfo>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.in("id", moduleIds))
|
|
|
.stream().map(row -> row.getName()).collect(Collectors.toList());
|
|
|
for (String mouduleName: moduleNames) {
|
|
|
- errMsg.append("该标签已关联").append("【" + mouduleName + "】");
|
|
|
+ if(moduleNames.get(moduleNames.size()-1).equals(mouduleName)){//如果当前元素是最后一个,不追加顿号
|
|
|
+ errMsg.append("【" + mouduleName + "】");
|
|
|
+ }else {
|
|
|
+ errMsg.append("【" + mouduleName + "】").append("、");
|
|
|
+ }
|
|
|
}
|
|
|
+ finalMsg.append("该标签已关联模板").append(errMsg);
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
- errMsg.toString());
|
|
|
+ finalMsg.toString());
|
|
|
}
|
|
|
//删除自身
|
|
|
this.deleteByIds(paramMap);
|