|
@@ -52,6 +52,7 @@ import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
import java.lang.reflect.ParameterizedType;
|
|
|
import java.lang.reflect.Type;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
@@ -325,7 +326,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
log.info("快手广告主报表信息为空=》accountId:{}", token.getAccountId());
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
List<KuaishouReportDailyAccount> addList = new ArrayList<>();
|
|
|
for (int i = 0; i < details.size(); i++) {
|
|
|
JSONObject detailJson = details.getJSONObject(i);
|
|
@@ -336,11 +336,16 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
detailJson.put("photo_show", detailJson.getString("show"));
|
|
|
KuaishouReportDailyAccount KuaishouReportDailyAccount = JSONObject.toJavaObject(detailJson, KuaishouReportDailyAccount.class);
|
|
|
KuaishouReportDailyAccount.setAccountId(token.getAccountId());
|
|
|
- // dailyAccountMapper.insertSelective(KuaishouReportDailyAccount);
|
|
|
+ if (Check.isNull(reportDims)) {
|
|
|
+ BigDecimal totalCharge = KuaishouReportDailyAccount.getCharge();
|
|
|
+ BigDecimal sumCharge = dailyAccountMapper.getSumChargeByAccountIdAndStatDate(KuaishouReportDailyAccount.getAccountId(), KuaishouReportDailyAccount.getStatDate());
|
|
|
+ BigDecimal lianMengCharge = BigDecimalUtil.subtractBigDecimal(totalCharge, sumCharge);
|
|
|
+ KuaishouReportDailyAccount.setCharge(lianMengCharge);
|
|
|
+ KuaishouReportDailyAccount.setAdScene("广告联盟");
|
|
|
+ }
|
|
|
addList.add(KuaishouReportDailyAccount);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
dailyAccountMapper.replaceBatch(addList);
|
|
|
getAccountDailyReportByPage(token, startDate, endDate, page + 1, reportDims);
|
|
|
}
|