Jelajahi Sumber

订单进客成处理

WH01243 5 bulan lalu
induk
melakukan
0f7329d1e1
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      clueSync/kc.go

+ 3 - 3
clueSync/kc.go

@@ -20,7 +20,7 @@ import (
 func kcSync() {
 	log.Println("客户成功系统移交定时任务开始")
 	sql := `select * from dwd_f_userbase_order_info where (payable_money > 0 or  (payable_money=0 and  ( filter  like "%分期付款补充权益%"  or   filter  like "%原订单不支持开通多项权益%"  or    filter  like "%权益码兑换%")))
-	  and  data_spec!="dhy4" and  order_status=1  and (refund_status!=1  or  refund_status is null  ) and  vip_starttime<"2099-01-01"
+	  and  data_spec!="dhy4" and phone not   like "9%" and  order_status=1  and (refund_status!=1  or  refund_status is null  ) and  vip_starttime<"2099-01-01"
 	  and vip_endtime > "` + time.Now().Format(date.Date_Full_Layout) + `" and autoUpdate > "` + cfg.LastkcTime + `" order by autoUpdate asc`
 	//sql := `select * from dwd_f_userbase_order_info where order_code="173943424276"  `
 	data := TiDb.SelectBySql(sql)
@@ -136,7 +136,7 @@ func kcJob(data map[string]interface{}) int {
 				return 0
 			}
 		} else {
-			return 1
+			return 0
 		}
 	}
 	clueId = common.Int64All((*clueData)["id"])
@@ -1381,7 +1381,7 @@ func FindPositionIdClueId(clueId int64) (int64, string) {
 				b.payable_money = 0 
 			AND ( b.filter LIKE "%分期付款补充权益%" OR b.filter LIKE "%原订单不支持开通多项权益%" OR b.filter LIKE "%权益码兑换%" ))) 
 		AND b.data_spec != "dhy4" 
-		AND b.order_status = 1 
+		AND b.order_status = 1 and b.phone not   like "9%"
 		AND ( b.refund_status != 1 OR b.refund_status IS NULL ) 
 		AND b.vip_starttime < "2099-01-01" 
 		AND b.product_type IN ( "大会员", "企业商机管理" )