|
@@ -186,18 +186,18 @@ func (u *User) Add(tx *sql.Tx, entId int, user *User, paymentAddress, source, ns
|
|
//base_user表,用户名字段 user_name
|
|
//base_user表,用户名字段 user_name
|
|
//mog库user表,用户名字段 user_name
|
|
//mog库user表,用户名字段 user_name
|
|
if user.User_name != "" && len(user.User_name) > 0 {
|
|
if user.User_name != "" && len(user.User_name) > 0 {
|
|
- Mysql.Update(Entniche_user, map[string]interface{}{
|
|
|
|
|
|
+ /*Mysql.Update(Entniche_user, map[string]interface{}{
|
|
"phone": user.Phone,
|
|
"phone": user.Phone,
|
|
}, map[string]interface{}{
|
|
}, map[string]interface{}{
|
|
"user_name": user.User_name,
|
|
"user_name": user.User_name,
|
|
- })
|
|
|
|
|
|
+ })*/
|
|
data, _ := MQFW.Find("user", map[string]interface{}{
|
|
data, _ := MQFW.Find("user", map[string]interface{}{
|
|
"i_appid": 2,
|
|
"i_appid": 2,
|
|
"$or": []map[string]interface{}{
|
|
"$or": []map[string]interface{}{
|
|
{"s_phone": user.Phone},
|
|
{"s_phone": user.Phone},
|
|
{"s_m_phone": user.Phone},
|
|
{"s_m_phone": user.Phone},
|
|
},
|
|
},
|
|
- }, `{"s_phone":-1}`, `{"_id":1,"s_password":1}`, false, 0, 1)
|
|
|
|
|
|
+ }, `{"s_phone":-1}`, `{"_id":1,"base_user_id":1}`, false, 0, 1)
|
|
if data != nil && len(*data) > 0 {
|
|
if data != nil && len(*data) > 0 {
|
|
for _, v := range *data {
|
|
for _, v := range *data {
|
|
userId := v["_id"]
|
|
userId := v["_id"]
|
|
@@ -316,18 +316,18 @@ func (u *User) UpdateUserName(entId, userId int, user_name string) {
|
|
//mog库user表,用户名字段 user_name
|
|
//mog库user表,用户名字段 user_name
|
|
if user_name != "" && len(user_name) > 0 {
|
|
if user_name != "" && len(user_name) > 0 {
|
|
user := u.GetById(entId, userId)
|
|
user := u.GetById(entId, userId)
|
|
- Mysql.Update(Entniche_user, map[string]interface{}{
|
|
|
|
|
|
+ /*Mysql.Update(Entniche_user, map[string]interface{}{
|
|
"phone": user.Phone,
|
|
"phone": user.Phone,
|
|
}, map[string]interface{}{
|
|
}, map[string]interface{}{
|
|
"user_name": user_name,
|
|
"user_name": user_name,
|
|
- })
|
|
|
|
|
|
+ })*/
|
|
data, _ := MQFW.Find("user", map[string]interface{}{
|
|
data, _ := MQFW.Find("user", map[string]interface{}{
|
|
"i_appid": 2,
|
|
"i_appid": 2,
|
|
"$or": []map[string]interface{}{
|
|
"$or": []map[string]interface{}{
|
|
{"s_phone": user.Phone},
|
|
{"s_phone": user.Phone},
|
|
{"s_m_phone": user.Phone},
|
|
{"s_m_phone": user.Phone},
|
|
},
|
|
},
|
|
- }, `{"s_phone":-1}`, `{"_id":1,"s_password":1}`, false, 0, 1)
|
|
|
|
|
|
+ }, `{"s_phone":-1}`, `{"_id":1,"base_user_id":1}`, false, 0, 1)
|
|
if data != nil && len(*data) > 0 {
|
|
if data != nil && len(*data) > 0 {
|
|
for _, v := range *data {
|
|
for _, v := range *data {
|
|
userId := v["_id"]
|
|
userId := v["_id"]
|