|
@@ -2,8 +2,10 @@ package cn.com.ctop.bytedance.service.impl;
|
|
|
|
|
|
import cn.com.ctop.bytedance.entity.BytedanceAdvertiserDailyReport;
|
|
import cn.com.ctop.bytedance.entity.BytedanceAdvertiserDailyReport;
|
|
import cn.com.ctop.bytedance.mapper.BytedanceAdvertiserDailyReportMapper;
|
|
import cn.com.ctop.bytedance.mapper.BytedanceAdvertiserDailyReportMapper;
|
|
-import cn.com.ctop.bytedance.mapper.ReportMapper;
|
|
|
|
|
|
+import cn.com.ctop.bytedance.mapper.BytedanceCampaignDailyReportMapper;
|
|
|
|
+import cn.com.ctop.bytedance.mapper.BytedanceReportMapper;
|
|
import cn.com.ctop.bytedance.service.IBytedanceReportService;
|
|
import cn.com.ctop.bytedance.service.IBytedanceReportService;
|
|
|
|
+import cn.com.ctop.bytedance.vo.ReportVO;
|
|
import cn.com.ctop.common.module.entity.UserAllocation;
|
|
import cn.com.ctop.common.module.entity.UserAllocation;
|
|
import cn.com.ctop.common.module.mapper.UserAllocationMapper;
|
|
import cn.com.ctop.common.module.mapper.UserAllocationMapper;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
@@ -30,7 +32,7 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
|
|
private BytedanceAdvertiserDailyReportMapper bytedanceAdvertiserDailyReportMapper;
|
|
private BytedanceAdvertiserDailyReportMapper bytedanceAdvertiserDailyReportMapper;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- private ReportMapper reportMapper;
|
|
|
|
|
|
+ private BytedanceReportMapper reportMapper;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private KuaishouReportDailyAccountMapper kuaishouReportDailyAccountMapper;
|
|
private KuaishouReportDailyAccountMapper kuaishouReportDailyAccountMapper;
|
|
@@ -194,6 +196,9 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
|
|
* @param requestJson
|
|
* @param requestJson
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
|
|
+ @Autowired
|
|
|
|
+ private BytedanceCampaignDailyReportMapper campaignDailyReportMapper;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public JSONObject getKuaiShouAccountReport(JSONObject requestJson) {
|
|
public JSONObject getKuaiShouAccountReport(JSONObject requestJson) {
|
|
Integer type = requestJson.getInteger("type");
|
|
Integer type = requestJson.getInteger("type");
|
|
@@ -203,7 +208,10 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
|
|
String nowDate = DateUtils.getNowDate("yyyy-MM-dd"); // 当前日期
|
|
String nowDate = DateUtils.getNowDate("yyyy-MM-dd"); // 当前日期
|
|
String anotherDay = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1); // 当前日期-1
|
|
String anotherDay = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1); // 当前日期-1
|
|
if (type == 1) { // 今日总消耗
|
|
if (type == 1) { // 今日总消耗
|
|
- accountJson = reportMapper.selectDayReport(nowDate);
|
|
|
|
|
|
+ ReportVO reportVO = campaignDailyReportMapper.selectDayReport(nowDate);
|
|
|
|
+ System.err.println("12312312313131313131313131313131");
|
|
|
|
+ System.err.println(reportVO.toString());
|
|
|
|
+ System.err.println("----------------------------------------------");
|
|
JSONObject yesterJson = reportMapper.selectYesterday(anotherDay);
|
|
JSONObject yesterJson = reportMapper.selectYesterday(anotherDay);
|
|
if (!Check.isNull(yesterJson)) {
|
|
if (!Check.isNull(yesterJson)) {
|
|
BigDecimal cost = accountJson.getBigDecimal("cost"); // 今日消耗
|
|
BigDecimal cost = accountJson.getBigDecimal("cost"); // 今日消耗
|