Эх сурвалжийг харах

Merge branch 'dev_v4.9.70.1_wh' of qmx/jy into hotfix/v4.9.70.1

王浩 8 сар өмнө
parent
commit
253d22eeae

+ 18 - 2
src/jfw/modules/publicapply/src/oneclick/entity/entity.go

@@ -352,11 +352,11 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
 				s_phone := gconv.String(m["s_phone"])
 				s_m_phone := gconv.String(m["s_m_phone"])
 				openid := gconv.String(m["s_m_openid"])
-				if (s_m_phone != "" || s_phone != "" ) && openid != "" {
+				if (s_m_phone != "" || s_phone != "") && openid != "" {
 					//已经绑定过手机号
 					return -1
 				}
-				if s_phone != ""  {
+				if s_phone != "" {
 					key = "s_m_phone"
 					continue
 				}
@@ -606,6 +606,22 @@ func AccountMerge(phone, email, mgoUserId string, sess *httpsession.Session) (to
 						backData[k] = v
 					}
 					if db.Mgo.Save("user_merge", backData) != "" {
+						//给另外一个用户发站内信
+						userData := db.BaseMysql.FindOne("base_position", map[string]interface{}{
+							"user_id": gconv.Int64(sess.Get("base_user_id")),
+							"type":    0,
+						}, "id", "")
+						log.Println("绑定日志打印", userData)
+						if userData != nil && len(*userData) > 0 {
+							jy.Publish(db.Mgo_Log, config.Config.Nsq, config.Config.NsqTopic, "task", relationPhoneId, jy.Jyweb_node2, map[string]interface{}{
+								"code":       1007,
+								"types":      "bindPhone",
+								"num":        50,
+								"baseUserId": gconv.Int64(sess.Get("base_user_id")),
+								"positionId": gconv.Int64(sess.Get("positionId")),
+								"isOnlyBind": true,
+							})
+						}
 						db.Mgo.Del("user", map[string]interface{}{"_id": mongodb.StringTOBsonId(mgoUserId)})
 						jy.CreateUserMerge(db.Mgo, db.Mysql, sess, config.Middleground).FlushSession(relationPhoneId)
 						redis.Put("session", fmt.Sprintf("usermerge_delete_%s", mgoUserId), relationPhoneId, 7*24*60*60)