Merge remote-tracking branch 'origin/test' into dev
正在显示
3 个修改的文件
包含
10 行增加
和
3 行删除
| @@ -36,7 +36,7 @@ func (this *AuthController) Login() { | @@ -36,7 +36,7 @@ func (this *AuthController) Login() { | ||
| 36 | return | 36 | return |
| 37 | } | 37 | } |
| 38 | header := controllers.GetRequestHeader(this.Ctx) | 38 | header := controllers.GetRequestHeader(this.Ctx) |
| 39 | - if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "test1" { | 39 | + if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "test" { |
| 40 | msg = protocol.NewReturnResponse(auth.LoginV3(header, request)) | 40 | msg = protocol.NewReturnResponse(auth.LoginV3(header, request)) |
| 41 | return | 41 | return |
| 42 | } | 42 | } |
| @@ -137,7 +137,7 @@ func (this *UserController) SwitchCompany() { | @@ -137,7 +137,7 @@ func (this *UserController) SwitchCompany() { | ||
| 137 | return | 137 | return |
| 138 | } | 138 | } |
| 139 | header := controllers.GetRequestHeader(this.Ctx) | 139 | header := controllers.GetRequestHeader(this.Ctx) |
| 140 | - if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "test1" { | 140 | + if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "test" { |
| 141 | msg = protocol.NewReturnResponse(user.SwitchCompanyV3(header, request)) | 141 | msg = protocol.NewReturnResponse(user.SwitchCompanyV3(header, request)) |
| 142 | return | 142 | return |
| 143 | } | 143 | } |
| @@ -162,7 +162,7 @@ func (this *UserController) UserInfo() { | @@ -162,7 +162,7 @@ func (this *UserController) UserInfo() { | ||
| 162 | return | 162 | return |
| 163 | } | 163 | } |
| 164 | header := controllers.GetRequestHeader(this.Ctx) | 164 | header := controllers.GetRequestHeader(this.Ctx) |
| 165 | - if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "test1" { | 165 | + if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "test" { |
| 166 | msg = protocol.NewReturnResponse(user.UserInfoV3(header, request)) | 166 | msg = protocol.NewReturnResponse(user.UserInfoV3(header, request)) |
| 167 | return | 167 | return |
| 168 | } | 168 | } |
| @@ -1526,6 +1526,9 @@ func ChanceStatistics(header *protocol.RequestHeader, request *protocol.ChanceSt | @@ -1526,6 +1526,9 @@ func ChanceStatistics(header *protocol.RequestHeader, request *protocol.ChanceSt | ||
| 1526 | item := chanceType[i] | 1526 | item := chanceType[i] |
| 1527 | if total, err = agg.GetChancePool(header.UserId, header.CompanyId, models.NewChancePoolOption(item.Id, []int{}, models.ChancePool, 0), 0, false, 0, 0, nil); err != nil { | 1527 | if total, err = agg.GetChancePool(header.UserId, header.CompanyId, models.NewChancePoolOption(item.Id, []int{}, models.ChancePool, 0), 0, false, 0, 0, nil); err != nil { |
| 1528 | log.Error(err) | 1528 | log.Error(err) |
| 1529 | + if err == orm.ErrNoRows { | ||
| 1530 | + err = nil | ||
| 1531 | + } | ||
| 1529 | return | 1532 | return |
| 1530 | } | 1533 | } |
| 1531 | sum += total | 1534 | sum += total |
| @@ -2222,6 +2225,10 @@ func Permission(header *protocol.RequestHeader, request *protocol.PermissionRequ | @@ -2222,6 +2225,10 @@ func Permission(header *protocol.RequestHeader, request *protocol.PermissionRequ | ||
| 2222 | if chance.UserId != header.UserId && chance.ReviewStatus == protocol.ReviewStatusReturn { | 2225 | if chance.UserId != header.UserId && chance.ReviewStatus == protocol.ReviewStatusReturn { |
| 2223 | noPermission() | 2226 | noPermission() |
| 2224 | } | 2227 | } |
| 2228 | + //机会 已经在审核中的 本来即使是管理员也没有权限 | ||
| 2229 | + if chance.UserId == header.UserId && chance.ReviewStatus == protocol.ReviewStatusAuditging && len(chance.ApproveData) > 0 { | ||
| 2230 | + noPermission() | ||
| 2231 | + } | ||
| 2225 | return | 2232 | return |
| 2226 | } | 2233 | } |
| 2227 | //机会关闭 / 删除 | 2234 | //机会关闭 / 删除 |
-
请 注册 或 登录 后发表评论