Kaynağa Gözat

Merge remote-tracking branch 'origin/test' into test

syh 5 yıl önce
ebeveyn
işleme
10d5688a7e

+ 1 - 2
module-common/src/main/java/cn/com/ctop/common/module/mapper/xml/CtopOauthTokenMapper.xml

@@ -92,8 +92,7 @@
         from ctop_oauth_token t1
         left join ctop_user_allocation t2
         on t1.account_id = t2.account_id
-        where t2.account_status = 0
-        and t1.media_id in (1,3)
+        where t1.media_id in (1,3)
         group by account_id
     </select>
 

+ 3 - 1
module-common/src/main/java/cn/com/ctop/common/module/utils/HttpUtils.java

@@ -59,7 +59,9 @@ public class HttpUtils {
     public static void setResponseHeader(HttpServletResponse response, String fileName) {
         try {
             fileName = new String(fileName.getBytes(), StandardCharsets.UTF_8);
-            response.setContentType("application/octet-stream;charset=ISO8859-1");
+            //response.setContentType("application/octet-stream;charset=ISO8859-1");
+            response.setContentType("application/vnd.ms-excel;charset=gb2312");
+
             response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
             response.addHeader("Pargam", "no-cache");
             response.addHeader("Cache-Control", "no-cache");

+ 5 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceAccountReportServiceImpl.java

@@ -39,6 +39,9 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
                 return result;
             }
             before = bytedanceAccountReportMapper.queryTodaySumByHour(DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, startDate, -1), after.getInteger("maxHour"), accounts);
+            if(before==null){
+                return result;
+            }
         } else {
             after = bytedanceAccountReportMapper.querySumByStartEndDate(endDate, startDate, accounts);
             if(after==null){
@@ -56,11 +59,11 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
         String filedAll = JsonResourceUtil.joinAllFiled();
         if (startDate.equals(endDate)) {
             List<JSONObject> after = bytedanceAccountReportMapper.queryTodayDetailReportBy(filedAll, startDate, accounts);
-            if(after==null){
+            List<JSONObject> before = bytedanceAccountReportMapper.queryTodayDetailReportBy(filedAll, DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, startDate, -1), accounts);
+            if(after==null||before==null){
                 return result;
             }
             List<JSONObject> afterDis = this.countDiscountCost(mediaId, discount, after);
-            List<JSONObject> before = bytedanceAccountReportMapper.queryTodayDetailReportBy(filedAll, DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, startDate, -1), accounts);
             List<JSONObject> beforeDis = this.countDiscountCost(mediaId, discount, before);
             result = LinkUtils.getCompareDate(beforeDis, afterDis, "statHour");
         } else {