Преглед на файлове

Merge commit '0f287ed385fed09aab12daf0261e7f06a9c8c239' into feature/v1.5.15

* commit '0f287ed385fed09aab12daf0261e7f06a9c8c239':
  字段替换处理
  人员选择处理
  定时任务修改
  人员选择处理
  人员选择处理
Jianghan преди 11 месеца
родител
ревизия
f4bdce41f2
променени са 4 файла, в които са добавени 11 реда и са изтрити 6 реда
  1. 1 1
      clueSync/config.json
  2. 9 4
      clueSync/jobutil.go
  3. 1 0
      clueSync/main.go
  4. 0 1
      telemarketingEtl/entity/dwd_f_crm_open_sea.go

+ 1 - 1
clueSync/config.json

@@ -1 +1 @@
-{"lastOrderId":258784,"lastOrderClueId":"2024-05-25 02:23:21","lastUserId":"2024-05-20 15:40:02","lastXcxUserId":"2024-07-09 14:59:37","lastId":"668c9fdbd1f99a10cd641691","lastOrderTime":"2023-04-25 00:00:00","lastUserTime":"2024-07-09 11:54:02","lastSubscribeId":"645470af172d9e8dcc5c507a","lastMessageTime":"2024-06-20 17:54:18","lastkcTime":"","lastEverythingTime":"","lastEventRegTime":"","lastReadClueTime":"","bigSaleTime":1718241923,"bigOrderTime":"2024-06-12 17:01:39","marketSaleTime":1708160200,"advisoryCommitteeTime":1724136683,"allocationTime":"2024-07-01 14:59:37","allocationRatio":2,"activeTime":"2024-07-01 14:59:37","rebindTime":"2024-07-01 14:59:37"}
+{"lastOrderId":258784,"lastOrderClueId":"2024-05-25 02:23:21","lastUserId":"2024-05-20 15:40:02","lastXcxUserId":"2024-07-09 14:59:37","lastId":"66cd4d3ae83797f8bf5e7ca2","lastOrderTime":"2023-04-25 00:00:00","lastUserTime":"2024-07-09 11:54:02","lastSubscribeId":"645470af172d9e8dcc5c507a","lastMessageTime":"2024-06-20 17:54:18","lastkcTime":"","lastEverythingTime":"","lastEventRegTime":"","lastReadClueTime":"","bigSaleTime":1718241923,"bigOrderTime":"2024-06-12 17:01:39","marketSaleTime":1708160200,"advisoryCommitteeTime":1724136683,"allocationTime":"2024-07-01 14:59:37","allocationRatio":2,"activeTime":"2024-07-01 14:59:37","rebindTime":"2024-08-27 16:10:27"}

+ 9 - 4
clueSync/jobutil.go

@@ -969,7 +969,7 @@ func getClueType(item string, data map[string]interface{}, sourceCode string, so
 	} else if item == "allocation" {
 		pcode = "532"
 		code = "671"
-		level = "C"
+		level = "D"
 		pcodeData := TiDb.FindOne("dwd_d_crm_cluetype_code", map[string]interface{}{"code": pcode}, "", "")
 		if pcodeData != nil && len(*pcodeData) > 0 {
 			topname = common.ObjToString((*pcodeData)["name"])
@@ -981,7 +981,7 @@ func getClueType(item string, data map[string]interface{}, sourceCode string, so
 	} else if item == "rebind" {
 		pcode = "532"
 		code = "670"
-		level = "C"
+		level = "D"
 		pcodeData := TiDb.FindOne("dwd_d_crm_cluetype_code", map[string]interface{}{"code": pcode}, "", "")
 		if pcodeData != nil && len(*pcodeData) > 0 {
 
@@ -1159,10 +1159,10 @@ func autoDraw(mode, cluename, phone string, isGroup, isCommerce int) (positionId
 					positionId = common.Int64All((*cdata)[0]["position_id"])
 					noticePositionId = positionId
 					seatNumber = common.ObjToString((*cdata)[0]["seatNumber"])
-					assign_type := common.IntAll((*cdata)[0]["assign_type"])
-					role_id := common.IntAll((*cdata)[0]["role_id"])
 					for _, v := range *pdata {
 						resign := common.IntAll(v["resign"])
+						assign_type := common.IntAll(v["assign_type"])
+						role_id := common.IntAll(v["role_id"])
 						if positionId == common.Int64All(v["position_id"]) {
 							if resign == 0 && (assign_type == 1 || role_id == 8) {
 								if FindUpperLimit(gconv.String(positionId), mode, true) {
@@ -1183,11 +1183,16 @@ func autoDraw(mode, cluename, phone string, isGroup, isCommerce int) (positionId
 			}
 		}
 	}
+	positionId = 0
+	seatNumber = ""
+	saleName = ""
 	query := `select * from dwd_f_crm_personnel_management where assign_type = 1 and`
 	if mode == "A" {
 		query += ` assign_level like "%A%"`
 	} else if mode == "B" {
 		query += ` assign_level like "%B%"`
+	} else if mode == "D" {
+		query += ` assign_level like "%D%"`
 	} else {
 		query += ` assign_level like "%C%"`
 	}

+ 1 - 0
clueSync/main.go

@@ -154,6 +154,7 @@ func main() {
 			marketCustomer()    //市场部线索
 			AdvisoryCommittee() //咨询组线索
 			rebind()            //取关重新关注处理
+			activeUsers()       //活跃用户处理
 		})
 		//每天8点30
 		c := cron.New()

+ 0 - 1
telemarketingEtl/entity/dwd_f_crm_open_sea.go

@@ -747,7 +747,6 @@ func RefuseRecycle() {
 	refuseHandReturn := g.Cfg().MustGet(ctx, "refuseHandReturn").Int()
 	tA := t.AddDate(0, 0, -refuseHandReturn)
 	sql := fmt.Sprintf(`select id from dwd_f_crm_clue_info where comeinsource_open=11 and is_assign = 0 and comeintime_open > "%s" ;`, tA.Format(date.Date_Full_Layout))
-
 	config.JianyuSubjectdb.SelectByBath(500, func(l *[]map[string]interface{}) bool {
 		ids := []interface{}{}
 		for _, v := range *l {