恢复晚间删除重新同步操作

畅捷通同步方案更新
YXY 1 year ago
parent a57041d8fe
commit 1f21ae6632

@ -91,26 +91,25 @@ public abstract class SyncAccountsJobAbstract {
private static final String REQUEST_GENERATE_TOKEN_PATH = REQUEST_ROOT_PATH + "/v1/common/auth/selfBuiltApp/generateToken"; private static final String REQUEST_GENERATE_TOKEN_PATH = REQUEST_ROOT_PATH + "/v1/common/auth/selfBuiltApp/generateToken";
private Boolean asynchronousCheck(LocalDateTime now, String cjt) { private Boolean asynchronousCheck(LocalDateTime now, String cjt) {
int hour = now.getHour();
if ((hour == 1 && CjtAccountEnum.ONE.getCode().equals(cjt))
|| (hour == 3 && CjtAccountEnum.TWO.getCode().equals(cjt))) {
//目前只给畅捷通账号二加工单开补偿
// if ((AppType.SYNC_CJT_MANUFACTURE_ORDER_DATA_TO_MULTI_TABLE.getCode().equals(syncLarkAppType().getCode())
// && CjtAccountEnum.TWO.getCode().equals(cjt)) || (AppType.SYNC_CJT_SALE_DISPATCH_DATA_TO_MULTI_TABLE.getCode().equals(syncLarkAppType().getCode())
// && CjtAccountEnum.ONE.getCode().equals(cjt))) {
String asynchronous = getAsynchronousKey(cjt);
Object cacheObject = redisCache.getCacheObject(asynchronous);
if (cacheObject != null) {
return Boolean.FALSE;
}
redisCache.setCacheObject(asynchronous, asynchronous, 2, TimeUnit.HOURS);
return Boolean.TRUE;
// } else {
// return false;
// }
}
return false; return false;
// int hour = now.getHour();
// if ((hour == 1 && CjtAccountEnum.ONE.getCode().equals(cjt))
// || (hour == 3 && CjtAccountEnum.TWO.getCode().equals(cjt))) {
// //目前只给畅捷通账号二加工单开补偿
//// if ((AppType.SYNC_CJT_MANUFACTURE_ORDER_DATA_TO_MULTI_TABLE.getCode().equals(syncLarkAppType().getCode())
//// && CjtAccountEnum.TWO.getCode().equals(cjt)) || (AppType.SYNC_CJT_SALE_DISPATCH_DATA_TO_MULTI_TABLE.getCode().equals(syncLarkAppType().getCode())
//// && CjtAccountEnum.ONE.getCode().equals(cjt))) {
// String asynchronous = getAsynchronousKey(cjt);
// Object cacheObject = redisCache.getCacheObject(asynchronous);
// if (cacheObject != null) {
// return Boolean.FALSE;
// }
// redisCache.setCacheObject(asynchronous, asynchronous, 2, TimeUnit.HOURS);
// return Boolean.TRUE;
//// } else {
//// return false;
//// }
// }
// return false;
} }
private String getAsynchronousKey(String cjt) { private String getAsynchronousKey(String cjt) {

Loading…
Cancel
Save