Selaa lähdekoodia

fix: 信用惩戒查询deleted 为9

许家凯 3 vuotta sitten
vanhempi
commit
f746f79e15

+ 1 - 0
src/main/scala/com/winhc/bigdata/spark/ng/credit_punishment/CreditPunishmentEntityAgg.scala

@@ -207,6 +207,7 @@ case class CreditPunishmentEntityAgg(s: SparkSession
          |                    )
          |        )
          |WHERE   num = 1
+         |AND     deleted <> 9
          |""".stripMargin)
       .createTempView(tmp_view)
 

+ 1 - 1
src/main/scala/com/winhc/bigdata/spark/ng/credit_punishment/udf/CreditPunishmentCaseAggUDF.scala

@@ -220,7 +220,7 @@ case class CreditPunishmentCaseAggUDF() extends UserDefinedAggregateFunction {
     val cct = if (case_create_time == null) null else df.format(case_create_time.toInstant)
 
     val del = buffer.getSeq[Long](15).distinct
-    val deleted = if (del.contains(0)) "0" else if (del.contains("1")) "1" else "9"
+    val deleted = if (del.contains(0)) "0" else if (del.contains(1)) "1" else "9"
 
     //    val deleted = if (rowkey.isEmpty) "1" else "0"