Browse Source

后台订单卡数据处理

WH01243 1 năm trước cách đây
mục cha
commit
d33aedd8fa
4 tập tin đã thay đổi với 13 bổ sung9 xóa
  1. 1 1
      clueSync/config.json
  2. 1 1
      clueSync/db.json
  3. 6 3
      clueSync/kc.go
  4. 5 4
      clueSync/main.go

+ 1 - 1
clueSync/config.json

@@ -1 +1 @@
-{"lastOrderId":258784,"lastOrderClueId":"2024-05-25 02:23:21","lastUserId":"2024-07-11 13:38:02","lastXcxUserId":"2024-07-10 16:30:03","lastId":"668e2be1d1f99a10cd6416a9","lastOrderTime":"2024-07-10 18:10:33","lastUserTime":"2024-07-10 17:55:03","lastSubscribeId":"668e3ec29a9f357bd3e3da06","lastMessageTime":"2024-07-09 17:24:47","lastkcTime":"","lastEverythingTime":"","lastEventRegTime":"","lastReadClueTime":"","bigSaleTime":1718241923,"bigOrderTime":"2024-06-12 17:01:39","marketSaleTime":1708160200,"allocationTime":"2024-07-01 14:59:37","allocationRatio":2}
+{"lastOrderId":258784,"lastOrderClueId":"2024-07-23 16:21:21","lastUserId":"2024-07-11 13:38:02","lastXcxUserId":"2024-07-10 16:30:03","lastId":"668e2be1d1f99a10cd6416a9","lastOrderTime":"2024-07-10 18:10:33","lastUserTime":"2024-07-10 17:55:03","lastSubscribeId":"668e3ec29a9f357bd3e3da06","lastMessageTime":"2024-07-09 17:24:47","lastkcTime":"","lastEverythingTime":"","lastEventRegTime":"","lastReadClueTime":"","bigSaleTime":1718241923,"bigOrderTime":"2024-06-12 17:01:39","marketSaleTime":1708160200,"allocationTime":"2024-07-01 14:59:37","allocationRatio":2}

+ 1 - 1
clueSync/db.json

@@ -114,7 +114,7 @@
     "市场分析报告"
   ],
   "marketSaleMail": "wanghao@jianyu360.com",
-  "allocationCap": 500,
+  "allocationCap": 5,
   "warningValue": 350,
   "corn_mail": "",
   "regTimes": 7,

+ 6 - 3
clueSync/kc.go

@@ -437,7 +437,8 @@ func ordersClue() {
 						source = common.ObjToString((*userInfo)["source"])
 					} else {
 						log.Println("后台订单--未查询到 ", user_phone)
-						break
+						//break
+						continue
 					}
 				} else {
 					if !mongodb.IsObjectIdHex(userId) {
@@ -446,7 +447,8 @@ func ordersClue() {
 							userId = common.ObjToString((*userMapping)["userid"])
 						} else {
 							log.Println("后台订单--未查询到 ", user_phone)
-							break
+							//break
+							continue
 						}
 					}
 					query["userid"] = userId
@@ -456,7 +458,8 @@ func ordersClue() {
 						source = common.ObjToString((*userInfo)["source"])
 					} else {
 						log.Println("后台订单--未查询到 ", query, user_phone)
-						break
+						//break
+						continue
 					}
 				}
 				is_assign := 1

+ 5 - 4
clueSync/main.go

@@ -6,10 +6,8 @@ import (
 	"app.yhyue.com/moapp/jybase/mongodb"
 	"app.yhyue.com/moapp/jybase/mysql"
 	"app.yhyue.com/moapp/jybase/redis"
-	"bp.jydev.jianyu360.cn/BaseService/pushpkg/p"
 	"flag"
 	"fmt"
-	"github.com/robfig/cron"
 	"log"
 )
 
@@ -117,7 +115,9 @@ func main() {
 	MgoQyxy = mongodb.NewMgoWithUser(db.MgoQyxy.Address, db.MgoQyxy.DbName, db.MgoQyxy.User, db.MgoQyxy.Password, db.MgoQyxy.DbSize)
 	InitArea()
 	InitProduct(db.ProductArr)
-	if *mode == 1 {
+	log.Println(autoDraw("C", "郑州市建筑设计院", "13911111435", 0, 1))
+	ordersClue()
+	/*if *mode == 1 {
 		//30分钟一次
 		go p.VarTimeTask.RunInTimeSection("30分钟定时任务", startTime, endTime, db.CornExp1, func(dayFirst bool) {
 			orders()      //未支付订单
@@ -192,5 +192,6 @@ func main() {
 	} else {
 		users()
 		saleLeads()
-	}
+	}*/
+
 }