课程-无权限也可搜索

This commit is contained in:
lims1@hunktimes.com
2023-08-08 11:50:21 +08:00
parent 23a02a1355
commit befeaaefea
2 changed files with 6 additions and 5 deletions

View File

@@ -354,7 +354,8 @@ public class CourseElasticsearchImpl implements ICourseFullTextSearch{
}
//加上Source判断是为了应对后台查询后台查询时不需要权限但是需要指定数据来源
/* 2023-08-08 不管是否是此课程受众 ,都可以搜索到 但点进课程详情提示无权限
//加上Source判断是为了应对后台查询后台查询时不需要权限但是需要指定数据来源
if(params.getSource()==null || params.getSource()==0 ) {
//受众权限条件,必须是有受众的课程并且受众条件不为空
if(params.getAudiences()!=null && params.getAudiences().length>0) {
@@ -377,7 +378,7 @@ public class CourseElasticsearchImpl implements ICourseFullTextSearch{
//如果当前用户无受众,只能查询未设置受众的课程
boolQuery.must(QueryBuilders.termQuery("isSetAudience",0));
}
}
}*/
//在哪端显示
if(params.getDevice()!=null) {