fix: 修复编译错误 - 添加UserMapper注入,修复字段名getTotalScore

This commit is contained in:
Your Name 2026-01-07 19:37:09 +08:00
parent d94395e07e
commit 681e1dcc9a

View File

@ -41,6 +41,7 @@ public class TaskItemService {
private final ExternalAssetService externalAssetService;
private final SystemConfigService systemConfigService;
private final DemandTypeMapper demandTypeMapper;
private final com.designhub.mapper.UserMapper userMapper;
/**
* 获取可接单的子任务列表
@ -1107,7 +1108,7 @@ public class TaskItemService {
}
// 计算子任务组总积分
groupInfo.put("totalScore", item.getScore() != null ? item.getScore() : 0);
groupInfo.put("totalScore", item.getTotalScore() != null ? item.getTotalScore() : 0);
// 获取前置子任务的素材下载链接(流水线继承)
if (item.getGroupNo() != null && item.getGroupNo() > 1) {
@ -1136,7 +1137,7 @@ public class TaskItemService {
itemInfo.put("id", item.getId());
itemInfo.put("itemNo", item.getItemNo());
itemInfo.put("taskTypeId", item.getTaskTypeId());
itemInfo.put("score", item.getScore());
itemInfo.put("score", item.getTotalScore());
itemsList.add(itemInfo);
groupInfo.put("items", itemsList);
@ -1146,7 +1147,7 @@ public class TaskItemService {
groupInfo.put("itemCount", (Integer) groupInfo.get("itemCount") + 1);
// 累加积分
Integer currentScore = (Integer) groupInfo.get("totalScore");
Integer itemScore = item.getScore() != null ? item.getScore() : 0;
Integer itemScore = item.getTotalScore() != null ? item.getTotalScore() : 0;
groupInfo.put("totalScore", currentScore + itemScore);
// 添加到子任务列表
@ -1156,7 +1157,7 @@ public class TaskItemService {
itemInfo.put("id", item.getId());
itemInfo.put("itemNo", item.getItemNo());
itemInfo.put("taskTypeId", item.getTaskTypeId());
itemInfo.put("score", item.getScore());
itemInfo.put("score", item.getTotalScore());
itemsList.add(itemInfo);
}
}