فهرست منبع

盯盘-项目、账户数据导出

yangzian 3 سال پیش
والد
کامیت
0d1adb789d

+ 6 - 0
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/controller/KuaiShouMaterialStareController.java

@@ -350,6 +350,9 @@ public class KuaiShouMaterialStareController {
 
         try {
             JSONObject jsonObject = materialStareMapper.getColumnInfo(userId,"104");
+            if (Check.isNull(jsonObject)){
+                return Result.errorMsg("暂无自定义列。");
+            }
             JSONArray array = jsonObject.getJSONArray("json");
              //第一步创建workbook
             HSSFWorkbook wb = new HSSFWorkbook();
@@ -426,6 +429,9 @@ public class KuaiShouMaterialStareController {
 
         try {
             JSONObject jsonObject = materialStareMapper.getColumnInfo(userId,"102");
+            if (Check.isNull(jsonObject)){
+                return Result.errorMsg("暂无自定义列。");
+            }
             JSONArray array = jsonObject.getJSONArray("json");
              //第一步创建workbook
             HSSFWorkbook wb = new HSSFWorkbook();

+ 12 - 5
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/mapper/xml/MaterialStareMapper.xml

@@ -146,11 +146,11 @@
     <!-- 查看 快手 有效 计划 组-->
     <select id="getKuaiShouAccountBaseByUserId" resultType="com.alibaba.fastjson.JSONObject">
         SELECT abi.account_id ,
-        SUM(abi.new_effect_num) as newEffectNum,
-        SUM(abi.new_campaign_num) as newCampaignNum,
-        SUM(abi.new_unit_num) as newUnitNum,
-        SUM( abi.new_video_num ) AS newVideoNum,
-        SUM( abi.new_hot_num ) AS newHotNum
+        IFNULL(SUM(abi.new_effect_num),0) as newEffectNum,
+        IFNULL(SUM(abi.new_campaign_num),0) as newCampaignNum,
+        IFNULL(SUM(abi.new_unit_num),0) as newUnitNum,
+        IFNULL(SUM( abi.new_video_num ),0) AS newVideoNum,
+        IFNULL(SUM( abi.new_hot_num ),0) AS newHotNum
         from application.app_kuaishou_account_base_info_d abi,
         `jeecg-boot`.ctop_user_allocation u
         WHERE abi.account_id = u.account_id
@@ -1160,5 +1160,12 @@
 
 
 
+    <select id="getColumnInfo" resultType="com.alibaba.fastjson.JSONObject">
+
+        select json from ctop_column_load where user_id = #{userId} and column_type = #{columnType}
+
+    </select>
+
+
 
 </mapper>