|
@@ -6,6 +6,7 @@ import (
|
|
|
"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
|
|
|
"app.yhyue.com/moapp/jybase/go-xweb/log"
|
|
|
"app.yhyue.com/moapp/jybase/mongodb"
|
|
|
+ "time"
|
|
|
)
|
|
|
|
|
|
func GetSubScribeInfo(session *httpsession.Session, mg mongodb.MongodbSim, types, appid string) *map[string]interface{} {
|
|
@@ -81,7 +82,7 @@ func GetSubScribeInfo(session *httpsession.Session, mg mongodb.MongodbSim, types
|
|
|
return object
|
|
|
}
|
|
|
|
|
|
-//商机管理订阅设置
|
|
|
+// 商机管理订阅设置
|
|
|
func EntnicheSub(entUserId, entId int64, types int64, mg mongodb.MongodbSim) *map[string]interface{} {
|
|
|
object := &map[string]interface{}{}
|
|
|
entnicheJy := &map[string]interface{}{}
|
|
@@ -115,7 +116,7 @@ func EntnicheSub(entUserId, entId int64, types int64, mg mongodb.MongodbSim) *ma
|
|
|
return entnicheJy
|
|
|
}
|
|
|
|
|
|
-//格式化数据 大会员/超级订阅/商机管理 结构一致 关键词格式化
|
|
|
+// 格式化数据 大会员/超级订阅/商机管理 结构一致 关键词格式化
|
|
|
func format(data *map[string]interface{}) *map[string]interface{} {
|
|
|
if data == nil {
|
|
|
return nil
|
|
@@ -156,3 +157,23 @@ func format(data *map[string]interface{}) *map[string]interface{} {
|
|
|
}
|
|
|
return data
|
|
|
}
|
|
|
+
|
|
|
+// 用户注册日志保存
|
|
|
+func SaveUserLog(userid, phone, way, system, source, openid, search_engine, promotion, ip, user_agent, site, event string) {
|
|
|
+ data := map[string]interface{}{
|
|
|
+ "userid": userid,
|
|
|
+ "phone": phone,
|
|
|
+ "way": way,
|
|
|
+ "system": system,
|
|
|
+ "source": source,
|
|
|
+ "create_time": time.Now().Format("2006-01-02 15:04:05"),
|
|
|
+ "openid": openid,
|
|
|
+ "search_engine": search_engine,
|
|
|
+ "promotion": promotion,
|
|
|
+ "ip": ip,
|
|
|
+ "user_agent": user_agent,
|
|
|
+ "site": site,
|
|
|
+ "event": event,
|
|
|
+ }
|
|
|
+ MQFW.Save("user", data)
|
|
|
+}
|