fix(collect-routing): 后端整量 5 处红收口(身份出口/归属棘轮/中文文案基线)
全量 mvn -o test 抓到 3 个测试类 5 处失败,均因本次恢复链引入: - queue-payload 恢复时缺 resolveOwnershipUserId ⇒ 身份出口判红;接上会话出口后 boundRead 分母 63→64(不是放宽,是新增一条已接出口的 handler) - 恢复的本地激活在 TaskService 里手抄 !MODULE_TYPE.equals(...) ⇒ 手写归属文件数 15→16; 改为复用底座 requireSubmissionTask(模块校验口径一致,棘轮不涨) - 相似ASIN activate 新增「已切换后台自动执行」文案 ⇒ 中文出口 61→62(已在常量注释登记) mvn -o test:5032 例 / 0 失败 / 0 错误 / 19 skipped。
This commit is contained in:
+3
-1
@@ -64,7 +64,9 @@ public class AppearancePatentController {
|
||||
@Parameter(description = "外观专利任务 ID", required = true, example = "7004")
|
||||
@PathVariable Long taskId,
|
||||
@Parameter(description = "当前用户 ID", required = true, example = "1")
|
||||
@RequestParam("user_id") Long userId) {
|
||||
@RequestParam("user_id") Long userId,
|
||||
HttpServletRequest httpRequest) {
|
||||
userId = adminAuthSupport.resolveOwnershipUserId(httpRequest, userId);
|
||||
return ApiResponse.success(service.queuePayload(taskId, userId));
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -228,9 +228,10 @@ public class AppearancePatentTaskService extends AbstractFileTaskPipeline<Appear
|
||||
* 页面推送与后台接管不会重复跑同一份任务。
|
||||
*/
|
||||
private void activateForLocalClient(Long taskId, Long userId) {
|
||||
FileTaskEntity task = fileTaskMapper.selectById(taskId);
|
||||
if (task == null || !MODULE_TYPE.equals(task.getModuleType())
|
||||
|| userId == null || !java.util.Objects.equals(userId, task.getUserId())) {
|
||||
// 模块归属走底座 requireSubmissionTask(TaskFinalizeSupport 家族),不在本类手抄
|
||||
// 「!MODULE_TYPE.equals(...)」——那形已被 TaskLifecycleDebtRatchetTest 钉成只降不升。
|
||||
FileTaskEntity task = requireSubmissionTask(taskId);
|
||||
if (userId == null || !java.util.Objects.equals(userId, task.getUserId())) {
|
||||
throw new com.nanri.aiimage.common.exception.BusinessException("任务不存在");
|
||||
}
|
||||
ensureTaskOwnedByCurrentInstance(task, "activate");
|
||||
|
||||
Reference in New Issue
Block a user