|
@@ -109,7 +109,6 @@ public class BatchController {
|
|
SpendVo spendVo = new SpendVo();
|
|
SpendVo spendVo = new SpendVo();
|
|
JSONObject fundJson = iKuaishouInterfaceService.fundGet(oauthToken);
|
|
JSONObject fundJson = iKuaishouInterfaceService.fundGet(oauthToken);
|
|
|
|
|
|
-
|
|
|
|
if (!Check.isNull(fundJson)) {
|
|
if (!Check.isNull(fundJson)) {
|
|
spendVo.setBalance(fundJson.getBigDecimal("balance")); // 余额
|
|
spendVo.setBalance(fundJson.getBigDecimal("balance")); // 余额
|
|
}
|
|
}
|
|
@@ -120,15 +119,7 @@ public class BatchController {
|
|
spendVo.setBudget(budget);
|
|
spendVo.setBudget(budget);
|
|
result.setSuccess(true);
|
|
result.setSuccess(true);
|
|
result.setResult(spendVo);
|
|
result.setResult(spendVo);
|
|
-
|
|
|
|
String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
- String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
|
|
|
|
- String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, 1);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- iKuaishouInterfaceService.getCampaignList(oauthToken, new java.util.Date(), new java.util.Date());
|
|
|
|
-
|
|
|
|
-
|
|
|
|
Thread thread = new Thread() {
|
|
Thread thread = new Thread() {
|
|
@Override
|
|
@Override
|
|
public void run() {
|
|
public void run() {
|
|
@@ -149,21 +140,12 @@ public class BatchController {
|
|
Thread thread2 = new Thread() {
|
|
Thread thread2 = new Thread() {
|
|
@Override
|
|
@Override
|
|
public void run() {
|
|
public void run() {
|
|
- // syncPullMaterialService.getSyncVideoList(accountId, nowDate, nowDate);
|
|
|
|
iKuaishouInterfaceService.getVideoList(oauthToken, nowDate, nowDate);
|
|
iKuaishouInterfaceService.getVideoList(oauthToken, nowDate, nowDate);
|
|
|
|
|
|
}
|
|
}
|
|
};
|
|
};
|
|
thread2.start();
|
|
thread2.start();
|
|
|
|
|
|
- /* Thread thread3 = new Thread() {
|
|
|
|
- @Override
|
|
|
|
- public void run() {
|
|
|
|
- iKuaishouInterfaceService.getSuZaoList(oauthToken.getAccessToken(), accountId, 1, nowDate, endDate);
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- thread3.start();*/
|
|
|
|
-
|
|
|
|
Thread thread4 = new Thread() {
|
|
Thread thread4 = new Thread() {
|
|
@Override
|
|
@Override
|
|
public void run() {
|
|
public void run() {
|
|
@@ -172,7 +154,6 @@ public class BatchController {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
thread4.start();
|
|
thread4.start();
|
|
-
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
result.setSuccess(false);
|
|
result.setSuccess(false);
|
|
@@ -198,10 +179,11 @@ public class BatchController {
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
HttpServletRequest req) {
|
|
HttpServletRequest req) {
|
|
Result<IPage<KuaiShouCampaign>> result = new Result<>();
|
|
Result<IPage<KuaiShouCampaign>> result = new Result<>();
|
|
|
|
+ CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(kuaiShouCampaign.getAccountId());
|
|
|
|
+ iKuaishouInterfaceService.getCampaignList(oauthToken, new java.util.Date(), new java.util.Date());
|
|
String campaignName = kuaiShouCampaign.getCampaignName();
|
|
String campaignName = kuaiShouCampaign.getCampaignName();
|
|
kuaiShouCampaign.setCampaignName(null);
|
|
kuaiShouCampaign.setCampaignName(null);
|
|
if (!Check.isNull(kuaiShouCampaign.getCampaignId())) {
|
|
if (!Check.isNull(kuaiShouCampaign.getCampaignId())) {
|
|
- CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(kuaiShouCampaign.getAccountId());
|
|
|
|
iKuaishouInterfaceService.getCampaign(oauthToken.getAccessToken(), kuaiShouCampaign.getAccountId(), kuaiShouCampaign.getCampaignId());
|
|
iKuaishouInterfaceService.getCampaign(oauthToken.getAccessToken(), kuaiShouCampaign.getAccountId(), kuaiShouCampaign.getCampaignId());
|
|
}
|
|
}
|
|
QueryWrapper<KuaiShouCampaign> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCampaign, req.getParameterMap());
|
|
QueryWrapper<KuaiShouCampaign> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCampaign, req.getParameterMap());
|