Explorar el Código

账户交易流水

zhouzeyu@c-top.com.cn hace 3 años
padre
commit
69878d0686

+ 41 - 0
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/SynchronousAccountTransactionJob.java

@@ -0,0 +1,41 @@
+package cn.com.ctop.job.kuaishou.handler;
+
+import cn.com.ctop.kuaishou.modules.report.service.NewMonitorService;
+import cn.com.ctop.toutiao.modules.agent.service.AgentManagementService;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+@Component
+@Slf4j
+public class SynchronousAccountTransactionJob {
+
+    @Resource
+    AgentManagementService  agentManagementService;
+
+    /**
+     * 同步头条账户交易流水
+     *
+     * @param
+     * @return
+     * @throws
+     * @author ZZY
+     */
+    @XxlJob("synchronousAccountTransaction")
+    public void execute() throws Exception {
+        SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
+        String date = sd.format(new Date());
+        try {
+            agentManagementService.synchronousAccount();
+            agentManagementService.synchronousAccountTransactionDay(date,date);
+            agentManagementService.synchronousAccountTransactionDetails(date,date);
+        } catch (Exception e) {
+            log.info("同步完成");
+        }
+
+    }
+}