|
|
@@ -19,6 +19,7 @@ import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import javax.annotation.PostConstruct;
|
|
|
import java.util.*;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -49,7 +50,7 @@ public class SyncUserDataScheduledService {
|
|
|
* 本地生活
|
|
|
*/
|
|
|
// @Scheduled(cron = "0 0 3 * * ?")
|
|
|
-// @PostConstruct
|
|
|
+ @PostConstruct
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void syncUserDataScheduled() {
|
|
|
try {
|
|
|
@@ -58,8 +59,9 @@ public class SyncUserDataScheduledService {
|
|
|
} catch (InterruptedException e) {
|
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
|
+ log.info("同步本地生活用户 start ==================================");
|
|
|
LocalAppUserDto localAppUserDto = new LocalAppUserDto();
|
|
|
- this.setDate(localAppUserDto);
|
|
|
+// this.setDate(localAppUserDto);
|
|
|
Date now = new Date();
|
|
|
// 查询本地生活 所有的用户 条件 普通用户 创建时间
|
|
|
List<LocalAppUserVo> localAppUserList = localAppUserService.selectUserList(localAppUserDto);
|
|
|
@@ -108,10 +110,10 @@ public class SyncUserDataScheduledService {
|
|
|
weUserService.saveBatch(users);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+ log.info("同步本地生活用户 end ==================================");
|
|
|
+ log.info("同步晋掌柜用户 start ==================================");
|
|
|
SysUserJzgDto sysUserDto = new SysUserJzgDto();
|
|
|
- this.setDate(sysUserDto);
|
|
|
+// this.setDate(sysUserDto);
|
|
|
// 查询本地生活 所有的用户 条件 普通用户 创建时间
|
|
|
List<SysUserJzgVo> sysUserJzgVoList = sysUserJzgService.selectUserList(sysUserDto);
|
|
|
List<SysUserJzgVo> distinctUserList = sysUserJzgVoList.stream()
|
|
|
@@ -153,6 +155,7 @@ public class SyncUserDataScheduledService {
|
|
|
weUserService.saveBatch(users);
|
|
|
}
|
|
|
|
|
|
+ log.info("同步晋掌柜用户 end ==================================");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -160,7 +163,7 @@ public class SyncUserDataScheduledService {
|
|
|
* 本地生活
|
|
|
*/
|
|
|
// @Scheduled(cron = "0 30 3 * * ?")
|
|
|
-// @PostConstruct
|
|
|
+ @PostConstruct
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void syncCustomerUserDataScheduled() {
|
|
|
try {
|
|
|
@@ -169,8 +172,9 @@ public class SyncUserDataScheduledService {
|
|
|
} catch (InterruptedException e) {
|
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
|
+ log.info("同步本地生活微信用户 start ==================================");
|
|
|
LocalAppUserDto localAppUserDto = new LocalAppUserDto();
|
|
|
- this.setDate(localAppUserDto);
|
|
|
+// this.setDate(localAppUserDto);
|
|
|
// 查询本地生活 所有的用户 条件 普通用户 创建时间
|
|
|
localAppUserDto.setIsWx(1);
|
|
|
List<LocalAppUserVo> localAppUserList = localAppUserService.selectUserList(localAppUserDto);
|
|
|
@@ -237,6 +241,7 @@ public class SyncUserDataScheduledService {
|
|
|
}
|
|
|
weCustomerUserService.saveBatch(weCustomerUserList);
|
|
|
}
|
|
|
+ log.info("同步本地生活微信用户 end ==================================");
|
|
|
}
|
|
|
|
|
|
private void setDate(LocalAppUserDto localAppUserDto){
|