|
@@ -338,10 +338,23 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
KuaishouReportDailyAccount.setAccountId(token.getAccountId());
|
|
KuaishouReportDailyAccount.setAccountId(token.getAccountId());
|
|
if (Check.isNull(reportDims)) {
|
|
if (Check.isNull(reportDims)) {
|
|
BigDecimal totalCharge = KuaishouReportDailyAccount.getCharge();
|
|
BigDecimal totalCharge = KuaishouReportDailyAccount.getCharge();
|
|
|
|
+ if (BigDecimalUtil.compareToDecimal(totalCharge, new BigDecimal(0)) == 0 || Check.isNull(totalCharge)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // 非联盟消耗
|
|
BigDecimal sumCharge = dailyAccountMapper.getSumChargeByAccountIdAndStatDate(KuaishouReportDailyAccount.getAccountId(), KuaishouReportDailyAccount.getStatDate());
|
|
BigDecimal sumCharge = dailyAccountMapper.getSumChargeByAccountIdAndStatDate(KuaishouReportDailyAccount.getAccountId(), KuaishouReportDailyAccount.getStatDate());
|
|
- BigDecimal lianMengCharge = BigDecimalUtil.subtractBigDecimal(totalCharge, sumCharge);
|
|
|
|
- KuaishouReportDailyAccount.setCharge(lianMengCharge);
|
|
|
|
- KuaishouReportDailyAccount.setAdScene("广告联盟");
|
|
|
|
|
|
+ if (Check.isNull(sumCharge) || BigDecimalUtil.compareToDecimal(sumCharge, new BigDecimal(0)) == 0) {
|
|
|
|
+ KuaishouReportDailyAccount.setCharge(totalCharge);
|
|
|
|
+ KuaishouReportDailyAccount.setAdScene("广告联盟");
|
|
|
|
+ } else {
|
|
|
|
+ if (BigDecimalUtil.compareToDecimal(totalCharge, sumCharge) == 0) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ BigDecimal lianMengCharge = BigDecimalUtil.subtractBigDecimal(totalCharge, sumCharge);
|
|
|
|
+ KuaishouReportDailyAccount.setCharge(lianMengCharge);
|
|
|
|
+ KuaishouReportDailyAccount.setAdScene("广告联盟");
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
addList.add(KuaishouReportDailyAccount);
|
|
addList.add(KuaishouReportDailyAccount);
|
|
}
|
|
}
|