正在显示
2 个修改的文件
包含
2 行增加
和
1 行删除
@@ -422,7 +422,7 @@ func LoginV2(header *protocol.RequestHeader, request *protocol.LoginRequestV2) ( | @@ -422,7 +422,7 @@ func LoginV2(header *protocol.RequestHeader, request *protocol.LoginRequestV2) ( | ||
422 | } | 422 | } |
423 | break | 423 | break |
424 | case int(protocolx.AdminTypeManager): | 424 | case int(protocolx.AdminTypeManager): |
425 | - if p, e := UsersRepository.FindOne(map[string]interface{}{"phone": claim.Phone, "companyId": request.Cid}); e == nil { | 425 | + if p, e := UsersRepository.FindOne(map[string]interface{}{"phone": claim.Phone, "companyId": request.Cid, "deleteAtIsNull": true}); e == nil { |
426 | userId = p.Id | 426 | userId = p.Id |
427 | if !p.IsEnable() { | 427 | if !p.IsEnable() { |
428 | err = protocol.NewErrWithMessage(10006, err) //当前账号已被禁用 | 428 | err = protocol.NewErrWithMessage(10006, err) //当前账号已被禁用 |
@@ -53,6 +53,7 @@ func (repository *UsersRepository) FindOne(queryOptions map[string]interface{}) | @@ -53,6 +53,7 @@ func (repository *UsersRepository) FindOne(queryOptions map[string]interface{}) | ||
53 | query.SetWhere("status = ?", "status") | 53 | query.SetWhere("status = ?", "status") |
54 | query.SetWhere("phone = ?", "phone") | 54 | query.SetWhere("phone = ?", "phone") |
55 | query.SetWhere("company_id = ?", "companyId") | 55 | query.SetWhere("company_id = ?", "companyId") |
56 | + query.SetWhere(`delete_at is null`, "deleteAtIsNull") | ||
56 | if err := query.First(); err != nil { | 57 | if err := query.First(); err != nil { |
57 | return nil, fmt.Errorf("query row not found") | 58 | return nil, fmt.Errorf("query row not found") |
58 | } | 59 | } |
-
请 注册 或 登录 后发表评论