wangchuanjin 8 сар өмнө
parent
commit
1e16bb48b4

+ 8 - 2
common/src/qfw/util/jy/subScribe.go

@@ -1,12 +1,13 @@
 package jy
 
 import (
+	"time"
+
 	"app.yhyue.com/moapp/jybase/common"
 	qutil "app.yhyue.com/moapp/jybase/common"
 	"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{} {
@@ -159,7 +160,7 @@ func format(data *map[string]interface{}) *map[string]interface{} {
 }
 
 // 用户注册日志保存
-func SaveUserLog(mg mongodb.MongodbSim, userid, phone, way, system, source, openid, search_engine, promotion, ip, user_agent, site, event string) {
+func SaveUserLog(mg mongodb.MongodbSim, userid, phone, way, system, source, openid, search_engine, promotion, ip, user_agent, site, event string, others ...map[string]interface{}) {
 	data := map[string]interface{}{
 		"userid":        userid,
 		"phone":         phone,
@@ -175,5 +176,10 @@ func SaveUserLog(mg mongodb.MongodbSim, userid, phone, way, system, source, open
 		"site":          site,
 		"event":         event,
 	}
+	if len(others) > 0 {
+		for k, v := range others[0] {
+			data[k] = v
+		}
+	}
 	mg.Save("register_log", data)
 }