|
@@ -35,6 +35,10 @@ public class TulinInfoSyncLogServiceImpl implements ITulinInfoSyncLogService {
|
|
|
|
|
|
private final Environment environment;
|
|
|
|
|
|
+ private final String PROD_URL = "https://papi.xiangyue.life/api/v1/mp/sync/student?sign=%s&t=%d";
|
|
|
+ private final String DEV_URL = "https://api.xiangyue.life/api/v1/mp/sync/student?sign=%s&t=%d";
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public void syncInfo() {
|
|
|
// 获取当前激活的profile
|
|
@@ -53,8 +57,27 @@ public class TulinInfoSyncLogServiceImpl implements ITulinInfoSyncLogService {
|
|
|
studentInfo.setAppid("wx6688e6b9b6fb8700");
|
|
|
studentInfo.setColumn_name(ColumnNameEnum.GYBNX.getName());
|
|
|
studentInfo.setPharmacy_id(PharmacyEnum.YJKYSY.getPharmacyId());
|
|
|
+ studentInfo.setService_phone("15141712344");
|
|
|
+ try {
|
|
|
+ TulinInfoSyncLog tulinInfoSyncLog = SyncStudentInfoService.send(PROD_URL,"lRz72QOIYBxJW2RBAp2UYe1ckjVpixHL", studentInfo);
|
|
|
+ tulinInfoSyncLog.setFsUserId(qwExUserInfo.getFs_user_id());
|
|
|
+ insert(tulinInfoSyncLog);
|
|
|
+ } catch (JsonProcessingException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(activeProfile.equals("dev")) {
|
|
|
+ log.info("线下开始执行数据同步");
|
|
|
+ for (QwExUserInfo qwExUserInfo : qwExUserInfos) {
|
|
|
+ StudentInfo studentInfo = new StudentInfo();
|
|
|
+ BeanUtils.copyProperties(qwExUserInfo, studentInfo);
|
|
|
+ studentInfo.setAppid("wx6688e6b9b6fb8700");
|
|
|
+ studentInfo.setColumn_name(ColumnNameEnum.GYBNX.getName());
|
|
|
+ studentInfo.setPharmacy_id(PharmacyEnum.YJKYSY.getPharmacyId());
|
|
|
+ studentInfo.setService_phone("15141712344");
|
|
|
try {
|
|
|
- TulinInfoSyncLog tulinInfoSyncLog = SyncStudentInfoService.send("PNBnO6MajM0tAd8t", studentInfo);
|
|
|
+ TulinInfoSyncLog tulinInfoSyncLog = SyncStudentInfoService.send(PROD_URL,"lRz72QOIYBxJW2RBAp2UYe1ckjVpixHL", studentInfo);
|
|
|
tulinInfoSyncLog.setFsUserId(qwExUserInfo.getFs_user_id());
|
|
|
insert(tulinInfoSyncLog);
|
|
|
} catch (JsonProcessingException e) {
|
|
@@ -62,23 +85,6 @@ public class TulinInfoSyncLogServiceImpl implements ITulinInfoSyncLogService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-// if(activeProfile.equals("dev")) {
|
|
|
-// log.info("线下开始执行数据同步");
|
|
|
-// for (QwExUserInfo qwExUserInfo : qwExUserInfos) {
|
|
|
-// StudentInfo studentInfo = new StudentInfo();
|
|
|
-// BeanUtils.copyProperties(qwExUserInfo, studentInfo);
|
|
|
-// studentInfo.setAppid("wx6688e6b9b6fb8700");
|
|
|
-// studentInfo.setColumn_name(ColumnNameEnum.GYBNX.getName());
|
|
|
-// studentInfo.setPharmacy_id(PharmacyEnum.YJKYSY.getPharmacyId());
|
|
|
-// try {
|
|
|
-// TulinInfoSyncLog tulinInfoSyncLog = SyncStudentInfoService.send("PNBnO6MajM0tAd8t", studentInfo);
|
|
|
-// tulinInfoSyncLog.setFsUserId(qwExUserInfo.getFs_user_id());
|
|
|
-// insert(tulinInfoSyncLog);
|
|
|
-// } catch (JsonProcessingException e) {
|
|
|
-// throw new RuntimeException(e);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
}
|
|
|
|
|
|
|