|
@@ -59,6 +59,7 @@ func (this *ReportController) Detail() {
|
|
|
br.ErrMsg = "获取报告详情失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
if report == nil {
|
|
|
status = 1
|
|
|
msg = "报告不存在"
|
|
@@ -156,15 +157,17 @@ func (this *ReportController) Detail() {
|
|
|
//判断大小权限
|
|
|
{
|
|
|
if status == 2 {
|
|
|
- permissionCount, err := models.GetCompanyProductPermissionCount(company.CompanyId, productId)
|
|
|
- if err != nil {
|
|
|
- br.Msg = "获取信息失败"
|
|
|
- br.ErrMsg = "获取权限信息失败,Err:" + err.Error()
|
|
|
- return
|
|
|
- }
|
|
|
- if permissionCount >= maxPermissionCount {
|
|
|
- status = 0
|
|
|
- msg = ""
|
|
|
+ if company!=nil {
|
|
|
+ permissionCount, err := models.GetCompanyProductPermissionCount(company.CompanyId, productId)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取权限信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if permissionCount >= maxPermissionCount {
|
|
|
+ status = 0
|
|
|
+ msg = ""
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|