Quellcode durchsuchen

进客成处理

WH01243 vor 3 Monaten
Ursprung
Commit
28e4d5166e
1 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  1. 6 6
      clueSync/kc.go

+ 6 - 6
clueSync/kc.go

@@ -34,15 +34,15 @@ FROM
 		a.pay_money > 0 
 		OR (
 			a.pay_money = 0 
-	AND ( zero_type = "分期付款补充权益" OR zero_type = "原订单不支持开通多项权益" OR zero_type = "权益码兑换" ))) 
+	AND ( a.zero_type = "分期付款补充权益" OR a.zero_type = "原订单不支持开通多项权益" OR a.zero_type = "权益码兑换" ))) 
 	AND a.user_phone NOT LIKE "%s" 
 	and  a.user_id  !="" 
 	AND a.order_status = 1 
 	AND ( a.refund_status != 1 OR a.refund_status IS NULL ) 
 	AND b.service_starttime < "2099-01-01" AND b.service_endtime > now() 
-	AND a.autoUpdate > "%s"
+	AND b.autoUpdate > "%s"
 ORDER BY
-	a.autoUpdate ASC,
+	b.autoUpdate ASC,
 	a.order_code ASC,
 	b.final_price DESC `
 	sql = fmt.Sprintf(sql, strings.Join(productArr, ","), "9%", cfg.LastkcTime)
@@ -538,8 +538,8 @@ func ordersClue() {
 	product_type_str2 := `"大会员","企业商机管理","VIP订阅"`
 	sql := fmt.Sprintf(`select a.*,b.product_type as productType ,b.service_starttime,b.service_endtime,b.filter AS productFilter     from  dataexport_order  a  
     INNER JOIN   jy_order_detail   b    on   a.order_code=b.order_code
-    and    a.autoUpdate>="%s"  AND a.user_phone NOT LIKE "%s"   and   a.user_id  !=""
-    and b.product_type in  (%s) and a.order_status = 1 and   a.is_backstage_order = 1  order by a.autoUpdate asc`, lastOrderClueId, "9%", product_type_str2)
+    and    b.autoUpdate>="%s"  AND a.user_phone NOT LIKE "%s"   and   a.user_id  !=""
+    and b.product_type in  (%s) and a.order_status = 1 and   a.is_backstage_order = 1  order by b.autoUpdate asc`, lastOrderClueId, "9%", product_type_str2)
 
 	data := Mysql.SelectBySql(sql)
 	if data != nil && *data != nil && len(*data) > 0 {
@@ -1836,7 +1836,7 @@ func KcOrderFormat(orderCode string) *OrderInfo {
 	GROUP BY
 		a.id 
 	ORDER  BY
-		a.autoUpdate desc  ,difference desc  
+		b.autoUpdate desc  ,difference desc  
 	`, orderCode, strings.Join(productArr, ",")))
 	data := &OrderInfo{}
 	if orderData != nil && len(*orderData) > 0 {