作者 tangxvhui

bug 修复

... ... @@ -121,6 +121,7 @@ var errmessge ErrorMap = map[string]string{
"10121": "把握得分必填,0.1-100",
"10122": "分配的总分不可大于把握分",
"10123": "排行榜评比项最多4项",
"10124": "公司未启用该模块",
}
//错误码转换 ,兼容需要
... ...
... ... @@ -588,7 +588,7 @@ func LoginAuthBySecretKey(secretKey string) (protocol.LoginAuthToken, error) {
}
userdata, err = models.GetUserByPhone(uclientReturn.Data.Phone)
if err != nil {
log.Debug("GetUserByUCenter(%d) err:%s", uclientReturn.Data.Id, err)
log.Debug("GetUserByPhone(%d) err:%s", uclientReturn.Data.Phone, err)
return logintoken, protocol.NewErrWithMessage("10021")
}
companyData, err = models.GetCompanyByUCenter(uclientReturn.Data.CompanyId)
... ... @@ -596,6 +596,10 @@ func LoginAuthBySecretKey(secretKey string) (protocol.LoginAuthToken, error) {
log.Error("获取company数据失败:%s", err)
return logintoken, protocol.NewErrWithMessage("10111")
}
if companyData.Enable == models.COMPANY_ENABLE_NO {
log.Error("公司未启用机会模块")
return logintoken, protocol.NewErrWithMessage("10124")
}
ucompany, err := models.GetUserCompanyBy(userdata.Id, companyData.Id)
if err != nil {
log.Error("获取user_company失败;%s", err)
... ...