yumeng 5 anni fa
parent
commit
c4070bf363

+ 4 - 4
module-report/src/main/java/cn/com/ctop/bytedance/service/impl/AccountReportServiceImpl.java

@@ -200,11 +200,11 @@ public class AccountReportServiceImpl implements IAccountReportService {
                 accountJson = accountReportMapper.selectDayReport(anotherDay, accountIds);
                 detail = accountReportMapper.selectReportDetail(anotherDay, accountIds);
             } else if (type == 3) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -7);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -6);
                 accountJson = accountReportMapper.selectByDate(anotherDay, endDate, accountIds);
                 detail = accountReportMapper.selectDayDetailByDate(anotherDay, endDate, accountIds);
             } else if (type == 4) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -15);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -14);
                 accountJson = accountReportMapper.selectByDate(anotherDay, endDate, accountIds);
                 detail = accountReportMapper.selectDayDetailByDate(anotherDay, endDate, accountIds);
             } else if (type == 5) {
@@ -516,7 +516,7 @@ public class AccountReportServiceImpl implements IAccountReportService {
 
                 returnJson.put("ratioJson", ratioJson);
             } else if (type == 3) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -7);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -6);
                 accountDetail = accountReportMapper.selectAccountReportByDate(anotherDay, endDate, accountIds, discount);
                 statDate = endDate + " ~ " + anotherDay;
 
@@ -527,7 +527,7 @@ public class AccountReportServiceImpl implements IAccountReportService {
 
 
             } else if (type == 4) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -15);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -14);
                 accountDetail = accountReportMapper.selectAccountReportByDate(anotherDay, endDate, accountIds, discount);
                 statDate = endDate + " ~ " + anotherDay;
                 queryMap.put("startDate", endDate);

+ 6 - 6
module-report/src/main/java/cn/com/ctop/bytedance/service/impl/BytedanceReportServiceImpl.java

@@ -283,10 +283,10 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
             } else if (type == 2) {
                 accountJson = reportMapper.selectDayReport(anotherDay);
             } else if (type == 3) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -7);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -6);
                 accountJson = reportMapper.selectByDate(anotherDay, endDate);
             } else if (type == 4) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -15);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -14);
                 accountJson = reportMapper.selectByDate(anotherDay, endDate);
             } else if (type == 5) {
                 String endDate = DateUtils.getMonthBefore("yyyy-MM-dd", anotherDay, -1);
@@ -440,10 +440,10 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
             } else if (type == 2) {
                 detail = reportMapper.selectReportDetail(anotherDay);
             } else if (type == 3) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -7);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -6);
                 detail = reportMapper.selectDayDetailByDate(anotherDay, endDate);
             } else if (type == 4) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -15);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -14);
                 detail = reportMapper.selectDayDetailByDate(anotherDay, endDate);
             } else if (type == 5) {
                 String endDate = DateUtils.getMonthBefore("yyyy-MM-dd", anotherDay, -1);
@@ -580,10 +580,10 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
             } else if (type == 2) {
                 reportList = reportMapper.selectReportDetail(anotherDay);
             } else if (type == 3) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -7);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -6);
                 reportList = reportMapper.selectDayDetailByDate(anotherDay, endDate);
             } else if (type == 4) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -15);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -14);
                 reportList = reportMapper.selectDayDetailByDate(anotherDay, endDate);
             } else if (type == 5) {
                 String endDate = DateUtils.getMonthBefore("yyyy-MM-dd", anotherDay, -1);

+ 8 - 8
module-report/src/main/java/cn/com/ctop/bytedance/service/impl/MaterialReportServiceImpl.java

@@ -86,13 +86,13 @@ public class MaterialReportServiceImpl implements IMaterialReportService {
                 marketJsonList = materialReportMapper.selectByMap(paramsMap);
 
             } else if (type == 3) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -7);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -6);
                 paramsMap.put("startDate", anotherDay);
                 paramsMap.put("endDate", endDate);
                 marketJsonList = materialReportMapper.selectDailyByMap(paramsMap);
 
             } else if (type == 4) {
-                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -15);
+                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -14);
                 paramsMap.put("startDate", anotherDay);
                 paramsMap.put("endDate", endDate);
                 marketJsonList = materialReportMapper.selectDailyByMap(paramsMap);
@@ -190,25 +190,25 @@ public class MaterialReportServiceImpl implements IMaterialReportService {
 
             } else if (type == 3) {
                 // 近一周数据
-                contrastStartDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -7);
+                contrastStartDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -6);
                 paramsMap.put("startDate", contrastStartDate);
                 paramsMap.put("endDate", anotherDay);
                 contrastJson = materialReportMapper.selectDailyChainRatioByMap(paramsMap);
                 if (!Check.isNull(contrastJson)) {
                     beContrastEndDate = DateUtils.getAnotherDay("yyyy-MM-dd", contrastStartDate, -1);
-                    beContrastStartDate = DateUtils.getAnotherDay("yyyy-MM-dd", beContrastEndDate, -7);
+                    beContrastStartDate = DateUtils.getAnotherDay("yyyy-MM-dd", beContrastEndDate, -6);
                     paramsMap.put("endDate", beContrastEndDate);
                     paramsMap.put("startDate", beContrastStartDate);
                     beContrastJson = materialReportMapper.selectDailyChainRatioByMap(paramsMap);
                 }
             } else if (type == 4) {
-                contrastStartDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -15);
+                contrastStartDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -14);
                 paramsMap.put("startDate", contrastStartDate);
                 paramsMap.put("endDate", anotherDay);
                 contrastJson = materialReportMapper.selectDailyChainRatioByMap(paramsMap);
                 if (!Check.isNull(contrastJson)) {
                     beContrastEndDate = DateUtils.getAnotherDay("yyyy-MM-dd", contrastStartDate, -1);
-                    beContrastStartDate = DateUtils.getAnotherDay("yyyy-MM-dd", beContrastEndDate, -15);
+                    beContrastStartDate = DateUtils.getAnotherDay("yyyy-MM-dd", beContrastEndDate, -14);
                     paramsMap.put("endDate", beContrastEndDate);
                     paramsMap.put("startDate", beContrastStartDate);
                     beContrastJson = materialReportMapper.selectDailyChainRatioByMap(paramsMap);
@@ -480,12 +480,12 @@ public class MaterialReportServiceImpl implements IMaterialReportService {
                 paramsMap.put("endDate", anotherDay);
                 marketJsonList = materialReportMapper.selectDayMaterialList(paramsMap);
             } else if (type == 3) {
-                String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -7);
+                String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -6);
                 paramsMap.put("startDate", startDate);
                 paramsMap.put("endDate", anotherDay);
                 marketJsonList = materialReportMapper.selectDayMaterialList(paramsMap);
             } else if (type == 4) {
-                String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -15);
+                String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", anotherDay, -14);
                 paramsMap.put("startDate", startDate);
                 paramsMap.put("endDate", anotherDay);
                 marketJsonList = materialReportMapper.selectDayMaterialList(paramsMap);