Commit 5c8b2561 by huluobin

账户信息

parent 484fbd3e
...@@ -49,8 +49,9 @@ public class CompanyAccountSyncJob extends PointJob { ...@@ -49,8 +49,9 @@ public class CompanyAccountSyncJob extends PointJob {
} }
} }
if (StringUtils.isNotBlank(resultStr)) { if (StringUtils.isNotBlank(resultStr)) {
AccountResult<CompanyAccountInfo> companyAccountInfoResult = JSONObject.parseObject(resultStr, new TypeReference<AccountResult<CompanyAccountInfo>>(){}); AccountResult<CompanyAccountInfo> companyAccountInfoResult = JSONObject.parseObject(resultStr, new TypeReference<AccountResult<CompanyAccountInfo>>() {
if (companyAccountInfoResult.getSuccess()!= null && companyAccountInfoResult.getSuccess()) { });
if (companyAccountInfoResult.getSuccess() != null && companyAccountInfoResult.getSuccess()) {
List<CompanyAccountInfo> result = companyAccountInfoResult.getData(); List<CompanyAccountInfo> result = companyAccountInfoResult.getData();
if (result != null && result.size() > 0) { if (result != null && result.size() > 0) {
DcBaseCompanyAccountMapper mapper = SessionUtil.getSession().getMapper(DcBaseCompanyAccountMapper.class); DcBaseCompanyAccountMapper mapper = SessionUtil.getSession().getMapper(DcBaseCompanyAccountMapper.class);
...@@ -71,11 +72,13 @@ public class CompanyAccountSyncJob extends PointJob { ...@@ -71,11 +72,13 @@ public class CompanyAccountSyncJob extends PointJob {
} }
} }
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException("Mybatis操作DB失败",e); throw new RuntimeException("Mybatis操作DB失败", e);
} finally { } finally {
SessionUtil.closeSession(); SessionUtil.closeSession();
} }
} }
log.info("授权账户信息完成");
} else { } else {
throw new RuntimeException("调用公司账户授权信息接口返回错误"); throw new RuntimeException("调用公司账户授权信息接口返回错误");
} }
......
#COMPANY_INFO_URL=http://sso.bailuntec.com/GetCompanys #COMPANY_INFO_URL=http://sso.bailuntec.com/GetCompanys
#COMPANY_STAFF_URL=http://sso.bailuntec.com/GetUserByCompany #COMPANY_STAFF_URL=http://sso.bailuntec.com/GetUserByCompany
#COMPANY_ACCOUNT_URL=http://pams.bailuntec.com/Api/GetAccountToken COMPANY_ACCOUNT_URL=http://pams.bailuntec.com/Api/GetAccountToken
COMPANY_INFO_URL=http://172.31.255.10/GetCompanys COMPANY_INFO_URL=http://172.31.255.10/GetCompanys
COMPANY_STAFF_URL=http://172.31.255.10/GetUserByCompany COMPANY_STAFF_URL=http://172.31.255.10/GetUserByCompany
COMPANY_ACCOUNT_URL=http://10.0.6.17:8090/Api/GetAccountToken #COMPANY_ACCOUNT_URL=http://10.0.6.17:8090/Api/GetAccountToken
PAYPAL_ACCOUNT_URL=http://pams.bailuntec.com/Api/GetPayPalAccounts PAYPAL_ACCOUNT_URL=http://pams.bailuntec.com/Api/GetPayPalAccounts
...@@ -124,7 +124,8 @@ public class SyncCostFirstJob extends PointJob { ...@@ -124,7 +124,8 @@ public class SyncCostFirstJob extends PointJob {
DcBaseCostFirstExample.newAndCreateCriteria() DcBaseCostFirstExample.newAndCreateCriteria()
.andBailunSkuEqualTo(dcBaseCostFirst.getBailunSku()) .andBailunSkuEqualTo(dcBaseCostFirst.getBailunSku())
.andChannelOrderIdEqualTo(dcBaseCostFirst.getChannelOrderId()) .andChannelOrderIdEqualTo(dcBaseCostFirst.getChannelOrderId())
.andBoxIdEqualTo(dcBaseCostFirst.getBoxId()).andTransferOrderIdEqualTo(dcBaseCostFirst.getTransferOrderId()) .andBoxIdEqualTo(dcBaseCostFirst.getBoxId())
.andTransferOrderIdEqualTo(dcBaseCostFirst.getTransferOrderId())
.andWarehouseCodeEqualTo(dcBaseCostFirst.getWarehouseCode()) .andWarehouseCodeEqualTo(dcBaseCostFirst.getWarehouseCode())
.example()); .example());
if (i == 0) { if (i == 0) {
......
...@@ -10,8 +10,8 @@ public class SyncCostFirstTest { ...@@ -10,8 +10,8 @@ public class SyncCostFirstTest {
public void test() { public void test() {
SyncCostFirstJob syncCostFirstJob = new SyncCostFirstJob(); SyncCostFirstJob syncCostFirstJob = new SyncCostFirstJob();
JobPointLog jobPointLog = new JobPointLog("base-sync-cost-first", 1, 1, 1, 1, JobPointLog jobPointLog = new JobPointLog("base-sync-cost-first", 1, 1, 1, 1,
LocalDateTime.of(2020,8,14,9,0,0), LocalDateTime.of(2020,1,1,9,0,0),
LocalDateTime.of(2020,8,17,13,0,0)); LocalDateTime.of(2020,8,20,0,0,0));
syncCostFirstJob.executeJob(null, jobPointLog); syncCostFirstJob.executeJob(null, jobPointLog);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment