|
|
|
@ -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 Boolean asynchronousCheck(LocalDateTime now, String cjt) {
|
|
|
|
|
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;
|
|
|
|
|
//// }
|
|
|
|
|
// }
|
|
|
|
|
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) {
|
|
|
|
|