|
@@ -141,7 +141,7 @@ func GetByReportId(id int) (item *Report, err error) {
|
|
|
// GetByReportIds 根据id获取报告
|
|
|
func GetByReportIds(ids []int) (list []*Report, err error) {
|
|
|
err = global.MYSQL["rddp"].Model(Report{}).
|
|
|
- Where("id in (?) and state IN (2, 6) and is_public_publish=1", ids).
|
|
|
+ Where("id in (?) and state IN (2, 6) and is_public_publish=1 AND report_layout IN (1,2)", ids).
|
|
|
Select("id, create_time, rai_report_id").
|
|
|
Scan(&list).Error
|
|
|
if err == utils.ErrNoRow {
|
|
@@ -488,7 +488,6 @@ func GetReportCollectListByPermissionV1(chartPermissionId int, firstClassifyIdLi
|
|
|
conditionList = append(conditionList, "classify_id_third in ?")
|
|
|
pars = append(pars, thirdClassifyIdList)
|
|
|
}
|
|
|
-
|
|
|
condition := " classify_id_first = 0 "
|
|
|
if len(conditionList) > 0 {
|
|
|
condition = strings.Join(conditionList, " OR ")
|
|
@@ -514,6 +513,7 @@ WHERE
|
|
|
has_chapter != 1
|
|
|
AND ( ` + condition + ` )
|
|
|
AND state IN (2, 6) and is_public_publish=1
|
|
|
+AND report_layout IN (1,2)
|
|
|
)
|
|
|
UNION
|
|
|
|