This commit is contained in:
van
2026-04-09 00:09:09 +08:00
parent c9876df3de
commit e94f17973c
50 changed files with 1637 additions and 72 deletions

View File

@@ -0,0 +1,22 @@
package com.ruoyi.jarvis.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
@Configuration
public class GoofishAsyncConfig {
@Bean("goofishTaskExecutor")
public Executor goofishTaskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(2);
executor.setMaxPoolSize(8);
executor.setQueueCapacity(500);
executor.setThreadNamePrefix("goofish-");
executor.initialize();
return executor;
}
}

View File

@@ -0,0 +1,33 @@
package com.ruoyi.jarvis.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* 闲管家订单MQ 主题、定时拉单与自动发货调度
*/
@Data
@Component
@ConfigurationProperties(prefix = "jarvis.goofish-order")
public class JarvisGoofishProperties {
/** RocketMQ Topic需配置 rocketmq.name-server 后生效) */
private String mqTopic = "jarvis-goofish-erp-order";
private String consumerGroup = "jarvis-goofish-order-consumer";
/** 回溯拉单小时数 */
private int pullLookbackHours = 72;
/** 拉单定时 cron */
private String pullCron = "0 0/15 * * * ?";
/** 同步运单 + 自动发货 cron */
private String autoShipCron = "0 2/10 * * * ?";
/** 单次拉单每店最大页数防护 */
private int pullMaxPagesPerShop = 30;
private int autoShipBatchSize = 20;
}