|
@@ -50,6 +50,12 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
|
|
source = common.ObjToString((*userInfo)["source"])
|
|
source = common.ObjToString((*userInfo)["source"])
|
|
belong_to = common.ObjToString((*userInfo)["belong_to"])
|
|
belong_to = common.ObjToString((*userInfo)["belong_to"])
|
|
phone = common.ObjToString((*userInfo)["phone"])
|
|
phone = common.ObjToString((*userInfo)["phone"])
|
|
|
|
+ if phone != "" {
|
|
|
|
+ phoneMapping := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"phone": phone}, "", "")
|
|
|
|
+ if phoneMapping != nil && len(*phoneMapping) > 0 {
|
|
|
|
+ cluename = common.ObjToString((*phoneMapping)["cluename"])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else if item == "users" { //注册用户
|
|
} else if item == "users" { //注册用户
|
|
userId = mongodb.BsonIdToSId(data["userid"])
|
|
userId = mongodb.BsonIdToSId(data["userid"])
|
|
@@ -234,7 +240,7 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
|
|
return true, true
|
|
return true, true
|
|
}
|
|
}
|
|
position_id, seatNumber, saleName, saleData, pIsOk, isFreeze, noticePositionId := autoDraw(level, cluename, phone, isGroup, isCommerce) //查询当前分配次数最少的,如果当前线索有销售,此次找出的不会+1
|
|
position_id, seatNumber, saleName, saleData, pIsOk, isFreeze, noticePositionId := autoDraw(level, cluename, phone, isGroup, isCommerce) //查询当前分配次数最少的,如果当前线索有销售,此次找出的不会+1
|
|
- log.Println("data -------", position_id, seatNumber, saleName, saleData, pIsOk, isFreeze, noticePositionId)
|
|
|
|
|
|
+ //log.Println("data -------", position_id, seatNumber, saleName, saleData, pIsOk, isFreeze, noticePositionId)
|
|
if position_id > 0 && seatNumber != "" {
|
|
if position_id > 0 && seatNumber != "" {
|
|
uCount, oks := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, "", ""), true //查当前线索是否已存在
|
|
uCount, oks := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, "", ""), true //查当前线索是否已存在
|
|
if uCount != nil && len(*uCount) > 0 { //已存在,走更新
|
|
if uCount != nil && len(*uCount) > 0 { //已存在,走更新
|