|
@@ -22,13 +22,23 @@ import (
|
|
"app.yhyue.com/moapp/jybase/common"
|
|
"app.yhyue.com/moapp/jybase/common"
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+// 渠道定时任务
|
|
func everythingSync() {
|
|
func everythingSync() {
|
|
lastEverythingTime := cfg.LastEverythingTime
|
|
lastEverythingTime := cfg.LastEverythingTime
|
|
- nowTime := time.Now().Format(dates.Date_Full_Layout)
|
|
|
|
- sql := fmt.Sprintf(`select * from user_source where channel_code = "JyChCoopA" and create_time > "%s" order by create_time asc`, lastEverythingTime)
|
|
|
|
|
|
+
|
|
|
|
+ codeArr := []string{}
|
|
|
|
+ if len(UserChannel) > 0 {
|
|
|
|
+ for i, _ := range UserChannel {
|
|
|
|
+ codeArr = append(codeArr, fmt.Sprintf(`"%s"`, i))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ sql := fmt.Sprintf(`select * from user_source where channel_code in (%s) and create_time > "%s" order by create_time asc`, strings.Join(codeArr, ","), lastEverythingTime)
|
|
|
|
+ //sql := fmt.Sprintf(`select * from user_source where id =662847`)
|
|
|
|
+
|
|
log.Println("三方渠道数据定时任务开始", sql)
|
|
log.Println("三方渠道数据定时任务开始", sql)
|
|
data := ThirdParty.SelectBySql(sql)
|
|
data := ThirdParty.SelectBySql(sql)
|
|
if data != nil && *data != nil && len(*data) > 0 {
|
|
if data != nil && *data != nil && len(*data) > 0 {
|
|
|
|
+<<<<<<< HEAD
|
|
for _, v := range *data {
|
|
for _, v := range *data {
|
|
user_id := common.ObjToString(v["user_id"])
|
|
user_id := common.ObjToString(v["user_id"])
|
|
position_id := common.Int64All(v["position_id"])
|
|
position_id := common.Int64All(v["position_id"])
|
|
@@ -77,123 +87,181 @@ func everythingSync() {
|
|
if len(pArr) > 0 {
|
|
if len(pArr) > 0 {
|
|
order_type = strings.Join(pArr, ",")
|
|
order_type = strings.Join(pArr, ",")
|
|
}
|
|
}
|
|
|
|
+=======
|
|
|
|
+ everythingSyncHandle(data, true)
|
|
|
|
+ }
|
|
|
|
+ sql = fmt.Sprintf(`select * from user_source where channel_code in (%s) and ishandle=1 order by create_time asc`, strings.Join(codeArr, ","))
|
|
|
|
+ log.Println("三方渠道数据定时任务开始1", sql)
|
|
|
|
+ data = ThirdParty.SelectBySql(sql)
|
|
|
|
+ if data != nil && *data != nil && len(*data) > 0 {
|
|
|
|
+ everythingSyncHandle(data, false)
|
|
|
|
+ }
|
|
|
|
+ log.Println("三方渠道数据定时任务结束")
|
|
|
|
+}
|
|
|
|
+func everythingSyncHandle(data *[]map[string]interface{}, isUpdate bool) {
|
|
|
|
+ nowTime := time.Now().Format(dates.Date_Full_Layout)
|
|
|
|
+ for _, v := range *data {
|
|
|
|
+ id := gconv.Int64(v["id"])
|
|
|
|
+ channel_code := gconv.String(v["channel_code"])
|
|
|
|
+ changeMap := UserChannel[channel_code]
|
|
|
|
+ channeName := changeMap["name"]
|
|
|
|
+ channelCode := changeMap["clueCode"]
|
|
|
|
+ user_id := common.ObjToString(v["user_id"])
|
|
|
|
+ position_id := common.Int64All(v["position_id"])
|
|
|
|
+ phone := common.ObjToString(v["phone"])
|
|
|
|
+ state := common.IntAll(v["state"])
|
|
|
|
+ user_mold, is_assign, is_transfer, last_login_time, registe_time, mailbox, source, clueId, order_type := 4, 0, 0, "", "", "", "", int64(0), ""
|
|
|
|
+ owner, sales_lead_phone, sales_ent_name, sales_position, sales_dep, data_request, sales_leads_source := "", "", "", "", "", "", ""
|
|
|
|
+ cData := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"phone": phone}, "", "")
|
|
|
|
+ if cData != nil {
|
|
|
|
+ is_assign = common.IntAll((*cData)["is_assign"])
|
|
|
|
+ is_transfer = common.IntAll((*cData)["is_transfer"])
|
|
|
|
+ clueId = common.Int64All((*cData)["id"])
|
|
|
|
+ }
|
|
|
|
+ udata := TiDb.FindOne("dwd_f_userbase_baseinfo", map[string]interface{}{"userid": user_id}, "", "")
|
|
|
|
+ if udata != nil {
|
|
|
|
+ userSource := common.ObjToString((*udata)["source"])
|
|
|
|
+ if userSource == "0102" {
|
|
|
|
+ continue
|
|
|
|
+>>>>>>> master
|
|
}
|
|
}
|
|
- uData, ok := Mgo.FindOne("user", map[string]interface{}{"_id": mongodb.StringTOBsonId(user_id)})
|
|
|
|
- if ok && uData != nil {
|
|
|
|
- l_registedate := common.Int64All((*uData)["l_registedate"])
|
|
|
|
- registe_time = time.Unix(l_registedate, 0).Format(dates.Date_Full_Layout)
|
|
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
+ /*cuData := TiDbData.FindOne("customer", map[string]interface{}{"phone": phone}, "", "")
|
|
|
|
+ if cuData != nil {
|
|
|
|
+ owner = common.ObjToString((*cuData)["owner"])
|
|
|
|
+ unique_id = common.ObjToString((*cuData)["unique_id"])
|
|
|
|
+ belongTo = common.ObjToString((*cuData)["belongTo"])
|
|
|
|
+ }*/
|
|
|
|
+ vData := TiDb.FindOne("dwd_f_userbase_visit_info", map[string]interface{}{"userid": user_id}, "", "")
|
|
|
|
+ if vData != nil {
|
|
|
|
+ last_login_time = common.ObjToString((*vData)["date"])
|
|
|
|
+ }
|
|
|
|
+ dData := Mysql.Find("dataexport_order", map[string]interface{}{"user_id": user_id}, "", "", -1, -1)
|
|
|
|
+ if dData != nil && len(*dData) > 0 {
|
|
|
|
+ pMap := map[string]string{}
|
|
|
|
+ pArr := []string{}
|
|
|
|
+ for _, v := range *dData {
|
|
|
|
+ product_type := common.ObjToString(v["product_type"])
|
|
|
|
+ pMap[product_type] = "1"
|
|
}
|
|
}
|
|
- sData, oks := Mgo.Find("saleLeads", map[string]interface{}{"userid": user_id}, `{"_id":-1}`, nil, false, 0, 1)
|
|
|
|
- if oks && sData != nil {
|
|
|
|
- if len(*sData) > 0 {
|
|
|
|
- sDatas := (*sData)[0]
|
|
|
|
- sales_lead_phone = common.ObjToString(sDatas["phone"])
|
|
|
|
- sales_position = common.ObjToString(sDatas["position"])
|
|
|
|
- sales_ent_name = common.ObjToString(sDatas["company"])
|
|
|
|
- sales_dep = common.ObjToString(sDatas["branch"])
|
|
|
|
- if sales_dep == "" {
|
|
|
|
- sales_dep = common.ObjToString(sDatas["department"])
|
|
|
|
- }
|
|
|
|
- data_request = common.ObjToString(sDatas["data_requirement"])
|
|
|
|
- mailbox = common.ObjToString(sDatas["mail"])
|
|
|
|
- source = common.ObjToString(sDatas["interest"])
|
|
|
|
- }
|
|
|
|
|
|
+ for k := range pMap {
|
|
|
|
+ pArr = append(pArr, k)
|
|
}
|
|
}
|
|
- if state == 1 {
|
|
|
|
- sales_leads_source = "一切都好登录"
|
|
|
|
- if is_assign == 1 || is_transfer == 1 || owner != "" {
|
|
|
|
- user_mold = 1
|
|
|
|
- } else {
|
|
|
|
- user_mold = 2
|
|
|
|
- }
|
|
|
|
- } else if state == 2 {
|
|
|
|
- sales_leads_source = "一切都好注册"
|
|
|
|
- if is_assign == 1 || is_transfer == 1 || owner != "" {
|
|
|
|
- user_mold = 3
|
|
|
|
- } else {
|
|
|
|
- user_mold = 4
|
|
|
|
- }
|
|
|
|
|
|
+ if len(pArr) > 0 {
|
|
|
|
+ order_type = strings.Join(pArr, ",")
|
|
}
|
|
}
|
|
- if owner == "" && unique_id != "" && belongTo == "市场部" {
|
|
|
|
- token := getToken()
|
|
|
|
- if token != "" {
|
|
|
|
- sss := url.QueryEscape("合作渠道一切都好")
|
|
|
|
- urls := `https://a1.7x24cc.com/commonInte?flag=1008&account=N000000029739&accessToken=` + token + `&cusObj={"unique_id":"` + unique_id + `","empNo":"8049","owner":"8049","source":"` + sss + `"}&dbType=0001`
|
|
|
|
- bs, err := doGet(urls)
|
|
|
|
- if err != nil {
|
|
|
|
- log.Println("调用接口失败", unique_id, err)
|
|
|
|
- }
|
|
|
|
- resMap := common.StringToMap(string(bs))
|
|
|
|
- if resMap["success"] != nil && resMap["success"].(bool) {
|
|
|
|
- /*ok := TiDbData.Update("customer", map[string]interface{}{"unique_id": unique_id}, map[string]interface{}{"empNo": "8049", "owner": "8049", "source": "合作渠道一切都好"})
|
|
|
|
- if ok {
|
|
|
|
- log.Println("更新成功", unique_id)
|
|
|
|
- } else {
|
|
|
|
- log.Println("更新失败", unique_id)
|
|
|
|
- }*/
|
|
|
|
- } else {
|
|
|
|
- log.Println("调用接口失败!!", unique_id)
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ uData, ok := Mgo.FindOne("user", map[string]interface{}{"_id": mongodb.StringTOBsonId(user_id)})
|
|
|
|
+ if ok && uData != nil {
|
|
|
|
+ l_registedate := common.Int64All((*uData)["l_registedate"])
|
|
|
|
+ registe_time = time.Unix(l_registedate, 0).Format(dates.Date_Full_Layout)
|
|
|
|
+ }
|
|
|
|
+ if TiDb.Count("dwd_f_userbase_baseinfo", map[string]interface{}{
|
|
|
|
+ "userid": user_id,
|
|
|
|
+ }) <= 0 {
|
|
|
|
+ ThirdParty.Update("user_source", map[string]interface{}{
|
|
|
|
+ "id": id,
|
|
|
|
+ }, map[string]interface{}{
|
|
|
|
+ "ishandle": 1,
|
|
|
|
+ })
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
|
|
+ sData, oks := Mgo.Find("saleLeads", map[string]interface{}{"userid": user_id}, `{"_id":-1}`, nil, false, 0, 1)
|
|
|
|
+ if oks && sData != nil {
|
|
|
|
+ if len(*sData) > 0 {
|
|
|
|
+ sDatas := (*sData)[0]
|
|
|
|
+ sales_lead_phone = common.ObjToString(sDatas["phone"])
|
|
|
|
+ sales_position = common.ObjToString(sDatas["position"])
|
|
|
|
+ sales_ent_name = common.ObjToString(sDatas["company"])
|
|
|
|
+ sales_dep = common.ObjToString(sDatas["branch"])
|
|
|
|
+ if sales_dep == "" {
|
|
|
|
+ sales_dep = common.ObjToString(sDatas["department"])
|
|
}
|
|
}
|
|
|
|
+ data_request = common.ObjToString(sDatas["data_requirement"])
|
|
|
|
+ mailbox = common.ObjToString(sDatas["mail"])
|
|
|
|
+ source = common.ObjToString(sDatas["interest"])
|
|
}
|
|
}
|
|
- if ThirdParty.Count("user_channel_info", map[string]interface{}{"user_id": user_id}) > 0 {
|
|
|
|
- ThirdParty.Update("user_channel_info", map[string]interface{}{"user_id": user_id}, map[string]interface{}{
|
|
|
|
- "user_mold": user_mold,
|
|
|
|
- "last_login_time": common.If(last_login_time != "", last_login_time, nil),
|
|
|
|
- "sales_lead_phone": sales_lead_phone,
|
|
|
|
- "sales_ent_name": sales_ent_name,
|
|
|
|
- "sales_position": sales_position,
|
|
|
|
- "sales_dep": sales_dep,
|
|
|
|
- "sales_leads_source": sales_leads_source,
|
|
|
|
- "mailbox": mailbox,
|
|
|
|
- "order_type": order_type,
|
|
|
|
- "data_request": data_request,
|
|
|
|
- "source": source,
|
|
|
|
- "update_time": nowTime,
|
|
|
|
- })
|
|
|
|
|
|
+ }
|
|
|
|
+ if state == 1 {
|
|
|
|
+ sales_leads_source = fmt.Sprintf("%s登录", channeName)
|
|
|
|
+ if is_assign == 1 || is_transfer == 1 || owner != "" {
|
|
|
|
+ user_mold = 1
|
|
} else {
|
|
} else {
|
|
- ThirdParty.Insert("user_channel_info", map[string]interface{}{
|
|
|
|
- "user_id": user_id,
|
|
|
|
- "registe_time": registe_time,
|
|
|
|
- "phone": phone,
|
|
|
|
- "user_mold": user_mold,
|
|
|
|
- "last_login_time": common.If(last_login_time != "", last_login_time, nil),
|
|
|
|
- "sales_lead_phone": sales_lead_phone,
|
|
|
|
- "sales_ent_name": sales_ent_name,
|
|
|
|
- "sales_position": sales_position,
|
|
|
|
- "sales_dep": sales_dep,
|
|
|
|
- "sales_leads_source": sales_leads_source,
|
|
|
|
- "order_type": order_type,
|
|
|
|
- "mailbox": mailbox,
|
|
|
|
- "data_request": data_request,
|
|
|
|
- "source": source,
|
|
|
|
- "update_time": nowTime,
|
|
|
|
- })
|
|
|
|
|
|
+ user_mold = 2
|
|
}
|
|
}
|
|
- if clueId > 0 && is_assign != 1 && is_transfer != 1 {
|
|
|
|
- TiDb.Update("dwd_f_userbase_baseinfo", map[string]interface{}{"userid": user_id}, map[string]interface{}{"belong_to": "0301"})
|
|
|
|
- TiDb.Update("dwd_f_crm_clue_info", map[string]interface{}{"phone": phone}, map[string]interface{}{"is_assign": -1})
|
|
|
|
- TiDb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
|
|
|
|
- "clue_id": clueId,
|
|
|
|
- "position_id": common.If(position_id > 0, position_id, -1),
|
|
|
|
- "change_type": "退出公海",
|
|
|
|
- "new_value": "通过合作渠道一切就好" + fmt.Sprint(common.If(user_mold == 1 || user_mold == 2, "登录", "注册")),
|
|
|
|
- "createtime": nowTime,
|
|
|
|
- "BCPCID": common.GetRandom(32),
|
|
|
|
- "operator_id": -1,
|
|
|
|
- })
|
|
|
|
|
|
+ } else if state == 2 {
|
|
|
|
+ sales_leads_source = fmt.Sprintf("%s注册", channeName)
|
|
|
|
+ if is_assign == 1 || is_transfer == 1 || owner != "" {
|
|
|
|
+ user_mold = 3
|
|
|
|
+ } else {
|
|
|
|
+ user_mold = 4
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if ThirdParty.Count("user_channel_info", map[string]interface{}{"user_id": user_id}) > 0 {
|
|
|
|
+ ThirdParty.Update("user_channel_info", map[string]interface{}{"user_id": user_id}, map[string]interface{}{
|
|
|
|
+ "user_mold": user_mold,
|
|
|
|
+ "last_login_time": common.If(last_login_time != "", last_login_time, nil),
|
|
|
|
+ "sales_lead_phone": sales_lead_phone,
|
|
|
|
+ "sales_ent_name": sales_ent_name,
|
|
|
|
+ "sales_position": sales_position,
|
|
|
|
+ "sales_dep": sales_dep,
|
|
|
|
+ "sales_leads_source": sales_leads_source,
|
|
|
|
+ "mailbox": mailbox,
|
|
|
|
+ "order_type": order_type,
|
|
|
|
+ "data_request": data_request,
|
|
|
|
+ "source": source,
|
|
|
|
+ "update_time": nowTime,
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ ThirdParty.Insert("user_channel_info", map[string]interface{}{
|
|
|
|
+ "user_id": user_id,
|
|
|
|
+ "registe_time": registe_time,
|
|
|
|
+ "phone": phone,
|
|
|
|
+ "user_mold": user_mold,
|
|
|
|
+ "last_login_time": common.If(last_login_time != "", last_login_time, nil),
|
|
|
|
+ "sales_lead_phone": sales_lead_phone,
|
|
|
|
+ "sales_ent_name": sales_ent_name,
|
|
|
|
+ "sales_position": sales_position,
|
|
|
|
+ "sales_dep": sales_dep,
|
|
|
|
+ "sales_leads_source": sales_leads_source,
|
|
|
|
+ "order_type": order_type,
|
|
|
|
+ "mailbox": mailbox,
|
|
|
|
+ "data_request": data_request,
|
|
|
|
+ "source": source,
|
|
|
|
+ "update_time": nowTime,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if clueId > 0 && is_assign != 1 && is_transfer != 1 {
|
|
|
|
+ TiDb.Update("dwd_f_userbase_baseinfo", map[string]interface{}{"userid": user_id}, map[string]interface{}{"belong_to": channelCode})
|
|
|
|
+ TiDb.Update("dwd_f_crm_clue_info", map[string]interface{}{"phone": phone}, map[string]interface{}{"is_assign": -1})
|
|
|
|
+ TiDb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
|
|
|
|
+ "clue_id": clueId,
|
|
|
|
+ "position_id": common.If(position_id > 0, position_id, -1),
|
|
|
|
+ "change_type": "退出公海",
|
|
|
|
+ "new_value": fmt.Sprintf("通过合作渠道%s", channeName) + fmt.Sprint(common.If(user_mold == 1 || user_mold == 2, "登录", "注册")),
|
|
|
|
+ "createtime": nowTime,
|
|
|
|
+ "BCPCID": common.GetRandom(32),
|
|
|
|
+ "operator_id": -1,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ ThirdParty.Update("user_source", map[string]interface{}{
|
|
|
|
+ "id": id,
|
|
|
|
+ }, map[string]interface{}{
|
|
|
|
+ "ishandle": 0,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if isUpdate {
|
|
cfg.LastEverythingTime = common.ObjToString((*data)[len(*data)-1]["create_time"])
|
|
cfg.LastEverythingTime = common.ObjToString((*data)[len(*data)-1]["create_time"])
|
|
|
|
+ common.WriteSysConfig(&cfg)
|
|
}
|
|
}
|
|
- common.WriteSysConfig(&cfg)
|
|
|
|
- log.Println("三方渠道数据定时任务结束")
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
-func saveEverything(user_id, phone, item, sourceName, sourceCode string) bool {
|
|
|
|
|
|
+func saveEverything(user_id, phone, item, sourceName, sourceCode, belongTo string) bool {
|
|
|
|
+ changeMap := UserChannel[belongTo]
|
|
|
|
+ changeName := gconv.String(changeMap["name"])
|
|
nowTime, isOk := time.Now().Format(dates.Date_Full_Layout), false
|
|
nowTime, isOk := time.Now().Format(dates.Date_Full_Layout), false
|
|
user_mold, is_assign, is_transfer, last_login_time, registe_time, mailbox, source, order_type, sales_leads_source := 4, 0, 0, "", "", "", "", "", ""
|
|
user_mold, is_assign, is_transfer, last_login_time, registe_time, mailbox, source, order_type, sales_leads_source := 4, 0, 0, "", "", "", "", "", ""
|
|
- owner, sales_lead_phone, sales_ent_name, sales_position, sales_dep, data_request, unique_id, belongTo, clueId, position_id := "", "", "", "", "", "", "", "", int64(0), int64(0)
|
|
|
|
|
|
+ owner, sales_lead_phone, sales_ent_name, sales_position, sales_dep, data_request, clueId, position_id := "", "", "", "", "", "", int64(0), int64(0)
|
|
cData := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"phone": phone}, "", "")
|
|
cData := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"phone": phone}, "", "")
|
|
if cData != nil {
|
|
if cData != nil {
|
|
is_assign = common.IntAll((*cData)["is_assign"])
|
|
is_assign = common.IntAll((*cData)["is_assign"])
|
|
@@ -201,14 +269,18 @@ func saveEverything(user_id, phone, item, sourceName, sourceCode string) bool {
|
|
clueId = common.Int64All((*cData)["is_transfer"])
|
|
clueId = common.Int64All((*cData)["is_transfer"])
|
|
position_id = common.Int64All((*cData)["position_id"])
|
|
position_id = common.Int64All((*cData)["position_id"])
|
|
}
|
|
}
|
|
- /*cuData := TiDbData.FindOne("customer", map[string]interface{}{"phone": phone}, "", "")
|
|
|
|
|
|
+ cuData := TiDbData.FindOne("customer", map[string]interface{}{"phone": phone}, "", "")
|
|
if cuData != nil {
|
|
if cuData != nil {
|
|
- unique_id = common.ObjToString((*cuData)["unique_id"])
|
|
|
|
owner = common.ObjToString((*cuData)["owner"])
|
|
owner = common.ObjToString((*cuData)["owner"])
|
|
|
|
+<<<<<<< HEAD
|
|
}*/
|
|
}*/
|
|
dDataSql := fmt.Sprintf(`select b.product_type from dataexport_order a INNER JOIN
|
|
dDataSql := fmt.Sprintf(`select b.product_type from dataexport_order a INNER JOIN
|
|
jy_order_detail b on a.order_code=b.order_code and a.user_id = ?`, user_id)
|
|
jy_order_detail b on a.order_code=b.order_code and a.user_id = ?`, user_id)
|
|
dData := Mysql.SelectBySql(dDataSql)
|
|
dData := Mysql.SelectBySql(dDataSql)
|
|
|
|
+=======
|
|
|
|
+ }
|
|
|
|
+ dData := Mysql.Find("dataexport_order", map[string]interface{}{"user_id": user_id}, "", "", -1, -1)
|
|
|
|
+>>>>>>> master
|
|
if dData != nil && len(*dData) > 0 {
|
|
if dData != nil && len(*dData) > 0 {
|
|
pMap := map[string]string{}
|
|
pMap := map[string]string{}
|
|
pArr := []string{}
|
|
pArr := []string{}
|
|
@@ -266,7 +338,7 @@ func saveEverything(user_id, phone, item, sourceName, sourceCode string) bool {
|
|
} else {
|
|
} else {
|
|
user_mold = 2
|
|
user_mold = 2
|
|
}
|
|
}
|
|
- if owner == "" && unique_id != "" && belongTo == "市场部" {
|
|
|
|
|
|
+ /*if owner == "" && unique_id != "" && belongTo == "市场部" {
|
|
token := getToken()
|
|
token := getToken()
|
|
if token != "" {
|
|
if token != "" {
|
|
sss := url.QueryEscape("合作渠道一切都好")
|
|
sss := url.QueryEscape("合作渠道一切都好")
|
|
@@ -287,7 +359,7 @@ func saveEverything(user_id, phone, item, sourceName, sourceCode string) bool {
|
|
log.Println("调用接口失败!!", unique_id)
|
|
log.Println("调用接口失败!!", unique_id)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
if ThirdParty.Count("user_channel_info", map[string]interface{}{"user_id": user_id}) > 0 {
|
|
if ThirdParty.Count("user_channel_info", map[string]interface{}{"user_id": user_id}) > 0 {
|
|
ThirdParty.Update("user_channel_info", map[string]interface{}{"user_id": user_id}, map[string]interface{}{
|
|
ThirdParty.Update("user_channel_info", map[string]interface{}{"user_id": user_id}, map[string]interface{}{
|
|
"user_mold": user_mold,
|
|
"user_mold": user_mold,
|
|
@@ -328,7 +400,7 @@ func saveEverything(user_id, phone, item, sourceName, sourceCode string) bool {
|
|
"clue_id": clueId,
|
|
"clue_id": clueId,
|
|
"position_id": common.If(position_id > 0, position_id, -1),
|
|
"position_id": common.If(position_id > 0, position_id, -1),
|
|
"change_type": "退出公海",
|
|
"change_type": "退出公海",
|
|
- "new_value": "通过合作渠道一切就好登录",
|
|
|
|
|
|
+ "new_value": fmt.Sprintf("通过合作渠道%s登录", changeName),
|
|
"createtime": nowTime,
|
|
"createtime": nowTime,
|
|
"BCPCID": common.GetRandom(32),
|
|
"BCPCID": common.GetRandom(32),
|
|
"operator_id": -1,
|
|
"operator_id": -1,
|