作者 yangfu

修改: 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 }