|
@@ -138,19 +138,20 @@ public class DirServiceImpl extends IBaseServiceImpl<DirEntity, Long> implements
|
|
|
// 查找该用户的作品
|
|
|
List<WorkEntity> works = workService.getUserWork();
|
|
|
// 匹配场景码
|
|
|
- for (String sceneCode : sceneCodes) {
|
|
|
- for (WorkEntity entity : works) {
|
|
|
- String codes = entity.getSceneCodes();
|
|
|
- if (StrUtil.isNotBlank(codes)){
|
|
|
+ for (WorkEntity work : works) {
|
|
|
+ for (String sceneCode : sceneCodes) {
|
|
|
+ if (StrUtil.isNotBlank(work.getSceneCodes())){
|
|
|
continue;
|
|
|
}
|
|
|
- if (codes.contains(sceneCode)){
|
|
|
- log.error("此场景:{} 被该作品:{} 引用", sceneCode, entity.getId());
|
|
|
+ if (work.getSceneCodes().contains(sceneCode)){
|
|
|
+ log.error("此场景:{} 被该作品:{} 引用", sceneCode, work.getId());
|
|
|
isUser = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
+ log.info("检查结果: {}", isUser);
|
|
|
return isUser;
|
|
|
|
|
|
}
|