|
@@ -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{} {
|
|
@@ -156,3 +157,23 @@ func format(data *map[string]interface{}) *map[string]interface{} {
|
|
|
}
|
|
|
return data
|
|
|
}
|
|
|
+
|
|
|
+// 用户注册日志保存
|
|
|
+func SaveUserLog(mg mongodb.MongodbSim, 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,
|
|
|
+ }
|
|
|
+ mg.Save("user", data)
|
|
|
+}
|