Commit 1f678cab by 王璐琦

fix(strategy): 优化客户产品标签同步逻辑及定时任务调度

- 修改客户今日计划到店接口需登录状态校验
- 调整取消退款订单客户产品标签任务定时执行时间为每月1日和16日凌晨1点
- 调整客户产品标签定时任务执行时间为每天凌晨1点
- 新增解析逗号分隔品类ID字符串方法,提高品类匹配灵活性
- 扩展并优化客服订单品类对应标签映射,支持多品类范围配置
- 修改产品标签查询条件,将硬编码替换为常量,提升可维护性
- 更新退款订单产品标签匹配逻辑,支持多品类ID集合匹配
- 添加同步客户标签相关单元测试,提升代码稳定性
- GoodsOrderMapper中修正字段别名,避免歧义风险
1 parent 2476d0b7
...@@ -14,7 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -14,7 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
* @Date 2026/6/23 10:16 * @Date 2026/6/23 10:16
*/ */
@Slf4j @Slf4j
@ElasticJobConf(name = "CancelCustomerProductTagJob", cron = "0 0 2 * * ?", description = "取消退款订单客户产品标签任务", overwrite = false) @ElasticJobConf(name = "CancelCustomerProductTagJob", cron = "0 0 1 1,16 * ?", description = "取消退款订单客户产品标签任务", overwrite = false)
public class CancelCustomerProductTagJob implements SimpleJob { public class CancelCustomerProductTagJob implements SimpleJob {
@Autowired @Autowired
private InspectionCustomerTagSyncService inspectionCustomerTagSyncService; private InspectionCustomerTagSyncService inspectionCustomerTagSyncService;
......
...@@ -14,7 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -14,7 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
* @Date 2026/6/18 15:58 * @Date 2026/6/18 15:58
*/ */
@Slf4j @Slf4j
@ElasticJobConf(name = "InspectionCustomerProductTagJob", cron = "0 0 3 * * ?", description = "客户产品标签定时任务", overwrite = false) @ElasticJobConf(name = "InspectionCustomerProductTagJob", cron = "0 0 1 * * ?", description = "客户产品标签定时任务", overwrite = false)
public class InspectionCustomerProductTagJob implements SimpleJob { public class InspectionCustomerProductTagJob implements SimpleJob {
@Autowired @Autowired
......
package cn.com.glsx.dj.strategy.service;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
/**
* @ClassName InspectionCustomerTagSyncServiceTest
* @Description 同步客户标签测试
* @Author lqWang
* @Date 2026/6/23 16:05
*/
@RunWith(SpringRunner.class)
@SpringBootTest
public class InspectionCustomerTagSyncServiceTest {
@Autowired
private InspectionCustomerTagSyncService inspectionCustomerTagSyncService;
@Test
public void syncCustomerTag() {
//inspectionCustomerTagSyncService.syncCustomerProductTagFromInspection("{\"startDate\":\"2026-06-01\",\"endDate\":\"2026-06-22\"}");
inspectionCustomerTagSyncService.cancelCustomerProductTagFromInspection("");
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!