mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-14 21:36:48 +08:00
一基的服务与模板重新建立一个环境
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
package com.xboe.module.course.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 课程的全文检索索引
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class CourseFullText {
|
||||
|
||||
/**id,对于原系统是kid*/
|
||||
private String id;
|
||||
|
||||
/**es中的id*/
|
||||
private String esId;
|
||||
|
||||
|
||||
/**名称*/
|
||||
private String name;
|
||||
|
||||
|
||||
/**来源,1表来源老系统,2表来源新系统*/
|
||||
private Integer source;
|
||||
|
||||
private String keywords;
|
||||
|
||||
private String summary;
|
||||
|
||||
/**10无目录录播课,20 有目录录播课,30:面授课;40学习项目*/
|
||||
private Integer type;
|
||||
|
||||
/**原系统的企业id,对应sass模式的字段*/
|
||||
private String companyId;
|
||||
|
||||
/**封面图片*/
|
||||
private String coverImg;
|
||||
|
||||
/**课程的评分*/
|
||||
private Float score;
|
||||
|
||||
/**学习人数*/
|
||||
private Integer studies;
|
||||
|
||||
/** 格式化学习人数 **/
|
||||
private Integer studiesFormat;
|
||||
|
||||
private String teacher;
|
||||
|
||||
private String teacherCode;
|
||||
|
||||
/**发布时间*/
|
||||
private Long publishTime;
|
||||
|
||||
/**课程的时长,秒*/
|
||||
private Integer duration;
|
||||
|
||||
/**是否置顶*/
|
||||
private Integer isTop;
|
||||
|
||||
/**置顶时间*/
|
||||
private Long topTime;
|
||||
|
||||
/**系统的一级*/
|
||||
private String sysType1;
|
||||
|
||||
/**系统的二级*/
|
||||
private String sysType2;
|
||||
|
||||
/**系统的三级*/
|
||||
private String sysType3;
|
||||
|
||||
/**课程的标签*/
|
||||
private String tags;
|
||||
|
||||
/**
|
||||
* 是否有受众
|
||||
*/
|
||||
private Integer isSetAudience;
|
||||
|
||||
/**受众,受众的id,多个使用逗号分隔*/
|
||||
private String audience;
|
||||
|
||||
/**资源归属*/
|
||||
private String resOwner;
|
||||
|
||||
/**新系统无此字段*/
|
||||
private Integer startTime;
|
||||
|
||||
/**新系统无此字段*/
|
||||
private Integer endTime;
|
||||
|
||||
/**创建*/
|
||||
private Long createdAt;
|
||||
|
||||
/***/
|
||||
private String domainIds;
|
||||
|
||||
/**用于查询*/
|
||||
private Integer maxDuration;
|
||||
|
||||
/**用于查询排序处理,1表最新,2表最热,不做存储*/
|
||||
private Integer orderType;
|
||||
|
||||
/**设备 1:PC端可见;2:移动端可见;3:多端可见*/
|
||||
private Integer device;
|
||||
|
||||
/**
|
||||
* 是否公开课,0表非公开课,1表公开课
|
||||
*/
|
||||
private Integer openCourse;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.xboe.module.course.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.xboe.common.PageList;
|
||||
import com.xboe.module.course.dto.CourseFullText;
|
||||
|
||||
/**
|
||||
* 课程的全文检索
|
||||
*/
|
||||
public interface ICourseFullTextSearch {
|
||||
|
||||
/**
|
||||
* 默认索引名称
|
||||
*/
|
||||
public static final String DEFAULT_INDEX_NAME="new_resource_list";
|
||||
|
||||
/**
|
||||
* 发布课程
|
||||
* @param indexName
|
||||
* @param cf
|
||||
* @return
|
||||
*/
|
||||
String publish(String indexName,CourseFullText cf) throws Exception;
|
||||
|
||||
/**
|
||||
* 更新或重新发布
|
||||
* @param indexName
|
||||
* @param cf
|
||||
* @param fullTextId
|
||||
*/
|
||||
String republish(String indexName, CourseFullText cf, String fullTextId) throws Exception;
|
||||
|
||||
/**
|
||||
* 检查文档是否存在
|
||||
* @param indexName
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
boolean checkHas(String indexName,String id);
|
||||
|
||||
/**
|
||||
* 更新一个字段
|
||||
* @param indexName
|
||||
* @param field
|
||||
* @param value
|
||||
* @param fullTextId
|
||||
*/
|
||||
void updateField(String indexName, String field,Object value, String fullTextId) throws Exception;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 移除全文检索
|
||||
* @param indexName
|
||||
* @param id
|
||||
*/
|
||||
void remove(String indexName,String id) throws Exception;
|
||||
|
||||
// /**
|
||||
// * 重新发布到全文检索
|
||||
// * @param indexName
|
||||
// * @param item
|
||||
// * @param fullTextItemId
|
||||
// */
|
||||
// void republish(String indexName,CourseFullText item,String fullTextItemId);
|
||||
|
||||
/**
|
||||
* 不分页的全文检索
|
||||
* @param indexName
|
||||
* @param num
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
List<CourseFullText> search(String indexName,int num,CourseFullText paras) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
** 分页搜索
|
||||
* @param indexName
|
||||
* @param startRow
|
||||
* @param pageSize
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
PageList<CourseFullText> search(String indexName,int startRow,int pageSize,CourseFullText paras) throws Exception;
|
||||
}
|
||||
Reference in New Issue
Block a user