|
@@ -26,9 +26,23 @@ func (rpc *JyUser) AddUserInfo(info *CompletionUserInfo, res *Resp) error {
|
|
userPositionId := int64(0)
|
|
userPositionId := int64(0)
|
|
entPositionId := int64(0)
|
|
entPositionId := int64(0)
|
|
fool := BaseMysql.ExecTx("", func(tx *sql.Tx) bool {
|
|
fool := BaseMysql.ExecTx("", func(tx *sql.Tx) bool {
|
|
- userData := BaseMysql.FindOne(UserTable, map[string]interface{}{
|
|
|
|
- "phone": info.Phone,
|
|
|
|
- }, "person_id,id,nickname", "")
|
|
|
|
|
|
+ users, ok := Mgo.Find("user", map[string]interface{}{
|
|
|
|
+ "i_appid": 2,
|
|
|
|
+ "$or": []map[string]interface{}{
|
|
|
|
+ map[string]interface{}{
|
|
|
|
+ "s_phone": info.Phone,
|
|
|
|
+ },
|
|
|
|
+ map[string]interface{}{
|
|
|
|
+ "s_m_phone": info.Phone,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ }, `{"base_user_id":-1}`, `{"base_user_id":1}`, false, -1, -1)
|
|
|
|
+ userData := &map[string]interface{}{}
|
|
|
|
+ if ok && users != nil && len(*users) > 0 {
|
|
|
|
+ userData = BaseMysql.FindOne(UserTable, map[string]interface{}{
|
|
|
|
+ "id": (*users)[0]["base_user_id"],
|
|
|
|
+ }, "person_id,id,nickname", "")
|
|
|
|
+ }
|
|
if info.IsEnt {
|
|
if info.IsEnt {
|
|
//需要创建企业用户
|
|
//需要创建企业用户
|
|
entMap := map[string]interface{}{
|
|
entMap := map[string]interface{}{
|
|
@@ -124,7 +138,7 @@ func (rpc *JyUser) AddUserInfo(info *CompletionUserInfo, res *Resp) error {
|
|
//个人职位
|
|
//个人职位
|
|
//职位表添加
|
|
//职位表添加
|
|
userPositionMap := map[string]interface{}{
|
|
userPositionMap := map[string]interface{}{
|
|
- "ent_id": info.EntId,
|
|
|
|
|
|
+ "ent_id": 0,
|
|
"user_id": userId,
|
|
"user_id": userId,
|
|
"account_id": userAccountId,
|
|
"account_id": userAccountId,
|
|
"person_name": personName,
|
|
"person_name": personName,
|