...
|
...
|
@@ -1526,6 +1526,9 @@ func ChanceStatistics(header *protocol.RequestHeader, request *protocol.ChanceSt |
|
|
item := chanceType[i]
|
|
|
if total, err = agg.GetChancePool(header.UserId, header.CompanyId, models.NewChancePoolOption(item.Id, []int{}, models.ChancePool, 0), 0, false, 0, 0, nil); err != nil {
|
|
|
log.Error(err)
|
|
|
if err == orm.ErrNoRows {
|
|
|
err = nil
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
sum += total
|
...
|
...
|
@@ -2222,6 +2225,10 @@ func Permission(header *protocol.RequestHeader, request *protocol.PermissionRequ |
|
|
if chance.UserId != header.UserId && chance.ReviewStatus == protocol.ReviewStatusReturn {
|
|
|
noPermission()
|
|
|
}
|
|
|
//机会 已经在审核中的 本来即使是管理员也没有权限
|
|
|
if chance.UserId == header.UserId && chance.ReviewStatus == protocol.ReviewStatusAuditging && len(chance.ApproveData) > 0 {
|
|
|
noPermission()
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
//机会关闭 / 删除
|
...
|
...
|
|