|
@@ -105,13 +105,13 @@ func GetMediaPageByIds(latestId int64, limit int, offset int, mediaType string,
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-func GetAnalystMediaRangeReportIds(srcIds []int, analystId int) (mediaIds []int, err error) {
|
|
|
+func GetAnalystMediaRangeReportIds(mediaType string, srcIds []int, analystId int) (mediaIds []int, err error) {
|
|
|
if len(srcIds) == 0 {
|
|
|
logger.Info("过滤的媒体ID为空")
|
|
|
return
|
|
|
}
|
|
|
db := models.Main()
|
|
|
- err = db.Model(&Media{}).Select(CommonColumns).Where(" id in ? and author_id = ? and deleted =?", mediaIds, analystId, false).Find(&mediaIds).Error
|
|
|
+ err = db.Model(&Media{}).Select("id").Where(" id in ? and media_type= ? and author_id = ? and deleted =?", srcIds, mediaType, analystId, false).Find(&mediaIds).Error
|
|
|
return
|
|
|
}
|
|
|
func GetMediaPageByAnalystId(latestId int64, limit int, offset int, mediaType string, analystId int, mediaIds []int) (mediaList []Media, err error) {
|