|
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.Calendar;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
|
|
|
@Component
|
|
@Component
|
|
@@ -28,7 +29,10 @@ public class SynchronousAccountTransactionJob {
|
|
@XxlJob("synchronousAccountTransaction")
|
|
@XxlJob("synchronousAccountTransaction")
|
|
public void execute() throws Exception {
|
|
public void execute() throws Exception {
|
|
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
|
|
- String date = sd.format(new Date());
|
|
|
|
|
|
+ Calendar ca = Calendar.getInstance();//得到一个Calendar的实例
|
|
|
|
+ ca.setTime(new Date()); //设置时间为当前时间
|
|
|
|
+ ca.add(Calendar.DAY_OF_MONTH, -1); //设置为前一天
|
|
|
|
+ String date = sd.format(ca.getTime());
|
|
try {
|
|
try {
|
|
agentManagementService.synchronousAccount();
|
|
agentManagementService.synchronousAccount();
|
|
agentManagementService.synchronousAccountTransactionDay(date,date);
|
|
agentManagementService.synchronousAccountTransactionDay(date,date);
|