diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index 2b55aba..f3db124 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -227,6 +227,8 @@ jarvis: enabled: true # 接收人 UserID,多个逗号或 |;留空则回退 goofish-notify-touser touser: "" + # 企微应用 AgentId,须与 wxSend qywx.app.reportAgentId 一致 + agent-id: "1000014" daily-cron: "0 0 21 * * ?" weekly-cron: "0 20 8 ? * MON" monthly-cron: "0 30 8 1 * ?" diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml index e1e5b93..753e184 100644 --- a/ruoyi-admin/src/main/resources/application-prod.yml +++ b/ruoyi-admin/src/main/resources/application-prod.yml @@ -222,6 +222,7 @@ jarvis: order-profit-analysis: enabled: true touser: "" + agent-id: "1000014" daily-cron: "0 0 23 * * ?" weekly-cron: "0 20 8 ? * MON" monthly-cron: "0 30 8 1 * ?" diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/OrderProfitAnalysisServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/OrderProfitAnalysisServiceImpl.java index 4d228bb..17a4c89 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/OrderProfitAnalysisServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/OrderProfitAnalysisServiceImpl.java @@ -126,6 +126,10 @@ public class OrderProfitAnalysisServiceImpl implements IOrderProfitAnalysisServi @Value("${jarvis.order-profit-analysis.touser:}") private String analysisTouser; + /** 企微应用 AgentId,须与 wxSend qywx.app.reportAgentId 一致 */ + @Value("${jarvis.order-profit-analysis.agent-id:1000014}") + private String analysisAgentId; + @Value("${jarvis.wecom.goofish-notify-touser:}") private String fallbackTouser; @@ -451,8 +455,9 @@ public class OrderProfitAnalysisServiceImpl implements IOrderProfitAnalysisServi if (chunks == null || chunks.isEmpty()) { return false; } - log.info("利润分析推送拆成 {} 条 toUser={}", chunks.size(), toUser); - return phoneForwardActivePush.schedulePushChunks(toUser, null, chunks); + String agentId = StringUtils.isNotEmpty(analysisAgentId) ? analysisAgentId.trim() : "1000014"; + log.info("利润分析推送拆成 {} 条 toUser={} agentId={}", chunks.size(), toUser, agentId); + return phoneForwardActivePush.schedulePushChunks(toUser, agentId, chunks); } private static List labelChunks(List chunks) {