yumeng 4 år sedan
förälder
incheckning
d14fda706a

+ 1 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaiShouAccountReportServiceImpl.java

@@ -93,13 +93,11 @@ public class KuaiShouAccountReportServiceImpl implements IKuaiShouAccountReportS
     public List<JSONObject> getListDataBy(String mediaId, BigDecimal discount, JSONArray accounts, String startDate, String endDate, int hour, String target, String order) {
         List<JSONObject> result;
         String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.dicMapKs);
-        System.err.println(filedAll);
-         if (startDate.equals(endDate)) {
+        if (startDate.equals(endDate)) {
             if (startDate.equals(DateUtils.date2Str())) {
                 result = kuaiShouAccountReportMapper.queryTodaySumByHourGroupAccount(filedAll, startDate, hour, accounts, target, order);
                 JSONObject afterSum = kuaiShouAccountReportMapper.querySumByHour(filedAll, startDate, hour, accounts);
                 JSONObject beforeSum = kuaiShouAccountReportMapper.querySumByHour(filedAll, DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, startDate, -1), hour, accounts);
-                System.err.println(afterSum);
                 result.add(afterSum);
                 result.add(beforeSum);
                 result.add(countTotal(afterSum, beforeSum));
@@ -196,8 +194,6 @@ public class KuaiShouAccountReportServiceImpl implements IKuaiShouAccountReportS
             if ("accountId".equals(k) || "authName".equals(k) || v.toString().contains("%") || before.getString(k).contains("%")) {
                 jsonObject.put(k, "-");
             } else {
-                System.err.println(k);
-                System.err.println(k);
                 jsonObject.put(k, (LinkUtils.countLink(after.getBigDecimal(k) == null ? zero : after.getBigDecimal(k), before.getBigDecimal(k) == null ? zero : before.getBigDecimal(k))).multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP) + "%");
             }
         });

+ 2 - 3
module-kuaishou/src/main/resources/json_template/kuaishou_filed_mapping.json

@@ -20,7 +20,7 @@
     "comment": "行为数"
   },
   "clickRate": {
-    "filed": "",
+    "filed": "CASE WHEN sum(t1.photo_show) != 0    THEN CONCAT( CAST(ROUND((sum(t1.photo_click) / sum(t1.photo_show)) * 100,2) AS CHAR) ,'%') else '0%' END AS clickRate ",
     "comment": "封面点击率"
   },
   "bClickRate": {
@@ -71,9 +71,8 @@
     "filed": "CASE WHEN sum(t1.charge) / sum(t1.activation) IS NULL THEN 0 ELSE sum(t1.charge) / sum(t1.activation) end AS activeCost ",
     "comment": "激活单价"
   },
-
   "firstDayPay": {
-    "filed": "CASE WHEN sum(t1.event_pay_first_day) != 0 THEN sum(t1.event_pay_first_day) ELSE 0 as firstDayPay ",
+    "filed": "CASE WHEN sum(t1.event_pay_first_day) != 0 THEN sum(t1.event_pay_first_day) ELSE 0  end as firstDayPay ",
     "comment": "首日付费次数"
   },
   "firstDayPayAmount": {