diff --git a/logs/crrc-mall-2026-11-10.0.log.gz b/logs/crrc-mall-2026-11-10.0.log.gz new file mode 100644 index 0000000..d7818ea Binary files /dev/null and b/logs/crrc-mall-2026-11-10.0.log.gz differ diff --git a/logs/crrc-mall.log b/logs/crrc-mall.log index 930f9ee..e8a6bbc 100644 --- a/logs/crrc-mall.log +++ b/logs/crrc-mall.log @@ -1,22 +1,80 @@ -2026-11-10 18:51:00.819 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Starting CrrcMallApplication using Java 17.0.21 with PID 12575 (/Users/air/yuankuang/crrc-mall/target/classes started by air in /Users/air/yuankuang/crrc-mall) -2026-11-10 18:51:00.821 [main] INFO com.crrc.crrcmall.CrrcMallApplication - The following 1 profile is active: "local" -2026-11-10 18:51:01.706 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http) -2026-11-10 18:51:01.720 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] -2026-11-10 18:51:01.720 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.30] -2026-11-10 18:51:01.770 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext -2026-11-10 18:51:01.770 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 917 ms -2026-11-10 18:51:02.198 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/' -2026-11-10 18:51:02.207 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Started CrrcMallApplication in 1.857 seconds (process running for 2.421) -2026-11-10 20:09:56.077 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Starting CrrcMallApplication using Java 17.0.21 with PID 14064 (/Users/air/yuankuang/crrc-mall/target/classes started by air in /Users/air/yuankuang/crrc-mall) -2026-11-10 20:09:56.078 [main] INFO com.crrc.crrcmall.CrrcMallApplication - The following 1 profile is active: "local" -2026-11-10 20:09:56.872 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http) -2026-11-10 20:09:56.884 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] -2026-11-10 20:09:56.885 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.30] -2026-11-10 20:09:56.931 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext -2026-11-10 20:09:56.931 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 823 ms -2026-11-10 20:09:57.356 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/' -2026-11-10 20:09:57.364 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Started CrrcMallApplication in 1.731 seconds (process running for 2.25) -2026-11-10 20:11:32.221 [http-nio-8080-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' -2026-11-10 20:11:32.222 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' -2026-11-10 20:11:32.223 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 1 ms -2026-11-10 20:11:32.339 [http-nio-8080-exec-1] INFO com.crrc.crrcmall.service.impl.SearchServiceImpl - 执行 AI 文本搜索,关键词:null +2026-11-12 10:50:37.350 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Starting CrrcMallApplication using Java 21.0.4 with PID 47155 (/Users/air/yuankuang/crrc-mall/target/classes started by air in /Users/air/yuankuang/crrc-mall) +2026-11-12 10:50:37.361 [main] INFO com.crrc.crrcmall.CrrcMallApplication - The following 1 profile is active: "local" +2026-11-12 10:50:38.519 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http) +2026-11-12 10:50:38.543 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2026-11-12 10:50:38.564 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.30] +2026-11-12 10:50:38.714 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2026-11-12 10:50:38.714 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1296 ms +2026-11-12 10:50:38.799 [main] INFO c.crrc.crrcmall.common.mock.AuditWorkbenchMockData - [Mock] 审核工作台初始化完成,任务总数 = 160,本轮 = 128,待初审 = 32 +2026-11-12 10:50:39.318 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/' +2026-11-12 10:50:39.325 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Started CrrcMallApplication in 2.605 seconds (process running for 3.166) +2026-11-12 10:50:43.030 [http-nio-8080-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2026-11-12 10:50:43.031 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2026-11-12 10:50:43.032 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 1 ms +2026-11-12 10:51:42.833 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Starting CrrcMallApplication using Java 21.0.4 with PID 47259 (/Users/air/yuankuang/crrc-mall/target/classes started by air in /Users/air/yuankuang/crrc-mall) +2026-11-12 10:51:42.835 [main] INFO com.crrc.crrcmall.CrrcMallApplication - The following 1 profile is active: "local" +2026-11-12 10:51:43.856 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http) +2026-11-12 10:51:43.871 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2026-11-12 10:51:43.871 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.30] +2026-11-12 10:51:43.930 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2026-11-12 10:51:43.931 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1061 ms +2026-11-12 10:51:44.012 [main] INFO c.crrc.crrcmall.common.mock.AuditWorkbenchMockData - [Mock] 审核工作台初始化完成,任务总数 = 160,本轮 = 128,待初审 = 32 +2026-11-12 10:51:44.524 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/' +2026-11-12 10:51:44.533 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Started CrrcMallApplication in 2.24 seconds (process running for 2.574) +2026-11-12 10:51:47.190 [http-nio-8080-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2026-11-12 10:51:47.190 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2026-11-12 10:51:47.192 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 1 ms +2026-11-12 10:51:57.245 [http-nio-8080-exec-7] INFO c.c.c.service.impl.AuditWorkbenchServiceImpl - [Mock] 批量操作 action=ADOPT 请求 1 条,实际变更 1 条 +2026-11-12 10:51:57.338 [http-nio-8080-exec-10] WARN c.c.crrcmall.controller.AuditWorkbenchController - [审核工作台] 批量操作参数异常:驳回必须填写原因 +2026-11-12 10:52:29.726 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Starting CrrcMallApplication using Java 21.0.4 with PID 47359 (/Users/air/yuankuang/crrc-mall/target/classes started by air in /Users/air/yuankuang/crrc-mall) +2026-11-12 10:52:29.729 [main] INFO com.crrc.crrcmall.CrrcMallApplication - The following 1 profile is active: "local" +2026-11-12 10:52:30.766 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http) +2026-11-12 10:52:30.783 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2026-11-12 10:52:30.783 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.30] +2026-11-12 10:52:30.842 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2026-11-12 10:52:30.842 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1069 ms +2026-11-12 10:52:30.912 [main] INFO c.crrc.crrcmall.common.mock.AuditWorkbenchMockData - [Mock] 审核工作台初始化完成,任务总数 = 160,本轮 = 128,待初审 = 32 +2026-11-12 10:52:31.351 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/' +2026-11-12 10:52:31.359 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Started CrrcMallApplication in 2.213 seconds (process running for 2.528) +2026-11-12 10:52:31.793 [http-nio-8080-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2026-11-12 10:52:31.793 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2026-11-12 10:52:31.794 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 0 ms +2026-11-12 11:07:49.162 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Starting CrrcMallApplication using Java 17.0.21 with PID 48037 (/Users/air/yuankuang/crrc-mall/target/classes started by air in /Users/air/yuankuang/crrc-mall) +2026-11-12 11:07:49.164 [main] INFO com.crrc.crrcmall.CrrcMallApplication - The following 1 profile is active: "local" +2026-11-12 11:07:50.043 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http) +2026-11-12 11:07:50.054 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2026-11-12 11:07:50.054 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.30] +2026-11-12 11:07:50.097 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2026-11-12 11:07:50.097 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 900 ms +2026-11-12 11:07:50.171 [main] INFO c.crrc.crrcmall.common.mock.AuditWorkbenchMockData - [Mock] 审核工作台初始化完成,任务总数 = 160,本轮 = 128,待初审 = 32 +2026-11-12 11:07:50.547 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/' +2026-11-12 11:07:50.556 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Started CrrcMallApplication in 1.907 seconds (process running for 2.5) +2026-11-12 11:09:24.044 [http-nio-8080-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2026-11-12 11:09:24.047 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2026-11-12 11:09:24.052 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 5 ms +2026-11-12 11:09:34.754 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Starting CrrcMallApplication using Java 17.0.21 with PID 48130 (/Users/air/yuankuang/crrc-mall/target/classes started by air in /Users/air/yuankuang/crrc-mall) +2026-11-12 11:09:34.756 [main] INFO com.crrc.crrcmall.CrrcMallApplication - The following 1 profile is active: "local" +2026-11-12 11:09:35.660 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http) +2026-11-12 11:09:35.672 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2026-11-12 11:09:35.672 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.30] +2026-11-12 11:09:35.721 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2026-11-12 11:09:35.721 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 881 ms +2026-11-12 11:09:35.788 [main] INFO c.crrc.crrcmall.common.mock.AuditWorkbenchMockData - [Mock] 审核工作台初始化完成,任务总数 = 160,本轮 = 128,待初审 = 32 +2026-11-12 11:09:36.145 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/' +2026-11-12 11:09:36.153 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Started CrrcMallApplication in 2.069 seconds (process running for 2.664) +2026-11-12 11:10:00.719 [http-nio-8080-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2026-11-12 11:10:00.720 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2026-11-12 11:10:00.721 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 1 ms +2026-11-12 11:17:47.134 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Starting CrrcMallApplication using Java 17.0.21 with PID 48438 (/Users/air/yuankuang/crrc-mall/target/classes started by air in /Users/air/yuankuang/crrc-mall) +2026-11-12 11:17:47.136 [main] INFO com.crrc.crrcmall.CrrcMallApplication - The following 1 profile is active: "local" +2026-11-12 11:17:48.006 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http) +2026-11-12 11:17:48.019 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2026-11-12 11:17:48.020 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.30] +2026-11-12 11:17:48.068 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2026-11-12 11:17:48.069 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 897 ms +2026-11-12 11:17:48.137 [main] INFO c.crrc.crrcmall.common.mock.AuditWorkbenchMockData - [Mock] 审核工作台初始化完成,任务总数 = 160,本轮 = 128,待初审 = 32 +2026-11-12 11:17:48.505 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/' +2026-11-12 11:17:48.514 [main] INFO com.crrc.crrcmall.CrrcMallApplication - Started CrrcMallApplication in 1.879 seconds (process running for 2.372) +2026-11-12 11:19:18.205 [http-nio-8080-exec-2] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2026-11-12 11:19:18.206 [http-nio-8080-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2026-11-12 11:19:18.206 [http-nio-8080-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 0 ms diff --git a/src/main/java/com/crrc/crrcmall/common/enums/AuditTaskStatusEnum.java b/src/main/java/com/crrc/crrcmall/common/enums/AuditTaskStatusEnum.java new file mode 100644 index 0000000..2dcea26 --- /dev/null +++ b/src/main/java/com/crrc/crrcmall/common/enums/AuditTaskStatusEnum.java @@ -0,0 +1,48 @@ +package com.crrc.crrcmall.common.enums; + +/** + * 审核工作台任务状态 + *
+ * 与原型顶部四张统计卡一一对应: + * 待 AI 初审 / AI 已通过 / 需人工判定 / 已驳回 + */ +public enum AuditTaskStatusEnum { + + /** 待 AI 初审:已提交,排队中 */ + AI_PENDING("待AI初审"), + + /** AI 已通过:自动进入待上架队列 */ + AI_PASSED("AI已通过"), + + /** 需人工判定:内容类项转人工,未直接驳回 */ + NEED_MANUAL("需人工判定"), + + /** 已驳回:回执已发送供应商 */ + REJECTED("已驳回"); + + private final String label; + + AuditTaskStatusEnum(String label) { + this.label = label; + } + + public String getCode() { + return this.name(); + } + + public String getLabel() { + return label; + } + + public static AuditTaskStatusEnum of(String code) { + if (code == null || code.isBlank()) { + return null; + } + for (AuditTaskStatusEnum value : values()) { + if (value.name().equalsIgnoreCase(code)) { + return value; + } + } + return null; + } +} diff --git a/src/main/java/com/crrc/crrcmall/common/enums/AuditTypeEnum.java b/src/main/java/com/crrc/crrcmall/common/enums/AuditTypeEnum.java new file mode 100644 index 0000000..6844c50 --- /dev/null +++ b/src/main/java/com/crrc/crrcmall/common/enums/AuditTypeEnum.java @@ -0,0 +1,55 @@ +package com.crrc.crrcmall.common.enums; + +/** + * 审核类型(工作台顶部 Tab) + *
+ * 说明:客户侧原枚举只有 1/2/3,原型新增了「变更审核」, + * 这里补充 4-变更审核,保持与页面一致。 + */ +public enum AuditTypeEnum { + + /** 新品上架 */ + NEW_PRODUCT(1, "新品上架"), + + /** 已上架复审 */ + RECHECK(2, "已上架复审"), + + /** 调价审核 */ + PRICE_ADJUST(3, "调价审核"), + + /** 变更审核(原型新增,客户原枚举中缺这一项) */ + CHANGE(4, "变更审核"); + + private final Integer code; + private final String label; + + AuditTypeEnum(Integer code, String label) { + this.code = code; + this.label = label; + } + + public Integer getCode() { + return code; + } + + public String getLabel() { + return label; + } + + public static AuditTypeEnum of(Integer code) { + if (code == null) { + return null; + } + for (AuditTypeEnum value : values()) { + if (value.code.equals(code)) { + return value; + } + } + return null; + } + + public static String labelOf(Integer code) { + AuditTypeEnum type = of(code); + return type == null ? "" : type.getLabel(); + } +} diff --git a/src/main/java/com/crrc/crrcmall/common/enums/RiskLevelEnum.java b/src/main/java/com/crrc/crrcmall/common/enums/RiskLevelEnum.java new file mode 100644 index 0000000..80fb239 --- /dev/null +++ b/src/main/java/com/crrc/crrcmall/common/enums/RiskLevelEnum.java @@ -0,0 +1,41 @@ +package com.crrc.crrcmall.common.enums; + +/** + * 违规风险等级 + */ +public enum RiskLevelEnum { + + HIGH("高"), + MEDIUM("中"), + LOW("低"); + + private final String label; + + RiskLevelEnum(String label) { + this.label = label; + } + + public String getCode() { + return this.name(); + } + + public String getLabel() { + return label; + } + + /** + * 按置信度推导风险等级:>=0.9 高,>=0.7 中,其余低 + */ + public static RiskLevelEnum ofConfidence(Double confidence) { + if (confidence == null) { + return LOW; + } + if (confidence >= 0.9) { + return HIGH; + } + if (confidence >= 0.7) { + return MEDIUM; + } + return LOW; + } +} diff --git a/src/main/java/com/crrc/crrcmall/common/mock/AuditWorkbenchMockData.java b/src/main/java/com/crrc/crrcmall/common/mock/AuditWorkbenchMockData.java new file mode 100644 index 0000000..b48fc3e --- /dev/null +++ b/src/main/java/com/crrc/crrcmall/common/mock/AuditWorkbenchMockData.java @@ -0,0 +1,560 @@ +package com.crrc.crrcmall.common.mock; + +import com.crrc.crrcmall.common.enums.AuditTaskStatusEnum; +import com.crrc.crrcmall.common.enums.AuditTypeEnum; +import com.crrc.crrcmall.common.enums.RiskLevelEnum; +import com.crrc.crrcmall.vo.audit.workbench.AuditFieldDetailVo; +import com.crrc.crrcmall.vo.audit.workbench.AuditHistoryVo; +import com.crrc.crrcmall.vo.audit.workbench.AuditViolationVo; +import com.crrc.crrcmall.vo.audit.workbench.AuditWorkbenchTaskVo; +import jakarta.annotation.PostConstruct; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.concurrent.ConcurrentHashMap; + +/** + * 审核工作台 Mock 数据 + *
+ * 数据口径(与原型对齐,保证四个统计卡、进度条、列表总数三者自洽): + *
+ * 与客户侧接口保持一致:code / message / data / timestamp + *
+ * 字段命名与客户侧接口保持一致:records / total / current / size,
+ * 额外补充 pages(总页数)方便前端渲染分页器。
+ *
+ * @param
+ * 注意:与客户侧 /api/v1/audit/* 完全隔离,路径为 /api/v1/audit/workbench/*
+ * 所有接口统一返回 ApiResponse(code / message / data / timestamp)
+ */
+@Slf4j
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/api/audit/workbench")
+@Tag(name = "审核工作台", description = "运营端审核列表、统计、详情、批量操作、加急查询")
+public class AuditWorkbenchController {
+
+ private final AuditWorkbenchService auditWorkbenchService;
+
+ @GetMapping("/tasks")
+ @Operation(summary = "任务列表", description = "分页 + 条件筛选,同时返回顶部统计卡片数据")
+ public ApiResponse
+ * 注意:采纳与驳回均为不可逆动作,调用方需在前端二次确认后再提交。
+ */
+@Data
+@Schema(description = "批量操作入参")
+public class AuditBatchActionDto implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /** 采纳 AI 结论:需人工判定 -> AI 已通过 */
+ public static final String ACTION_ADOPT = "ADOPT";
+ /** 强制通过 */
+ public static final String ACTION_PASS = "PASS";
+ /** 驳回 */
+ public static final String ACTION_REJECT = "REJECT";
+ /** 批量下架 */
+ public static final String ACTION_OFF_SHELF = "OFF_SHELF";
+
+ @Schema(description = "任务号列表")
+ private List
+ * skus 为原始粘贴文本,服务端按 英文逗号 / 斜杠 / 空格 / 换行 四种分隔符切分。
+ */
+@Data
+@Schema(description = "加急查询入参")
+public class AuditQuickQueryDto implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Schema(description = "多个 SKU 原始文本,示例:LMY-T16-12G, LMTP-T22G / ZY008")
+ private String skus;
+}
diff --git a/src/main/java/com/crrc/crrcmall/dto/audit/AuditWorkbenchQueryDto.java b/src/main/java/com/crrc/crrcmall/dto/audit/AuditWorkbenchQueryDto.java
new file mode 100644
index 0000000..66b8ed5
--- /dev/null
+++ b/src/main/java/com/crrc/crrcmall/dto/audit/AuditWorkbenchQueryDto.java
@@ -0,0 +1,55 @@
+package com.crrc.crrcmall.dto.audit;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 审核工作台 - 列表查询条件
+ */
+@Data
+@Schema(description = "审核工作台查询条件")
+public class AuditWorkbenchQueryDto implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Schema(description = "任务号,支持前缀模糊,如 AI-20260930-0")
+ private String taskNo;
+
+ @Schema(description = "商品名称关键字")
+ private String goodsName;
+
+ @Schema(description = "供应商全称或简称")
+ private String supplierName;
+
+ @Schema(description = "审核类型:1-新品上架 2-已上架复审 3-调价审核 4-变更审核,不传为全部")
+ private Integer auditType;
+
+ @Schema(description = "任务状态:AI_PENDING/AI_PASSED/NEED_MANUAL/REJECTED,不传为全部")
+ private String status;
+
+ @Schema(description = "是否只看加急")
+ private Boolean urgent;
+
+ @Schema(description = "排序方式:TIME_DESC-提交时间倒序(默认,与原型一致) CONFIDENCE_ASC-低置信度优先",
+ example = "TIME_DESC")
+ private String sortBy;
+
+ @Schema(description = "页码,从 1 开始", example = "1")
+ private Integer page = 1;
+
+ @Schema(description = "每页条数", example = "20")
+ private Integer limit = 20;
+
+ public Integer getPage() {
+ return (page == null || page < 1) ? 1 : page;
+ }
+
+ public Integer getLimit() {
+ if (limit == null || limit < 1) {
+ return 20;
+ }
+ return Math.min(limit, 200);
+ }
+}
diff --git a/src/main/java/com/crrc/crrcmall/service/AuditWorkbenchService.java b/src/main/java/com/crrc/crrcmall/service/AuditWorkbenchService.java
new file mode 100644
index 0000000..c37ebc7
--- /dev/null
+++ b/src/main/java/com/crrc/crrcmall/service/AuditWorkbenchService.java
@@ -0,0 +1,42 @@
+package com.crrc.crrcmall.service;
+
+import com.crrc.crrcmall.dto.audit.AuditBatchActionDto;
+import com.crrc.crrcmall.dto.audit.AuditQuickQueryDto;
+import com.crrc.crrcmall.dto.audit.AuditWorkbenchQueryDto;
+import com.crrc.crrcmall.vo.audit.workbench.AuditQuickQueryResultVo;
+import com.crrc.crrcmall.vo.audit.workbench.AuditWorkbenchDetailVo;
+import com.crrc.crrcmall.vo.audit.workbench.AuditWorkbenchListVo;
+import com.crrc.crrcmall.vo.audit.workbench.AuditWorkbenchStatsVo;
+
+/**
+ * 审核工作台(运营端)服务
+ *
+ * 当前为 Mock 实现,数据存内存;后续接库时只需替换实现类。
+ */
+public interface AuditWorkbenchService {
+
+ /**
+ * 列表分页查询(附带统计卡片)
+ */
+ AuditWorkbenchListVo list(AuditWorkbenchQueryDto query);
+
+ /**
+ * 仅取统计卡片
+ */
+ AuditWorkbenchStatsVo stats();
+
+ /**
+ * 任务详情,不存在返回 null
+ */
+ AuditWorkbenchDetailVo detail(String taskNo);
+
+ /**
+ * 批量操作,返回操作后的最新统计
+ */
+ AuditWorkbenchStatsVo batchAction(AuditBatchActionDto dto);
+
+ /**
+ * 加急查询:一次粘贴多个 SKU
+ */
+ AuditQuickQueryResultVo quickQuery(AuditQuickQueryDto dto);
+}
diff --git a/src/main/java/com/crrc/crrcmall/service/impl/AuditWorkbenchServiceImpl.java b/src/main/java/com/crrc/crrcmall/service/impl/AuditWorkbenchServiceImpl.java
new file mode 100644
index 0000000..73ba492
--- /dev/null
+++ b/src/main/java/com/crrc/crrcmall/service/impl/AuditWorkbenchServiceImpl.java
@@ -0,0 +1,297 @@
+package com.crrc.crrcmall.service.impl;
+
+import com.crrc.crrcmall.common.enums.AuditTaskStatusEnum;
+import com.crrc.crrcmall.common.enums.AuditTypeEnum;
+import com.crrc.crrcmall.common.mock.AuditWorkbenchMockData;
+import com.crrc.crrcmall.common.response.PageResult;
+import com.crrc.crrcmall.dto.audit.AuditBatchActionDto;
+import com.crrc.crrcmall.dto.audit.AuditQuickQueryDto;
+import com.crrc.crrcmall.dto.audit.AuditWorkbenchQueryDto;
+import com.crrc.crrcmall.service.AuditWorkbenchService;
+import com.crrc.crrcmall.vo.audit.workbench.AuditQuickQueryResultVo;
+import com.crrc.crrcmall.vo.audit.workbench.AuditWorkbenchDetailVo;
+import com.crrc.crrcmall.vo.audit.workbench.AuditWorkbenchListVo;
+import com.crrc.crrcmall.vo.audit.workbench.AuditWorkbenchStatsVo;
+import com.crrc.crrcmall.vo.audit.workbench.AuditWorkbenchTaskVo;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * 审核工作台(运营端)实现 —— Mock 版本
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class AuditWorkbenchServiceImpl implements AuditWorkbenchService {
+
+ private final AuditWorkbenchMockData mockData;
+
+ /**
+ * 默认排序:提交时间倒序(与原型列表一致)
+ */
+ private static final Comparator
+ * 字段结构与客户侧 recordDetail 保持一致(customField/customKey/customValue/customType),
+ * 在此基础上补充 AI 反馈与检测状态,供详情页逐字段展示。
+ */
+@Data
+@Schema(description = "字段级检测明细")
+public class AuditFieldDetailVo implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Schema(description = "字段标识,如 goodsName")
+ private String customField;
+
+ @Schema(description = "字段显示名,如 商品名称")
+ private String customKey;
+
+ @Schema(description = "本次申报值")
+ private Object customValue;
+
+ @Schema(description = "所属分组,如 price / saleInfo")
+ private Object customType;
+
+ @Schema(description = "AI 反馈")
+ private String aiIntent;
+
+ @Schema(description = "AI 反馈类型:1-格式 2-逻辑 3-图片")
+ private Integer aiIntentType;
+
+ @Schema(description = "AI 匹配度,0-1")
+ private Double aiRelevanceScore;
+
+ @Schema(description = "规则类型:1-硬规则 2-AI规则")
+ private Integer checkType;
+
+ @Schema(description = "检测状态:0-成功(通过) 1-失败(不通过)")
+ private Integer auditStatus;
+}
diff --git a/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditHistoryVo.java b/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditHistoryVo.java
new file mode 100644
index 0000000..f974dd4
--- /dev/null
+++ b/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditHistoryVo.java
@@ -0,0 +1,37 @@
+package com.crrc.crrcmall.vo.audit.workbench;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 审核工作台 - 同类商品历史判定(供复核参考)
+ */
+@Data
+@Schema(description = "历史判定记录")
+public class AuditHistoryVo implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Schema(description = "历史商品名称")
+ private String goodsName;
+
+ @Schema(description = "供应商名称")
+ private String supplierName;
+
+ @Schema(description = "判定时间")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private LocalDateTime auditTime;
+
+ @Schema(description = "判定结果:PASS-通过 REJECT-驳回")
+ private String result;
+
+ @Schema(description = "判定结果名称")
+ private String resultName;
+
+ @Schema(description = "判定说明")
+ private String reason;
+}
diff --git a/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditQuickQueryResultVo.java b/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditQuickQueryResultVo.java
new file mode 100644
index 0000000..d650985
--- /dev/null
+++ b/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditQuickQueryResultVo.java
@@ -0,0 +1,33 @@
+package com.crrc.crrcmall.vo.audit.workbench;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 审核工作台 - 加急查询结果
+ *
+ * 支持一次粘贴多个 SKU,用英文逗号/斜杠/空格/换行 四种分隔符切分。
+ * 查不到的 SKU 通过 notFound 回传,避免静默丢弃。
+ */
+@Data
+@Schema(description = "加急查询结果")
+public class AuditQuickQueryResultVo implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Schema(description = "识别到的 SKU/关键词数量")
+ private Integer queryCount;
+
+ @Schema(description = "命中数量")
+ private Integer matchedCount;
+
+ @Schema(description = "命中的任务列表")
+ private List
+ * 对应详情页右侧「AI 初审结论」里的一条命中项,
+ * 含风险等级、置信度、处置建议,以及原文定位(start/end)供前端高亮标红。
+ */
+@Data
+@Schema(description = "违规点")
+public class AuditViolationVo implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Schema(description = "违规编号,从 1 开始")
+ private Integer seq;
+
+ @Schema(description = "命中字段标识,如 goodsName / materialCode")
+ private String field;
+
+ @Schema(description = "命中字段显示名,如 商品名称")
+ private String fieldName;
+
+ @Schema(description = "违规类型,如 虚假宣传 / 资质缺失 / 价格异常")
+ private String violationType;
+
+ @Schema(description = "风险等级:HIGH/MEDIUM/LOW")
+ private String riskLevel;
+
+ @Schema(description = "风险等级名称:高/中/低")
+ private String riskLevelName;
+
+ @Schema(description = "置信度,0-1")
+ private Double confidence;
+
+ @Schema(description = "违规说明")
+ private String detail;
+
+ @Schema(description = "处置建议")
+ private String suggestion;
+
+ @Schema(description = "违规词在原文中的起始下标")
+ private Integer start;
+
+ @Schema(description = "违规词在原文中的结束下标")
+ private Integer end;
+
+ @Schema(description = "引用的审核规则编号,如 规则 3.2")
+ private String ruleReference;
+}
diff --git a/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditWorkbenchDetailVo.java b/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditWorkbenchDetailVo.java
new file mode 100644
index 0000000..8381028
--- /dev/null
+++ b/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditWorkbenchDetailVo.java
@@ -0,0 +1,82 @@
+package com.crrc.crrcmall.vo.audit.workbench;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * 审核工作台 - 详情
+ *
+ * 组成:商品原件信息 + AI 结论 + 违规点列表 + 字段级明细 + 同类历史判定 + 可操作标记
+ */
+@Data
+@Schema(description = "审核工作台详情")
+public class AuditWorkbenchDetailVo implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Schema(description = "任务号")
+ private String taskId;
+
+ @Schema(description = "商品 ID")
+ private String goodsId;
+
+ @Schema(description = "商品名称")
+ private String goodsName;
+
+ @Schema(description = "商品主图")
+ private String goodsImage;
+
+ @Schema(description = "商品图集")
+ private List
+ * 口径说明(与原型对齐):
+ *
+ * 对应原型表格:任务号 | 商品 | 供应商 | 提交时间 | 类型 | AI 判定 | 违规点摘要 | 操作
+ */
+@Data
+@Schema(description = "审核工作台列表行")
+public class AuditWorkbenchTaskVo implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Schema(description = "任务号,如 AI-20260930-0187")
+ private String taskNo;
+
+ @Schema(description = "商品 ID")
+ private String goodsId;
+
+ @Schema(description = "商品名称(列表展示名)")
+ private String goodsName;
+
+ @Schema(description = "商品 SKU,加急查询按此匹配")
+ private String sku;
+
+ @Schema(description = "商品主图")
+ private String goodsImage;
+
+ @Schema(description = "是否加急")
+ private Boolean urgent;
+
+ @Schema(description = "上下架标签:上架/下架/变更")
+ private String shelfStatus;
+
+ @Schema(description = "供应商 ID")
+ private String supplierId;
+
+ @Schema(description = "供应商名称")
+ private String supplierName;
+
+ @Schema(description = "提交时间")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private LocalDateTime submitTime;
+
+ @Schema(description = "审核类型:1-新品上架 2-已上架复审 3-调价审核 4-变更审核")
+ private Integer auditType;
+
+ @Schema(description = "审核类型名称")
+ private String auditTypeName;
+
+ @Schema(description = "任务状态:AI_PENDING/AI_PASSED/NEED_MANUAL/REJECTED")
+ private String status;
+
+ @Schema(description = "任务状态名称")
+ private String statusName;
+
+ @Schema(description = "AI 判定结论文案")
+ private String aiConclusion;
+
+ @Schema(description = "AI 置信度,0-1")
+ private Double confidence;
+
+ @Schema(description = "风险等级:HIGH/MEDIUM/LOW")
+ private String riskLevel;
+
+ @Schema(description = "风险等级名称:高/中/低")
+ private String riskLevelName;
+
+ @Schema(description = "违规点摘要,如:物料编码缺失 · 税收编码格式错")
+ private String violationSummary;
+
+ @Schema(description = "违规点数量")
+ private Integer violationCount;
+}
+ *
+ * 所有数值均由任务数据实时聚合,不做硬编码,避免出现「128 与 160 对不上」。
+ */
+@Data
+@Schema(description = "审核工作台统计")
+public class AuditWorkbenchStatsVo implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Schema(description = "全部任务数(含待 AI 初审)")
+ private Long total;
+
+ @Schema(description = "本轮任务数(AI已通过 + 需人工判定 + 已驳回)")
+ private Long roundTotal;
+
+ @Schema(description = "待 AI 初审")
+ private Long aiPending;
+
+ @Schema(description = "AI 已通过")
+ private Long aiPassed;
+
+ @Schema(description = "需人工判定")
+ private Long needManual;
+
+ @Schema(description = "已驳回")
+ private Long rejected;
+
+ @Schema(description = "AI 自动通过率(百分比,保留 1 位小数),如 75.0")
+ private Double aiPassRate;
+
+ @Schema(description = "队列平均等待分钟数")
+ private Double averageWaitMinutes;
+}
diff --git a/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditWorkbenchTaskVo.java b/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditWorkbenchTaskVo.java
new file mode 100644
index 0000000..7d4cd7b
--- /dev/null
+++ b/src/main/java/com/crrc/crrcmall/vo/audit/workbench/AuditWorkbenchTaskVo.java
@@ -0,0 +1,81 @@
+package com.crrc.crrcmall.vo.audit.workbench;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 审核工作台 - 列表行
+ *