提交 17d69ccd 作者: 925993793@qq.com

【自定义专题】绑定信息源bug修改

上级 03966785
...@@ -1056,9 +1056,6 @@ public class SubjectManageController { ...@@ -1056,9 +1056,6 @@ public class SubjectManageController {
return Result.FAIL("专题id不能为空"); return Result.FAIL("专题id不能为空");
} }
Object infoSourceMainLabel = params.get("infoSourceMainLabel"); Object infoSourceMainLabel = params.get("infoSourceMainLabel");
if (ObjectUtil.isEmpty(infoSourceMainLabel)) {
return Result.FAIL("信息源标签不能为空");
}
//支持全部删除 //支持全部删除
//不管有没有传值,先删后增 //不管有没有传值,先删后增
LambdaQueryWrapper<SubjectInfoSourceMap> queryWrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<SubjectInfoSourceMap> queryWrapper = Wrappers.lambdaQuery();
...@@ -1068,20 +1065,22 @@ public class SubjectManageController { ...@@ -1068,20 +1065,22 @@ public class SubjectManageController {
subjectInfoSourceMapService.remove(queryWrapper); subjectInfoSourceMapService.remove(queryWrapper);
} }
List<SubjectInfoSourceMap> dataList = new ArrayList<>(); List<SubjectInfoSourceMap> dataList = new ArrayList<>();
List<InfoSourceMainLabelVO> infoSourceMainLabelList = JSON.parseArray(JSON.toJSONString(infoSourceMainLabel), InfoSourceMainLabelVO.class); if (ObjectUtil.isNotEmpty(infoSourceMainLabel)) {
for (InfoSourceMainLabelVO infoSourceMainLabelVO : infoSourceMainLabelList) { List<InfoSourceMainLabelVO> infoSourceMainLabelList = JSON.parseArray(JSON.toJSONString(infoSourceMainLabel), InfoSourceMainLabelVO.class);
List<String> labelList = infoSourceMainLabelVO.getInfoSourceLabelItemList(); for (InfoSourceMainLabelVO infoSourceMainLabelVO : infoSourceMainLabelList) {
String labelCode = infoSourceMainLabelVO.getLabelCode(); List<String> labelList = infoSourceMainLabelVO.getInfoSourceLabelItemList();
for (String labelItemCode : labelList) { String labelCode = infoSourceMainLabelVO.getLabelCode();
SubjectInfoSourceMap subjectInfoSourceMap = new SubjectInfoSourceMap(); for (String labelItemCode : labelList) {
subjectInfoSourceMap.setSubjectId(subjectId.toString()); SubjectInfoSourceMap subjectInfoSourceMap = new SubjectInfoSourceMap();
subjectInfoSourceMap.setSourceId(labelCode); subjectInfoSourceMap.setSubjectId(subjectId.toString());
subjectInfoSourceMap.setSourceItemId(labelItemCode); subjectInfoSourceMap.setSourceId(labelCode);
subjectInfoSourceMap.setType(312); subjectInfoSourceMap.setSourceItemId(labelItemCode);
UserVo currentUser = UserUtil.getLoginUser(); subjectInfoSourceMap.setType(312);
subjectInfoSourceMap.setCreateBy(currentUser.getUsername()); UserVo currentUser = UserUtil.getLoginUser();
subjectInfoSourceMap.setCreateTime(new Date()); subjectInfoSourceMap.setCreateBy(currentUser.getUsername());
dataList.add(subjectInfoSourceMap); subjectInfoSourceMap.setCreateTime(new Date());
dataList.add(subjectInfoSourceMap);
}
} }
} }
if (CollectionUtils.isNotEmpty(dataList)) { if (CollectionUtils.isNotEmpty(dataList)) {
......
...@@ -110,7 +110,7 @@ public class ReportDataController { ...@@ -110,7 +110,7 @@ public class ReportDataController {
* @date 2025/9/5 * @date 2025/9/5
*/ */
@PostMapping("/infoList") @PostMapping("/infoList")
public Result<?> originAnalysis(@RequestBody InfoDataSearchCondition searchCondition) { public Result<?> infoList(@RequestBody InfoDataSearchCondition searchCondition) {
return informationService.subjectPageListGroupByLabel(null, searchCondition); return informationService.subjectPageListGroupByLabel(null, searchCondition);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论