mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 04:16:51 +08:00
课程-无权限也可搜索
This commit is contained in:
@@ -354,7 +354,8 @@ public class CourseElasticsearchImpl implements ICourseFullTextSearch{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//加上Source判断,是为了应对后台查询,后台查询时,不需要权限,但是需要指定数据来源
|
/* 2023-08-08 不管是否是此课程受众 ,都可以搜索到 但点进课程详情提示无权限
|
||||||
|
//加上Source判断,是为了应对后台查询,后台查询时,不需要权限,但是需要指定数据来源
|
||||||
if(params.getSource()==null || params.getSource()==0 ) {
|
if(params.getSource()==null || params.getSource()==0 ) {
|
||||||
//受众权限条件,必须是有受众的课程并且受众条件不为空
|
//受众权限条件,必须是有受众的课程并且受众条件不为空
|
||||||
if(params.getAudiences()!=null && params.getAudiences().length>0) {
|
if(params.getAudiences()!=null && params.getAudiences().length>0) {
|
||||||
@@ -377,7 +378,7 @@ public class CourseElasticsearchImpl implements ICourseFullTextSearch{
|
|||||||
//如果当前用户无受众,只能查询未设置受众的课程
|
//如果当前用户无受众,只能查询未设置受众的课程
|
||||||
boolQuery.must(QueryBuilders.termQuery("isSetAudience",0));
|
boolQuery.must(QueryBuilders.termQuery("isSetAudience",0));
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//在哪端显示
|
//在哪端显示
|
||||||
if(params.getDevice()!=null) {
|
if(params.getDevice()!=null) {
|
||||||
|
|||||||
@@ -215,9 +215,9 @@ public class CourseFullTextApi extends ApiBaseController{
|
|||||||
//用户的companyId
|
//用户的companyId
|
||||||
paras.setCompanyId(dto.getCompanyId());
|
paras.setCompanyId(dto.getCompanyId());
|
||||||
//paras.setAudience(dto.getAudiences());
|
//paras.setAudience(dto.getAudiences());
|
||||||
// if(StringUtils.isNotBlank(dto.getAudiences())) {
|
if(StringUtils.isNotBlank(dto.getAudiences())) {
|
||||||
// paras.setAudiences(dto.getAudiences().split(","));
|
paras.setAudiences(dto.getAudiences().split(","));
|
||||||
// }
|
}
|
||||||
|
|
||||||
paras.setOpenCourse(dto.getOpenCourse());
|
paras.setOpenCourse(dto.getOpenCourse());
|
||||||
if(StringUtils.isNotBlank(dto.getOrderField())) {
|
if(StringUtils.isNotBlank(dto.getOrderField())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user