|
@@ -186,7 +186,7 @@ func GetMediaById(mediaType string, mediaId int, isLogin bool, userId int) (medi
|
|
|
// media.RiskLevelStatus = RiskLevelUnMatch
|
|
|
// media.Login = false
|
|
|
//}
|
|
|
- return DealMediaInfo(media, isLogin, userId, mappingRiskLevel)
|
|
|
+ return DealMediaInfo(media, isLogin, userId, mappingRiskLevel, true)
|
|
|
}
|
|
|
func matchRiskLevel(userId int, media mediaService.MediaDTO) (riskLevelMatch string, productRiskLevel string, err error) {
|
|
|
userProfile, userErr := user.GetUserProfile(userId)
|
|
@@ -312,7 +312,7 @@ func GetMediaPermissionNames(id []int) (labels []string) {
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
-func DealMediaInfo(media *mediaService.MediaDTO, isLogin bool, templateUserId int, mappingRiskLevel string) (resultMedia *mediaService.MediaDTO, err error) {
|
|
|
+func DealMediaInfo(media *mediaService.MediaDTO, isLogin bool, templateUserId int, mappingRiskLevel string, isDetail bool) (resultMedia *mediaService.MediaDTO, err error) {
|
|
|
idStr := strings.Split(media.PermissionIDs, ",")
|
|
|
var ids []int
|
|
|
ids, err = stringUtils.StringToIntSlice(idStr)
|
|
@@ -421,7 +421,7 @@ func dealMediaInfo(list []mediaService.MediaDTO, isLogin bool, templateUserId in
|
|
|
for i := 0; i < len(list); i++ {
|
|
|
go func(media *mediaService.MediaDTO) {
|
|
|
defer wg.Done()
|
|
|
- media, err = DealMediaInfo(media, isLogin, templateUserId, mappingRiskLevel)
|
|
|
+ media, err = DealMediaInfo(media, isLogin, templateUserId, mappingRiskLevel, false)
|
|
|
if err != nil {
|
|
|
logger.Error("处理媒体信息失败:%v", err)
|
|
|
}
|