Explorar el Código

Merge remote-tracking branch 'origin/yb/1.1'

Roc hace 3 años
padre
commit
a71cae7e4c

+ 2 - 1
controller/report/research_report.go

@@ -36,7 +36,8 @@ func GetResearchReportInfo(c *gin.Context) {
 
 	reportInfo, hasPermission, err := report.GetResearchReportInfo(uint64(researchReportId), userInfo.UserID)
 	if err != nil {
-		response.Fail(err.Error(), c)
+		response.Fail("获取报告失败", c)
+		return
 	}
 	if !hasPermission {
 		response.Fail("无权限", c)

+ 1 - 1
models/tables/company_report_permission/custom_query.go

@@ -68,7 +68,7 @@ func GetResearchReportType(researchReportId, userId uint64, reportType string) (
 			for _, v := range reportChapterTypeList {
 				reportChapterTypeIdList = append(reportChapterTypeIdList, fmt.Sprint(v.ReportChapterTypeId))
 			}
-			condition += ` and rct.report_chapter_type_id in ( ` + `) `
+			condition += ` and rct.report_chapter_type_id in (?) `
 			whereVals = append(whereVals, strings.Join(reportChapterTypeIdList, ","))
 
 		}