Ver Fonte

feat: 主要成员变更提取

许家凯 há 4 anos atrás
pai
commit
20c8424683

+ 1 - 1
src/main/scala/com/winhc/bigdata/spark/jobs/chance/ChangeExtract.scala

@@ -259,7 +259,7 @@ object ChangeExtract {
     , Args(tableName = "company_own_tax", primaryFields = "tax_balance,tax_category,tax_num")
 
     , Args(tableName = "company_equity_info", primaryKey = "id", primaryFields = "reg_number", isCopy = false)
-    //    , Args(tableName = "company_staff", primaryFields = "staff_type")
+    , Args(tableName = "company_staff", primaryFields = "staff_type")
 
   )
 

+ 19 - 0
src/main/scala/com/winhc/bigdata/spark/jobs/chance/table/company_staff.scala

@@ -0,0 +1,19 @@
+package com.winhc.bigdata.spark.jobs.chance.table
+
+import com.winhc.bigdata.spark.jobs.chance.CompanyChangeHandle
+import com.winhc.bigdata.spark.utils.ChangeExtractUtils
+
+/**
+ * @Author: XuJiakai
+ * @Date: 2020/8/4 15:06
+ * @Description:
+ */
+case class company_staff(equCols: Seq[String]) extends CompanyChangeHandle {
+  override def getUpdateTitle(newMap: Map[String, String]): String = "成员职位发生变更"
+
+  override def getInsertTitle(newMap: Map[String, String]): String = newMap("hid")
+
+  override def getLabel(oldMap: Map[String, String], newMap: Map[String, String]): String = ChangeExtractUtils.getTags(newMap, "主要成员", Array("hid", "staff_type"))
+
+  override def getBizTime(newMap: Map[String, String]): String = newMap("update_time")
+}