瀏覽代碼

fix:报告权限调整

Roc 3 年之前
父節點
當前提交
97a27f58e2
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      models/tables/company_report_permission/custom_query.go

+ 5 - 4
models/tables/company_report_permission/custom_query.go

@@ -1,6 +1,7 @@
 package company_report_permission
 
 import (
+	"fmt"
 	"hongze/hongze_yb/global"
 	"strings"
 	"time"
@@ -63,12 +64,12 @@ func GetResearchReportType(researchReportId, userId uint64, reportType string) (
 			return
 		}
 		if len(reportChapterTypeList) > 0 {
-			reportChapterTypeIdList := make([]uint64, 0)
+			reportChapterTypeIdList := make([]string, 0)
 			for _, v := range reportChapterTypeList {
-				reportChapterTypeIdList = append(reportChapterTypeIdList, v.ReportChapterTypeId)
+				reportChapterTypeIdList = append(reportChapterTypeIdList, fmt.Sprint(v.ReportChapterTypeId))
 			}
-			condition += ` and rct.report_chapter_type_id in ? `
-			whereVals = append(whereVals, reportChapterTypeIdList)
+			condition += ` and rct.report_chapter_type_id in (` + strings.Join(reportChapterTypeIdList, ",") + `) `
+			//whereVals = append(whereVals, strings.Join(reportChapterTypeIdList, ","))
 
 		}
 	}