|
@@ -24,12 +24,12 @@ public class RuleByteDanceAccountServiceImpl extends ServiceImpl<RuleDataAccount
|
|
|
|
|
|
@Override
|
|
|
public void cleanRuleDataAccount(Long accountId) {
|
|
|
- CtopOauthToken oauthToken=oauthTokenService.getTokenByAccountId(accountId);
|
|
|
+ CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
|
|
|
//查询账户实时数据
|
|
|
- JSONObject dataAccount=byteDanceGetAccountFundService.getAccountReportBy(oauthToken,accountId);
|
|
|
- if(!dataAccount.isEmpty()){
|
|
|
- JSONObject fundData=byteDanceGetAccountFundService.getAccountFundBy(oauthToken,accountId);
|
|
|
- RuleDataAccount ruleDataAccount=new RuleDataAccount();
|
|
|
+ JSONObject dataAccount = byteDanceGetAccountFundService.getAccountReportBy(oauthToken, accountId);
|
|
|
+ if (!dataAccount.isEmpty()) {
|
|
|
+ JSONObject fundData = byteDanceGetAccountFundService.getAccountFundBy(oauthToken, accountId);
|
|
|
+ RuleDataAccount ruleDataAccount = new RuleDataAccount();
|
|
|
ruleDataAccount.setId(accountId);
|
|
|
ruleDataAccount.setAccountId(accountId);
|
|
|
ruleDataAccount.setAccountName(fundData.getString("name"));
|
|
@@ -47,7 +47,8 @@ public class RuleByteDanceAccountServiceImpl extends ServiceImpl<RuleDataAccount
|
|
|
|
|
|
@Override
|
|
|
public void getBytedanceAccountBalance(CtopOauthToken token) {
|
|
|
- JSONObject fundData=byteDanceGetAccountFundService.getAccountFundBy(token,token.getAccountId());
|
|
|
+ JSONObject fundData = byteDanceGetAccountFundService.getAccountFundBy(token, token.getAccountId());
|
|
|
+ log.error(fundData + "");
|
|
|
ruleDataAccountService.replaceBytedanceAccountBalance(fundData);
|
|
|
}
|
|
|
}
|