|
@@ -3,7 +3,7 @@ package report
|
|
|
import (
|
|
|
"hongze/hongze_yb/models/tables/company_report_permission"
|
|
|
"hongze/hongze_yb/models/tables/research_report"
|
|
|
- "strings"
|
|
|
+ "hongze/hongze_yb/utils"
|
|
|
)
|
|
|
|
|
|
func GetResearchReportInfo(researchReportId, userId uint64) (result ResearchReportInfo, hasPermission bool, err error) {
|
|
@@ -14,7 +14,8 @@ func GetResearchReportInfo(researchReportId, userId uint64) (result ResearchRepo
|
|
|
}
|
|
|
reportType := reportInfo.Type
|
|
|
//这些个报告需要做权限校验
|
|
|
- if strings.Contains("month,two_week,other", reportInfo.Type) {
|
|
|
+
|
|
|
+ if utils.InArray(reportInfo.Type, []string{"month", "two_week", "other"}) {
|
|
|
list, tmpErr := company_report_permission.GetReportVarietyList(userId, reportType)
|
|
|
if tmpErr != nil {
|
|
|
err = tmpErr
|