...
|
...
|
@@ -44,6 +44,7 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp |
|
|
getUserResponse *protocol.UCenterGetUserResponse
|
|
|
message *protocol.Message
|
|
|
company *models.Company
|
|
|
companys []*models.Company
|
|
|
)
|
|
|
user, err = models.GetUserByUcenterId(id)
|
|
|
if err != nil {
|
...
|
...
|
@@ -51,6 +52,15 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp |
|
|
err = protocol.NewErrWithMessage(2002, err) //账号不存在
|
|
|
return
|
|
|
}
|
|
|
if companys, err = models.GetCompanyByPermission(user.Id); err != nil {
|
|
|
log.Error(err)
|
|
|
err = protocol.NewErrWithMessage(2002, err) //账号不存在
|
|
|
return
|
|
|
}
|
|
|
if len(companys) == 0 {
|
|
|
err = protocol.NewErrWithMessage(2002, err) //账号不存在
|
|
|
return
|
|
|
}
|
|
|
if !utils.ValidVersion(header.Version, protocol.RequireVersion) {
|
|
|
log.Warn(fmt.Sprintf("版本不足 当前手机版本:%v 需要版本大于:%v", header.Version, protocol.RequireVersion))
|
|
|
err = protocol.NewCustomMessage(2002, "版本不足,请升级app") //账号不存在
|
...
|
...
|
|