Przeglądaj źródła

订单相关程序修改

WH01243 2 miesięcy temu
rodzic
commit
fd2b075725
3 zmienionych plików z 6 dodań i 5 usunięć
  1. 1 2
      clueSync/everything.go
  2. 4 2
      clueSync/jobutil.go
  3. 1 1
      clueSync/kc.go

+ 1 - 2
clueSync/everything.go

@@ -364,7 +364,6 @@ func bigCustomer() {
 	nowTime := time.Now().Format(date.Date_Full_Layout)
 	bigSaleTime := cfg.BigSaleTime
 	bigOrderTime := cfg.BigOrderTime
-	bigSaleTime = 0
 	if bigSaleTime == 0 {
 		bigSaleTime = time.Now().Unix()
 	}
@@ -565,7 +564,7 @@ func bigCustomer() {
 				//增加客户需求
 			}
 			email := k
-			email = "wanghao@jianyu360.com"
+			//email = "wanghao@jianyu360.com"
 			dir := "./xlsx/dk/" + fileName + ".xlsx"
 			err := xf.Save(dir)
 			if err != nil {

+ 4 - 2
clueSync/jobutil.go

@@ -247,7 +247,7 @@ func GetPerson(positionId string) map[string]interface{} {
 	positionArrMap := Base.SelectBySql(fmt.Sprintf(`select  a.phone,b.id,b.ent_id from  
                          base_user  a  
                              INNER JOIN   base_position  b     
-                                 on     b.id="%s"  and  b.user_id=a.id and   b.type=1`,
+                                 on     b.id= %s  and  b.user_id=a.id and   b.type=1`,
 		positionId))
 	if positionArrMap == nil || len(*positionArrMap) == 0 {
 		return map[string]interface{}{}
@@ -503,7 +503,9 @@ func orders() {
 	product_type_str1 := `"大会员","VIP订阅","数据流量包","历史数据"`
 	DataSql := 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.create_time<="%s" and a.create_time>="%s" and b.product_type in  (%s) and a.order_status = 0 and   a.is_backstage_order = 0  and    a.id> %s`, selectTimeEnd, selectTimeStart, product_type_str1, gconv.String(lastOrderId))
+    and    a.create_time<="%s" and a.create_time>="%s" and b.product_type in  (%s) 
+    and a.order_status = 0 and   a.is_backstage_order = 0  and    a.id> %s`,
+		selectTimeEnd, selectTimeStart, product_type_str1, gconv.String(lastOrderId))
 	data, _ := getOrderData(DataSql)
 	if data != nil && data != nil && len(data) > 0 {
 		for _, v := range data {

+ 1 - 1
clueSync/kc.go

@@ -37,7 +37,7 @@ FROM
 	AND ( zero_type = "分期付款补充权益" OR zero_type = "原订单不支持开通多项权益" OR zero_type = "权益码兑换" ))) 
 	AND a.user_phone NOT LIKE "%s" 
 	and  a.user_id  !="" 
-	AND a.order_status = 1 
+	AND a.order_status = 1  and  b.service_type != 4
 	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"