Sfoglia il codice sorgente

fix: 企业动态过滤变更时间为空

许家凯 4 anni fa
parent
commit
df2e2256fa

+ 22 - 12
src/main/scala/com/winhc/bigdata/spark/jobs/dynamic/CompanyDynamicHandle.scala

@@ -1,11 +1,13 @@
 package com.winhc.bigdata.spark.jobs.dynamic
 
+import org.apache.spark.internal.Logging
+
 /**
  * @Author: XuJiakai
  * @Date: 2020/7/27 17:05
  * @Description:
  */
-trait CompanyDynamicHandle {
+trait CompanyDynamicHandle extends Logging {
 
   //废弃
   private val table_2_sub_info_type_map = Map(
@@ -201,17 +203,25 @@ trait CompanyDynamicHandle {
     if (rta_desc == null) {
       return Seq.empty
     }
-    Seq((cid
-      , cname
-      , get_info_type()
-      , rta_desc
-      , get_change_content(old_map, new_map)
-      , get_change_time(bizDate, new_map)
-      , get_biz_id(rowkey, new_map)
-      , get_sub_info_type()
-      , get_info_risk_level(old_map, new_map)
-      , if (suggestion == null) null else suggestion
-    ))
+    try {
+      Seq((cid
+        , cname
+        , get_info_type()
+        , rta_desc
+        , get_change_content(old_map, new_map)
+        , get_change_time(bizDate, new_map)
+        , get_biz_id(rowkey, new_map)
+        , get_sub_info_type()
+        , get_info_risk_level(old_map, new_map)
+        , if (suggestion == null) null else suggestion
+      ))
+    } catch {
+      case e: Exception => {
+        logError(e.getMessage, e)
+      }
+        Seq.empty
+    }
+
   }
 
   /**