|
@@ -667,13 +667,14 @@ func (i *Info) AppNewUerSales() {
|
|
}
|
|
}
|
|
body := xweb.FilterXSS(string(i.Body()))
|
|
body := xweb.FilterXSS(string(i.Body()))
|
|
log.Println("body:", body)
|
|
log.Println("body:", body)
|
|
|
|
+ sessVal := i.Session().GetMultiple()
|
|
|
|
+ userId := qu.InterfaceToStr(sessVal["userId"])
|
|
//接收参数
|
|
//接收参数
|
|
json.Unmarshal([]byte(body), &infoMap)
|
|
json.Unmarshal([]byte(body), &infoMap)
|
|
if len(infoMap) == 0 {
|
|
if len(infoMap) == 0 {
|
|
- return entity.NewResultSales{Error_code: -1, Error_msg: Error_msg_1002}
|
|
|
|
|
|
+ //return entity.NewResultSales{Error_code: -1, Error_msg: Error_msg_1002}
|
|
|
|
+ //---跳过--- 且没有任何信息
|
|
}
|
|
}
|
|
- sessVal := i.Session().GetMultiple()
|
|
|
|
- userId := qu.InterfaceToStr(sessVal["userId"])
|
|
|
|
var userSales bool
|
|
var userSales bool
|
|
for k, v := range infoMap {
|
|
for k, v := range infoMap {
|
|
ik := qu.InterfaceToStr(k)
|
|
ik := qu.InterfaceToStr(k)
|
|
@@ -777,12 +778,17 @@ func (i *Info) AppNewUerSales() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if len(setMap) > 0 {
|
|
|
|
+ ok2 := MQFW.UpdateById("user", userId, map[string]interface{}{
|
|
|
|
+ "$set": setMap,
|
|
|
|
+ })
|
|
|
|
+ if !ok2 {
|
|
|
|
+ return entity.NewResultSales{Error_code: -1, Error_msg: "用户信息保存失败"}
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- ok2 := MQFW.UpdateById("user", userId, map[string]interface{}{
|
|
|
|
- "$set": setMap,
|
|
|
|
- })
|
|
|
|
|
|
|
|
- if !ok && !ok2 {
|
|
|
|
|
|
+ if !ok {
|
|
return entity.NewResultSales{Error_code: -1, Error_msg: "用户信息保存失败"}
|
|
return entity.NewResultSales{Error_code: -1, Error_msg: "用户信息保存失败"}
|
|
}
|
|
}
|
|
//redis.Put("other", fmt.Sprintf(AppNewUserRegistration, userid), 1, 60*60*24*7)
|
|
//redis.Put("other", fmt.Sprintf(AppNewUserRegistration, userid), 1, 60*60*24*7)
|