|
@@ -635,6 +635,14 @@ WHERE
|
|
|
//判断用户是否有小程序切使用过剑鱼其他产品
|
|
|
//判断uid
|
|
|
uId := ""
|
|
|
+ changeCode := GetUserChannel(gconv.String(v["userId"]))
|
|
|
+ if changeCode != "" {
|
|
|
+ TiDb.Update("dwd_f_userbase_baseinfo", map[string]interface{}{
|
|
|
+ "userid": gconv.String(v["userId"]),
|
|
|
+ }, map[string]interface{}{
|
|
|
+ "belong_to": changeCode,
|
|
|
+ })
|
|
|
+ }
|
|
|
for i := 0; i < 10; i++ {
|
|
|
phone := common.ObjToString(v["phone"])
|
|
|
contactsData := TiDb.SelectBySql("select * from dwd_f_userbase_contacts where phone = ? and is_delete = 1", phone)
|
|
@@ -1818,7 +1826,7 @@ func GetUserChannel(userId string) string {
|
|
|
}
|
|
|
}
|
|
|
//查找注册日志表
|
|
|
- sql := fmt.Sprintf(`select channel_code from user_source where user_id ="%s" and channel_code in (%s) ORDER BY create_time desc limit 10 `, userId, strings.Join(codeArr, ","))
|
|
|
+ sql := fmt.Sprintf(`select channel_code from user_source where user_id ="%s" and channel_code in (%s) ORDER BY create_time desc limit 1 `, userId, strings.Join(codeArr, ","))
|
|
|
courceData := ThirdParty.SelectBySql(sql)
|
|
|
if courceData != nil && len(*courceData) > 0 {
|
|
|
channelCode := gconv.String((*courceData)[0]["channel_code"])
|