浏览代码

Merge branch 'dev/v3.1.11_zxl' of jianyu/salesLeads into feature/v3.1.11

zhangxinlei1996 1 年之前
父节点
当前提交
f4bd70d9c5
共有 1 个文件被更改,包括 18 次插入1 次删除
  1. 18 1
      src/service/action/info.go

+ 18 - 1
src/service/action/info.go

@@ -476,7 +476,24 @@ func (i *Info) AppNewUerSales() {
 			"$set": m,
 		})
 
-		if !ok {
+		//更新消息接收设置
+		msgSet := qu.ObjToMap(infoMap["msgSet"])
+		setMap := map[string]interface{}{}
+		if msgSet != nil {
+			for k, v := range *msgSet {
+				item := qu.ObjToMap(v)
+				if item != nil {
+					for key, val := range *item {
+						setMap[fmt.Sprintf("o_pushset.%s.%s", qu.ObjToString(k), qu.ObjToString(key))] = qu.IntAll(val)
+					}
+				}
+			}
+		}
+		ok2 := MQFW.UpdateById("user", userid, map[string]interface{}{
+			"$set": setMap,
+		})
+
+		if !ok && !ok2 {
 			return NewResultSales{Error_code: -1, Error_msg: "用户信息保存失败"}
 		}
 		//redis.Put("other", fmt.Sprintf(AppNewUserRegistration, userid), 1, 60*60*24*7)