|
@@ -2,24 +2,21 @@ package com.kxs.stat.biz.task;
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DatePattern;
|
|
import cn.hutool.core.date.DatePattern;
|
|
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import com.kxs.common.security.annotation.Inner;
|
|
import com.kxs.common.security.annotation.Inner;
|
|
|
import com.kxs.stat.biz.mapper.KxsUserTradeAfterMapper;
|
|
import com.kxs.stat.biz.mapper.KxsUserTradeAfterMapper;
|
|
|
import com.kxs.stat.biz.mapper.KxsUserTradeBeforeMapper;
|
|
import com.kxs.stat.biz.mapper.KxsUserTradeBeforeMapper;
|
|
|
import com.kxs.stat.biz.mapper.KxsUserTradeMapper;
|
|
import com.kxs.stat.biz.mapper.KxsUserTradeMapper;
|
|
|
-import com.kxs.user.api.model.KxsTotalDebt;
|
|
|
|
|
|
|
+import com.kxs.stat.biz.service.KxsUserTradeService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
|
-import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 产品模块定时任务
|
|
|
|
|
|
|
+ * 统计模块定时任务
|
|
|
*
|
|
*
|
|
|
* @author 没秃顶的码农
|
|
* @author 没秃顶的码农
|
|
|
* @date 2024-03-13
|
|
* @date 2024-03-13
|
|
@@ -27,8 +24,8 @@ import java.util.List;
|
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@RestController
|
|
@RestController
|
|
|
-@RequestMapping("statJob")
|
|
|
|
|
-public class KxsUserTaskJob {
|
|
|
|
|
|
|
+@RequestMapping("stat-job")
|
|
|
|
|
+public class KxsStatTaskJob {
|
|
|
|
|
|
|
|
private final KxsUserTradeMapper kxsUserTradeMapper;
|
|
private final KxsUserTradeMapper kxsUserTradeMapper;
|
|
|
|
|
|
|
@@ -36,13 +33,25 @@ public class KxsUserTaskJob {
|
|
|
|
|
|
|
|
private final KxsUserTradeAfterMapper kxsUserTradeAfterMapper;
|
|
private final KxsUserTradeAfterMapper kxsUserTradeAfterMapper;
|
|
|
|
|
|
|
|
|
|
+ private final KxsUserTradeService kxsUserTradeService;
|
|
|
|
|
+
|
|
|
private final static String PREFIX_TABLE_NAME = "kxs_user_trade_";
|
|
private final static String PREFIX_TABLE_NAME = "kxs_user_trade_";
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 股东大盘分红积分计算任务
|
|
|
|
|
+ */
|
|
|
|
|
+ @Inner
|
|
|
|
|
+ @GetMapping("/getUserTradeList")
|
|
|
|
|
+ public void getUserTradeList() {
|
|
|
|
|
+ kxsUserTradeService.getUserTradeList();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 自动表创建任务
|
|
* 自动表创建任务
|
|
|
* 每个月15号建立下个月的统计表表
|
|
* 每个月15号建立下个月的统计表表
|
|
|
*/
|
|
*/
|
|
|
- @Inner(value = false)
|
|
|
|
|
|
|
+ @Inner
|
|
|
@GetMapping("/automaticTableCreationTasks")
|
|
@GetMapping("/automaticTableCreationTasks")
|
|
|
public void automaticTableCreationTasks() {
|
|
public void automaticTableCreationTasks() {
|
|
|
String thisMoth = LocalDateTimeUtil.format(LocalDate.now().plusMonths(1L), DatePattern.SIMPLE_MONTH_PATTERN);
|
|
String thisMoth = LocalDateTimeUtil.format(LocalDate.now().plusMonths(1L), DatePattern.SIMPLE_MONTH_PATTERN);
|