mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
Compare commits
100 Commits
251114-fea
...
dev250106-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0c292cabd | ||
|
|
ab38597570 | ||
|
|
a205effce1 | ||
|
|
5698a3ea58 | ||
|
|
0804c47d22 | ||
|
|
aab50a0ff0 | ||
|
|
c95e0faf63 | ||
|
|
9866618110 | ||
|
|
d6744bb990 | ||
|
|
be18f7477b | ||
|
|
e412f5b6eb | ||
|
|
255b854a08 | ||
|
|
157e692203 | ||
|
|
3343474f33 | ||
|
|
492032a77a | ||
|
|
1c6a64e504 | ||
|
|
cb8a333b4f | ||
|
|
6f861c3d2c | ||
|
|
b701f88586 | ||
|
|
6532cf75e3 | ||
|
|
ad357a61b7 | ||
|
|
09f64bdb08 | ||
|
|
f70b4cb32a | ||
|
|
4ec4b861f7 | ||
|
|
f577e82551 | ||
|
|
ffe232eeb9 | ||
|
|
e54c8b457b | ||
|
|
f273e9df4a | ||
|
|
ee25fa40cd | ||
|
|
45d38d6df7 | ||
|
|
1a93ab8abd | ||
|
|
aab82de81b | ||
|
|
0b5b882a6c | ||
|
|
3703cfb9c8 | ||
|
|
3a1908532e | ||
|
|
4205912db5 | ||
|
|
af6efd3151 | ||
|
|
963fae8191 | ||
|
|
c724080a3c | ||
|
|
b2bad03ba9 | ||
|
|
aa63a6618f | ||
|
|
4152baf8de | ||
|
|
d3fcbaeab6 | ||
|
|
0f2d8af1e4 | ||
|
|
82bf84bbaa | ||
|
|
423b658e04 | ||
|
|
acc62c85e0 | ||
|
|
795966d944 | ||
|
|
ec00f55606 | ||
|
|
4d161a1d36 | ||
|
|
3f59552c2e | ||
|
|
971478f206 | ||
|
|
eaafb57b83 | ||
|
|
ee74f47261 | ||
|
|
c0a00e9647 | ||
|
|
9d3bbcbf3a | ||
|
|
05dc7b984f | ||
|
|
5b4afdde65 | ||
|
|
53ff0d979e | ||
|
|
9a28d65c54 | ||
|
|
32fcc830de | ||
|
|
d0e5f8c329 | ||
|
|
9c5941fd6b | ||
|
|
2c94b09199 | ||
|
|
e5c8dbabed | ||
|
|
e0d731e296 | ||
|
|
f5c26d02d1 | ||
|
|
d147a5f861 | ||
|
|
e9995753c7 | ||
|
|
e59aab127f | ||
|
|
ede76f74e8 | ||
|
|
f28d120688 | ||
|
|
425a1edf01 | ||
|
|
d9d1e0fecc | ||
|
|
cb9e94ce5e | ||
|
|
16df953a86 | ||
|
|
af0c26294d | ||
|
|
a3aad61ac8 | ||
|
|
485b110613 | ||
|
|
15fcfdcc2b | ||
|
|
fc94e4aedd | ||
|
|
f54eae0cec | ||
|
|
2d0b79878b | ||
|
|
ae75aedff9 | ||
|
|
00deb3f825 | ||
|
|
76a10ec726 | ||
|
|
87adf2aca5 | ||
|
|
b6f188389d | ||
|
|
f61f344f60 | ||
|
|
2a214530f6 | ||
|
|
05656669ca | ||
|
|
0e74f11615 | ||
|
|
3559553484 | ||
|
|
9faa8307ee | ||
|
|
5905fd6db8 | ||
|
|
ddd35b4731 | ||
|
|
5af8ca335c | ||
|
|
cd029d43c1 | ||
|
|
1a6c8f8af9 | ||
|
|
f1b96c8af9 |
@@ -234,6 +234,13 @@
|
||||
<version>1.1.24</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>2.3.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.xboe;
|
||||
|
||||
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class XxlJobConfig {
|
||||
|
||||
@Value("${xxl.job.admin.addresses}")
|
||||
private String adminAddresses;
|
||||
@Value("${xxl.job.executor.appname}")
|
||||
private String appName;
|
||||
@Value("${xxl.job.executor.ip}")
|
||||
private String ip;
|
||||
@Value("${xxl.job.executor.port}")
|
||||
private int port;
|
||||
@Value("${xxl.job.accessToken}")
|
||||
private String accessToken;
|
||||
@Value("${xxl.job.executor.logpath}")
|
||||
private String logPath;
|
||||
@Value("${xxl.job.executor.logretentiondays}")
|
||||
private int logRetentionDays;
|
||||
|
||||
@Bean
|
||||
public XxlJobSpringExecutor xxlJobExecutor() {
|
||||
// 创建 XxlJobSpringExecutor 执行器
|
||||
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
|
||||
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
|
||||
xxlJobSpringExecutor.setAppname(appName);
|
||||
xxlJobSpringExecutor.setIp(ip);
|
||||
xxlJobSpringExecutor.setPort(port);
|
||||
xxlJobSpringExecutor.setAccessToken(accessToken);
|
||||
xxlJobSpringExecutor.setLogPath(logPath);
|
||||
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
|
||||
// 返回
|
||||
return xxlJobSpringExecutor;
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,8 @@ import com.xboe.api.vo.*;
|
||||
import com.xboe.common.PageList;
|
||||
import com.xboe.common.Pagination;
|
||||
import com.xboe.core.JsonResponse;
|
||||
import com.xboe.module.course.dto.CourseParam;
|
||||
import com.xboe.module.course.dto.ScoreParam;
|
||||
import com.xboe.module.course.vo.StudyCourseVo;
|
||||
import com.xboe.module.course.vo.TeacherVo;
|
||||
import com.xboe.module.dict.entity.DictDto;
|
||||
@@ -84,6 +86,16 @@ public class ThirdApi {
|
||||
@Resource
|
||||
private UserDynamicApiRemoteClient userDynamicApiRemoteClient;
|
||||
|
||||
@Value("${coursesuilt.updateOrSaveCourse}")
|
||||
private String updateOrSaveCourse;
|
||||
@Value("${coursesuilt.syncCourseStudent}")
|
||||
private String syncCourseStudent;
|
||||
@Value("${coursesuilt.syncOnLineScore}")
|
||||
private String syncOnLineScore;
|
||||
@Value("${coursesuilt.updateOnLineStatus}")
|
||||
private String updateOnLineStatus;
|
||||
|
||||
|
||||
//获取例外人员的id
|
||||
public List<String> getUserId() {
|
||||
CommonSearchVo searcher = new CommonSearchVo();
|
||||
@@ -343,4 +355,31 @@ public class ThirdApi {
|
||||
return basicInfos;
|
||||
|
||||
}
|
||||
|
||||
public void updateOrSaveCourse(CourseParam param, String token){
|
||||
log.info("---------------准备同步在线课到讲师管理完毕 ------- param " + param);
|
||||
String resp = Optional.ofNullable(
|
||||
HttpRequest.post(updateOrSaveCourse).body(JSONUtil.toJsonStr(param)).header("token", token).execute()
|
||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||
log.info("updateOrSaveCourse = " + resp);
|
||||
}
|
||||
public void syncCourseStudent(Long courseId, String token){
|
||||
String resp = Optional.ofNullable(
|
||||
HttpRequest.post(syncCourseStudent).body(JSONUtil.toJsonStr(courseId)).header("token", token).execute()
|
||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||
log.info("syncCourseStudent = " + resp);
|
||||
}
|
||||
|
||||
public void syncOnLineScore(ScoreParam param, String token) {
|
||||
String resp = Optional.ofNullable(
|
||||
HttpRequest.post(syncOnLineScore).body(JSONUtil.toJsonStr(param)).header("token", token).execute()
|
||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||
log.info("syncOnLineScore = " + resp);
|
||||
}
|
||||
public void updateOnLineStatus(CourseParam param, String token){
|
||||
String resp = Optional.ofNullable(
|
||||
HttpRequest.post(updateOnLineStatus).body(JSONUtil.toJsonStr(param)).header("token", token).execute()
|
||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||
log.info("updateOrSaveCourse = " + resp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.xboe.config;
|
||||
|
||||
public class ConditionException extends RuntimeException{
|
||||
private Integer code;
|
||||
private String message;
|
||||
|
||||
|
||||
public ConditionException(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public ConditionException(String message) {
|
||||
this(600, message);
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.xboe.config;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.xboe.common.utils.Sha256Mac;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Jwt工具类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class JwtUtils {
|
||||
|
||||
public static final String secretKey = "JDF_BOE";
|
||||
|
||||
/**
|
||||
* 从数据声明生成令牌
|
||||
*
|
||||
* @param claims 数据声明
|
||||
* @return 令牌
|
||||
*/
|
||||
public static String createToken(Map<String, Object> claims) {
|
||||
JSONObject header = new JSONObject();
|
||||
header.put("alg", "HS256");
|
||||
header.put("type", "token");
|
||||
String payload64 = Base64.encodeBase64String(JSON.toJSONString(claims).getBytes());
|
||||
String header64 = Base64.encodeBase64String(header.toString().getBytes());
|
||||
String sign = Sha256Mac.sha256_mac(header64 + payload64, secretKey);
|
||||
return header64 + "." + payload64 + "." + sign;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从令牌中获取数据声明
|
||||
*
|
||||
* @param token 令牌
|
||||
* @return 数据声明
|
||||
*/
|
||||
public static Map<String, Object> parseToken(String token) throws ConditionException {
|
||||
String[] tokens = token.split("\\.");
|
||||
if (tokens.length != 3) {
|
||||
throw new ConditionException("token不合法 : " + token);
|
||||
}
|
||||
String payload = new String(Base64.decodeBase64(tokens[1]));
|
||||
String sign = Sha256Mac.sha256_mac(tokens[0] + tokens[1], secretKey);
|
||||
if (sign.equals(tokens[2])) {
|
||||
JSONObject jsonObject = JSON.parseObject(payload);
|
||||
long exp = jsonObject.getLong("exp");
|
||||
long now = System.currentTimeMillis() / 1000;
|
||||
if (now > exp) {
|
||||
throw new ConditionException("token过期 : " + token);
|
||||
}
|
||||
Map<String, Object> map = JSON.parseObject(payload, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
return map;
|
||||
} else {
|
||||
throw new ConditionException("token错误 : " + token);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,6 +22,8 @@ public interface CacheName {
|
||||
*/
|
||||
String NAME_USER = "user";
|
||||
|
||||
String NAME_INFO = "userInfo";
|
||||
|
||||
/**
|
||||
* 用户名缓存KEY前缀
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.xboe.module.boecase.api;
|
||||
|
||||
import com.xboe.module.boecase.service.ICasesService;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -16,6 +17,7 @@ public class CaseScheduledTasks {
|
||||
* 每月的第一天的1:00执行
|
||||
*/
|
||||
// @Scheduled(cron = "0 0 1 1 * ?")
|
||||
@XxlJob("refreshViewsRankOfMajor")
|
||||
public void refreshViewsRankOfMajor() {
|
||||
casesService.refreshViewsRankOfMajor();
|
||||
}
|
||||
@@ -23,7 +25,8 @@ public class CaseScheduledTasks {
|
||||
/**
|
||||
* 季初第一天两点执行,cron表达式设置为每个季度的第一个月的第一天的特定时间。每个季度的第一个月是1月、4月、7月和10月:
|
||||
*/
|
||||
@Scheduled(cron = "0 0 2 1 1,4,7,10 ?")
|
||||
// @Scheduled(cron = "0 0 2 1 1,4,7,10 ?")
|
||||
@XxlJob("refreshLastQuarterStatistics")
|
||||
public void refreshLastQuarterStatistics() {
|
||||
casesService.refreshLastQuarterStatistics();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,10 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.xboe.api.ThirdApi;
|
||||
import com.xboe.module.course.dto.CourseParam;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -55,7 +58,10 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
|
||||
@Resource
|
||||
private ICourseContentService ccontentService;
|
||||
|
||||
@Resource
|
||||
private ThirdApi thirdApi;
|
||||
|
||||
|
||||
/**
|
||||
* 教师需要审核的课程
|
||||
* @param pager
|
||||
@@ -315,7 +321,7 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/hrbp-submit-audit")
|
||||
public JsonResponse<Boolean> hrbpAudit(String auditId,String courseId,String title,Boolean pass,String remark){
|
||||
public JsonResponse<Boolean> hrbpAudit(String auditId,String courseId,String title,Boolean pass,String remark, HttpServletRequest request){
|
||||
if(StringUtils.isBlank(auditId)){
|
||||
return badRequest("参数错误");
|
||||
}
|
||||
@@ -347,6 +353,14 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
try {
|
||||
CurrentUser cu=getCurrent();
|
||||
service.hrbpSubmitAudit(auditId, courseId,open, pass,cu.getAccountId(),cu.getName(), remark);
|
||||
|
||||
if (pass){
|
||||
//修改在线课开课状态=已开课
|
||||
String token = request.getHeader("Xboe-Access-Token");
|
||||
CourseParam param = new CourseParam();
|
||||
param.setId(courseId);
|
||||
thirdApi.updateOnLineStatus(param,token);
|
||||
}
|
||||
return success(true);
|
||||
} catch (Exception e) {
|
||||
log.error("HRBP审核提交处理错误",e);
|
||||
@@ -378,7 +392,8 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
*/
|
||||
@PostMapping("/submit-publish")
|
||||
@AutoLog(module = "课程",action = "默认管理员提交发布",info = "")
|
||||
public JsonResponse<Boolean> submitAndPublish(@RequestBody CourseFullDto dto){
|
||||
public JsonResponse<Boolean> submitAndPublish(@RequestBody CourseFullDto dto, HttpServletRequest request){
|
||||
log.info("---------------提交并直接发布,用于默认管理直接操作 -------");
|
||||
if(dto.getCourse()==null){
|
||||
return badRequest("无课程信息");
|
||||
}
|
||||
@@ -402,12 +417,22 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
if(StringUtils.isBlank(dto.getCourse().getOrgId())) {
|
||||
return badRequest("请选择资源归属");
|
||||
}
|
||||
String token = request.getHeader("Xboe-Access-Token");
|
||||
|
||||
CurrentUser cuser=getCurrent();
|
||||
dto.getCourse().setStatus(Course.STATUS_AUDIT_FINISH);//设置为审核通过状态
|
||||
dto.getCourse().setEnabled(true);//设置启用状态问题
|
||||
dto.getCourse().setPublished(false);//重新提交审核设置为未发布状态
|
||||
try {
|
||||
|
||||
courseService.submitAndPublish(dto,cuser.getAccountId(),cuser.getName());
|
||||
log.info("---------------在线课开始同步到讲师管理 ------- token = " + token);
|
||||
CourseParam param = new CourseParam();
|
||||
param.setId(dto.getCourse().getId());
|
||||
param.setOrgId(dto.getCourse().getOrgId());
|
||||
param.setOrgName(dto.getCourse().getOrgName());
|
||||
thirdApi.updateOrSaveCourse(param,token);
|
||||
log.info("---------------在线课同步到讲师管理完毕 -------");
|
||||
return success(true);
|
||||
} catch (Exception e) {
|
||||
log.error("默认管理员提交直接发布处理失败",e);
|
||||
|
||||
@@ -285,9 +285,9 @@ public class CourseFullTextApi extends ApiBaseController{
|
||||
paras.setTypes(dto.getTypes());//多个分类的情况
|
||||
//用户的companyId
|
||||
paras.setCompanyId(dto.getCompanyId());
|
||||
if(StringUtils.isNotBlank(dto.getAudiences())) {
|
||||
paras.setAudiences(dto.getAudiences().split(","));
|
||||
}
|
||||
// if(StringUtils.isNotBlank(dto.getAudiences())) {
|
||||
// paras.setAudiences(dto.getAudiences().split(","));
|
||||
// }
|
||||
if(StringUtils.isNotBlank(userIds)) {
|
||||
paras.setSysCreateAids(userIds.split(","));
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.xboe.api.ThirdApi;
|
||||
import com.xboe.module.course.dto.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -26,11 +28,6 @@ import com.xboe.data.dto.UserOrgIds;
|
||||
import com.xboe.data.outside.IOutSideDataService;
|
||||
import com.xboe.data.service.IDataUserSyncService;
|
||||
import com.xboe.module.assistance.service.IEmailService;
|
||||
import com.xboe.module.course.dto.CourseExportDto;
|
||||
import com.xboe.module.course.dto.CourseFullDto;
|
||||
import com.xboe.module.course.dto.CourseQueryDto;
|
||||
import com.xboe.module.course.dto.CourseTeacherAndCourse;
|
||||
import com.xboe.module.course.dto.CourseTeacherExportDto;
|
||||
import com.xboe.module.course.entity.Course;
|
||||
import com.xboe.module.course.entity.CourseContent;
|
||||
import com.xboe.module.course.entity.CourseCrowd;
|
||||
@@ -100,7 +97,8 @@ public class CourseManageApi extends ApiBaseController{
|
||||
|
||||
@Autowired
|
||||
IDataUserSyncService userSyncService;
|
||||
|
||||
@Resource
|
||||
private ThirdApi thirdApi;
|
||||
|
||||
// @PostMapping("/test")
|
||||
// public JsonResponse<PageList<Course>> findTest(Pagination pager,CourseQueryDto dto){
|
||||
@@ -271,7 +269,7 @@ public class CourseManageApi extends ApiBaseController{
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@AutoLog(module = "课程",action = "保存课程基本信息",info = "")
|
||||
public JsonResponse<CourseFullDto> saveCourseFull(@RequestBody CourseFullDto dto){
|
||||
public JsonResponse<CourseFullDto> saveCourseFull(@RequestBody CourseFullDto dto, HttpServletRequest request){
|
||||
if(dto.getCourse()==null){
|
||||
return badRequest("无课程信息");
|
||||
}
|
||||
@@ -302,7 +300,14 @@ public class CourseManageApi extends ApiBaseController{
|
||||
dto.getCourse().setStatus(Course.STATUS_NONE);
|
||||
courseService.update(dto);
|
||||
}
|
||||
|
||||
String token = request.getHeader("Xboe-Access-Token");
|
||||
log.info("---------------在线课开始同步到讲师管理 ------- token = " + token);
|
||||
CourseParam param = new CourseParam();
|
||||
param.setId(dto.getCourse().getId());
|
||||
param.setOrgId(dto.getCourse().getOrgId());
|
||||
param.setOrgName(dto.getCourse().getOrgName());
|
||||
thirdApi.updateOrSaveCourse(param,token);
|
||||
log.info("---------------在线课同步到讲师管理完毕 -------");
|
||||
return success(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("整体保存课程信息错误",e);
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
package com.xboe.module.course.api;
|
||||
|
||||
import java.util.Base64;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.xboe.constants.CacheName;
|
||||
import com.xboe.data.outside.IOutSideDataService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -33,13 +37,18 @@ import com.xboe.module.course.service.ICourseFileService;
|
||||
public class CourseWareApi extends ApiBaseController {
|
||||
|
||||
private String cookieName = "PLAYSIGN_TIME";
|
||||
|
||||
@Autowired
|
||||
IOutSideDataService outsideDataService;
|
||||
@Resource
|
||||
private ICourseFileService courseFileService;
|
||||
|
||||
@Resource
|
||||
private XFileUploader fileUploader;
|
||||
|
||||
|
||||
@Resource
|
||||
RedisTemplate<String, Object> redisTemplate;
|
||||
|
||||
private static Set<String> allowUrlSet = new HashSet<String>();
|
||||
|
||||
static {
|
||||
@@ -50,7 +59,7 @@ public class CourseWareApi extends ApiBaseController {
|
||||
|
||||
/**
|
||||
* 资源地址的加密,返回加密后的地址
|
||||
*
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param cfid 资源地址的id
|
||||
@@ -85,25 +94,22 @@ public class CourseWareApi extends ApiBaseController {
|
||||
|
||||
/**
|
||||
* 获取资源,在header中保存
|
||||
*
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param cfid
|
||||
* @param cf
|
||||
* @throws Exception
|
||||
*/
|
||||
@GetMapping("/resource")
|
||||
public JsonResponse<String> getVideo(HttpServletRequest request, HttpServletResponse response, String sign) throws Exception {
|
||||
public JsonResponse<String> getVideo(HttpServletRequest request, HttpServletResponse response, String sign,
|
||||
@CookieValue(name = "token",required = false)String token
|
||||
) throws Exception {
|
||||
|
||||
if (StringUtils.isBlank(sign)) {
|
||||
return badRequest("非法请求");
|
||||
// return;
|
||||
}
|
||||
|
||||
String httpReferer = request.getHeader("referer");
|
||||
if (StringUtils.isBlank(httpReferer)) {
|
||||
return badRequest("非法请求");
|
||||
// return "非法请求";
|
||||
}
|
||||
|
||||
boolean has=false;
|
||||
@@ -115,21 +121,37 @@ public class CourseWareApi extends ApiBaseController {
|
||||
|
||||
if(!has) {
|
||||
return badRequest("页面不存在");
|
||||
//return "非法请求";
|
||||
}
|
||||
|
||||
//读取cookies中的时间
|
||||
String cookieTime = getSignTimeCookie(request);
|
||||
if (StringUtils.isBlank(cookieTime)) {
|
||||
return badRequest("不支持的请求");
|
||||
// return;
|
||||
// String token = request.getHeader("Xboe-Access-Token");
|
||||
// if (StringUtils.isEmpty(token)) {
|
||||
// token = request.getHeader("token");
|
||||
// }
|
||||
// 读取cookies中的时间
|
||||
// String cookieTime = getSignTimeCookie(request);
|
||||
// if (StringUtils.isBlank(cookieTime)) {
|
||||
// return badRequest("不支持的请求");
|
||||
// }
|
||||
String userInfo = CacheName.NAME_INFO + ":"+ token;
|
||||
log.info("请求头里的token值::"+token);
|
||||
log.info("从 Redis 获取的userInfo:"+userInfo);
|
||||
Object o = redisTemplate.opsForValue().get(userInfo);
|
||||
if (o == null) {
|
||||
log.error("从 Redis 获取的值为 null ,", userInfo);
|
||||
return badRequest("token验证错误");
|
||||
}
|
||||
|
||||
// 将对象转换为字符串
|
||||
String userNoStr = o.toString();
|
||||
// 检查字符串是否为空或空白
|
||||
if (StringUtils.isBlank(userNoStr)) {
|
||||
log.error("从 Redis 获取的值为空或空白,", userInfo);
|
||||
return badRequest("token验证错误");
|
||||
}
|
||||
HashMap bean = JSONUtil.toBean(userNoStr, HashMap.class);
|
||||
Object userNo = bean.get("userNo");
|
||||
byte[] signBytes = Base64.getDecoder().decode(sign);
|
||||
// byte[] signBytes = RSAUtil.decryptBase64(sign);
|
||||
byte[] signDecryt = RSAUtil.decryptByPrivateKey(ConfigSecretKey.TEMP_PRIVATESTR, signBytes);
|
||||
String signStr = new String(signDecryt);
|
||||
// System.out.println("解密后的字符串:"+signStr);
|
||||
// 第一个/前端是时间
|
||||
int index = signStr.indexOf("/");
|
||||
if (index <= 0) {
|
||||
@@ -139,8 +161,15 @@ public class CourseWareApi extends ApiBaseController {
|
||||
}
|
||||
|
||||
String time = signStr.substring(0, signStr.indexOf("/"));// 时间字符中,long
|
||||
String[] split = signStr.split("/");
|
||||
String cfid = signStr.substring(index+1);// 文件路径
|
||||
log.info("解密后的字符串:"+signStr);
|
||||
|
||||
log.info("workNum工号对比:"+split[2]);
|
||||
log.info("userNo工号对比:"+userNo);
|
||||
if (!split[2].equals(userNo)){
|
||||
return badRequest("token验证失效");
|
||||
}
|
||||
// if (!time.equals(cookieTime)) {
|
||||
// log.info("请求头时间和解析后的时间对比:"+"解析时间:"+time+" 请求头时间:"+cookieTime);
|
||||
// log.info("解密后的字符串的时间拼接:"+signStr);
|
||||
@@ -172,7 +201,7 @@ public class CourseWareApi extends ApiBaseController {
|
||||
|
||||
/**
|
||||
* 读取cookies值
|
||||
*
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -10,6 +10,8 @@ import com.xboe.core.orm.BaseDao;
|
||||
import com.xboe.core.orm.IFieldFilter;
|
||||
import com.xboe.module.course.entity.CourseFile;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
|
||||
@Repository
|
||||
public class CourseFileDao extends BaseDao<CourseFile> {
|
||||
@@ -21,4 +23,5 @@ public class CourseFileDao extends BaseDao<CourseFile> {
|
||||
PageList<CourseFile> page = this.getGenericDao().findPage(pageIndex, pageSize, getEntityClass(), filters,order);
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.xboe.module.course.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CourseParam {
|
||||
private String id;
|
||||
private String orgId;
|
||||
private String orgName;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.xboe.module.course.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ScoreParam {
|
||||
private Long courseId;
|
||||
private Float score;
|
||||
}
|
||||
@@ -54,4 +54,6 @@ public interface ICourseFileService {
|
||||
* @param deleted
|
||||
*/
|
||||
void delete(String id,boolean deleted);
|
||||
|
||||
// void updateDuration(String contentRefId, Integer duration);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.xboe.common.OrderCondition;
|
||||
import com.xboe.common.PageList;
|
||||
import com.xboe.core.cache.IXaskCache;
|
||||
import com.xboe.core.cache.XaskCacheProvider;
|
||||
import com.xboe.core.orm.FieldFilters;
|
||||
@@ -14,11 +15,9 @@ import com.xboe.core.orm.UpdateBuilder;
|
||||
import com.xboe.module.course.dao.*;
|
||||
import com.xboe.module.course.dto.CourseContentDto;
|
||||
import com.xboe.module.course.dto.SortItem;
|
||||
import com.xboe.module.course.entity.CourseAssess;
|
||||
import com.xboe.module.course.entity.CourseContent;
|
||||
import com.xboe.module.course.entity.CourseExam;
|
||||
import com.xboe.module.course.entity.CourseHomeWork;
|
||||
import com.xboe.module.course.entity.*;
|
||||
import com.xboe.module.course.service.ICourseContentService;
|
||||
import com.xboe.module.course.service.ICourseFileService;
|
||||
import com.xboe.module.exam.dao.ExamPaperDao;
|
||||
import com.xboe.module.exam.vo.TestQuestionVo;
|
||||
import com.xboe.standard.enums.BoedxContentType;
|
||||
@@ -57,7 +56,8 @@ public class CourseContentServiceImpl implements ICourseContentService {
|
||||
|
||||
@Resource
|
||||
private ExamPaperDao examPaperDao;
|
||||
|
||||
@Resource
|
||||
private ICourseFileService courseFileService;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@@ -83,6 +83,7 @@ public class CourseContentServiceImpl implements ICourseContentService {
|
||||
ccDao.save(cc);
|
||||
}else {
|
||||
ccDao.update(cc);
|
||||
// courseFileService.updateDuration(cc.getContentRefId(),cc.getDuration());
|
||||
cc.setSysVersion(ccDao.getVersion(cc.getId()));
|
||||
}
|
||||
//添加或保存其它信息
|
||||
|
||||
@@ -98,4 +98,14 @@ public class CourseFileServiceImpl implements ICourseFileService {
|
||||
public CourseFile get(String id) {
|
||||
return courseFileDao.get(id);
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// public void updateDuration(String contentRefId,Integer duration) {
|
||||
// if (duration == null) {
|
||||
// duration = 0;
|
||||
// }
|
||||
// String sql = "UPDATE boe_course_file SET duration = "+ duration+" WHERE id = "+ contentRefId+" ";
|
||||
// courseFileDao.sqlUpdate(sql);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ public class CourseServiceImpl implements ICourseService {
|
||||
String sql = "SELECT DISTINCT\n" +
|
||||
"rt.course_id\n" +
|
||||
"FROM\n" +
|
||||
"boe_new.student s INNER JOIN boe_new.router_task rt on s.pid=rt.router_id inner join boe_course c on c.id=rt.course_id\n" +
|
||||
"boe.student s INNER JOIN boe.router_task rt on s.pid=rt.router_id inner join boe_course c on c.id=rt.course_id\n" +
|
||||
"\n" +
|
||||
"WHERE\n" +
|
||||
"\n" +
|
||||
@@ -503,7 +503,7 @@ public class CourseServiceImpl implements ICourseService {
|
||||
String sql = "SELECT DISTINCT\n" +
|
||||
"pt.course_id\n" +
|
||||
"FROM\n" +
|
||||
"boe_new.student s INNER JOIN boe_new.project_task pt on s.pid=pt.project_id inner join boe_course c on c.id=pt.course_id\n" +
|
||||
"boe.student s INNER JOIN boe.project_task pt on s.pid=pt.project_id inner join boe_course c on c.id=pt.course_id\n" +
|
||||
"\n" +
|
||||
"WHERE\n" +
|
||||
"\n" +
|
||||
@@ -560,8 +560,8 @@ public class CourseServiceImpl implements ICourseService {
|
||||
String sql = "SELECT DISTINCT\n" +
|
||||
"\tc.id \n" +
|
||||
"FROM\n" +
|
||||
"\tboe_new.student s\n" +
|
||||
"\tINNER JOIN boe_new.grow_task gt ON s.pid = gt.grow_id\n" +
|
||||
"\tboe.student s\n" +
|
||||
"\tINNER JOIN boe.grow_task gt ON s.pid = gt.grow_id\n" +
|
||||
"\tINNER JOIN boe_course c ON gt.course_id = c.id \n" +
|
||||
"WHERE\n" +
|
||||
"\ts.type = 14 \n" +
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.xboe.module.interaction.api;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.xboe.api.ThirdApi;
|
||||
import com.xboe.module.course.dto.ScoreParam;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -25,18 +28,27 @@ public class CourseGradeApi extends ApiBaseController {
|
||||
|
||||
@Resource
|
||||
private ICourseGradeService service;
|
||||
@Resource
|
||||
private ThirdApi thirdApi;
|
||||
|
||||
/**
|
||||
* 评分
|
||||
* */
|
||||
@PostMapping("/grade")
|
||||
@AutoLog(module = "评分",action = "评分")
|
||||
public JsonResponse<Float> grade(String courseId,Float score,String studyId){
|
||||
public JsonResponse<Float> grade(String courseId,Float score,String studyId, HttpServletRequest request){
|
||||
CourseGrade courseGrade = new CourseGrade();
|
||||
courseGrade.setCourseId(courseId);
|
||||
courseGrade.setScores(score);
|
||||
courseGrade.setStudyId(studyId);
|
||||
try {
|
||||
Float aFloat = service.save(courseGrade);
|
||||
String token = request.getHeader("Xboe-Access-Token");
|
||||
ScoreParam param = new ScoreParam();
|
||||
param.setCourseId(Long.parseLong(courseId));
|
||||
param.setScore(score);
|
||||
// 同步在线课评分
|
||||
// thirdApi.syncOnLineScore(param,token);
|
||||
return success(aFloat);
|
||||
}catch(Exception e) {
|
||||
log.error("评分保存错误",e);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.xboe.module.teacher.entity;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
@@ -153,7 +155,7 @@ public class Teacher extends BaseEntity {
|
||||
*/
|
||||
@Column(name = "courses")
|
||||
private String courses;
|
||||
|
||||
|
||||
/**
|
||||
* 发薪地id
|
||||
*/
|
||||
@@ -206,4 +208,56 @@ public class Teacher extends BaseEntity {
|
||||
@Column(name = "expertise")
|
||||
private String expertise;
|
||||
|
||||
@Column(name = "user_no",length = 1)
|
||||
private String userNo;
|
||||
|
||||
// @ApiModelProperty(value = "讲师类型 1 内部讲师 2外部讲师")
|
||||
@Column(name = "teacher_type")
|
||||
private Integer teacherType;
|
||||
|
||||
// @ApiModelProperty(value = "默认授课时长(分钟)")
|
||||
@Column(name = "default_teaching_time")
|
||||
private Integer defaultTeachingTime;
|
||||
|
||||
// @ApiModelProperty(value = "认证人")
|
||||
@Column(name = "certify_by")
|
||||
private String certifyBy;
|
||||
|
||||
// @ApiModelProperty(value = "认证时间")
|
||||
@Column(name = "certify_at")
|
||||
private LocalDateTime certifyAt;
|
||||
|
||||
// @ApiModelProperty(value = "认证资料路径")
|
||||
@Column(name = "certification")
|
||||
private String certification;
|
||||
|
||||
// @ApiModelProperty(value = "认证资料路径名称")
|
||||
@Column(name = "certification_name")
|
||||
private String certificationName;
|
||||
|
||||
// @ApiModelProperty(value = "供应商")
|
||||
@Column(name = "supplier")
|
||||
private String supplier;
|
||||
|
||||
|
||||
// @ApiModelProperty(value = "教师专长名称 逗号分割")
|
||||
@Column(name = "expertise_names")
|
||||
private String expertiseNames;
|
||||
|
||||
// @ApiModelProperty(value = "标识 0:自动录入/1:手动录入")
|
||||
@Column(name = "create_from")
|
||||
private Integer createFrom;
|
||||
|
||||
// @ApiModelProperty(value = "组织id")
|
||||
@Column(name = "org_id")
|
||||
private Long orgId;
|
||||
|
||||
// @ApiModelProperty(value = "组织名称")
|
||||
@Column(name = "org_name")
|
||||
private String orgName;
|
||||
|
||||
// @ApiModelProperty(value = "旧系统kid字段")
|
||||
@Column(name = "kid")
|
||||
private String kid;
|
||||
|
||||
}
|
||||
|
||||
@@ -102,9 +102,12 @@ public class TeacherServiceImpl implements ITeacherService {
|
||||
public List<Teacher> findByName(String name) {
|
||||
String hql="Select t.id,t.name,u.userNo from "+Teacher.class.getSimpleName()+" t,"+User.class.getSimpleName()+" u ";
|
||||
hql+=" where t.id=u.id and (t.name like '%"+name+"%' or u.userNo=?1)";
|
||||
// String hql="Select t.id,t.name,t.userNo from "+Teacher.class.getSimpleName()+" t";
|
||||
// hql+=" where t.deleted =0 and t.status =1 and (t.name like '%"+name+"%' or t.userNo like '%"+name+"%' )";
|
||||
|
||||
List<Teacher> teachers=new ArrayList<Teacher>();
|
||||
try {
|
||||
List<Object[]> list =dao.findListFields(hql,name);
|
||||
List<Object[]> list =dao.findListFields(hql);
|
||||
for(Object[] objs :list) {
|
||||
Teacher t=new Teacher();
|
||||
t.setId((String)objs[0]);
|
||||
|
||||
@@ -0,0 +1,260 @@
|
||||
package com.xboe.school.study.api;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xboe.module.course.dto.CourseStudyDto;
|
||||
import com.xboe.school.study.dao.PhpOnlineCourseDao;
|
||||
import com.xboe.school.study.dto.PhpOnlineDto;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.elasticsearch.action.bulk.BulkRequest;
|
||||
import org.elasticsearch.action.bulk.BulkResponse;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.update.UpdateRequest;
|
||||
import org.elasticsearch.client.RequestOptions;
|
||||
import org.elasticsearch.client.RestHighLevelClient;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.query.BoolQueryBuilder;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.search.SearchHit;
|
||||
import org.elasticsearch.search.SearchHits;
|
||||
import org.elasticsearch.search.builder.SearchSourceBuilder;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class PhpOnlineStudyRecordScheduledTasks {
|
||||
|
||||
@Resource
|
||||
private PhpOnlineCourseDao phpOnlineCourseDao;
|
||||
|
||||
@Resource
|
||||
RestHighLevelClient restHighLevelClient;
|
||||
|
||||
/**
|
||||
* 定时同步PHP数据库数据到es中,计划定时20分钟执行一次。具体实现是,
|
||||
* 第一步,查询最近半小时内完成任一课件的课程学习,获取的信息有课程ID,学员ID,学习状态、学习进度。
|
||||
* 第二步,根据上述得到的课程ID,学员ID,查询es中的未完成的记录。
|
||||
* 第三步,比对两者学习进度,如果不一致,以数据库学习记录为准,修改ES
|
||||
*/
|
||||
@XxlJob("phpOnlineStudyRecordSyncEsTask")
|
||||
public List<String> phpOnlineStudyRecordSyncEs(Long syncTimePointOfBegin, Long syncTimePointOfEnd, Integer isOnlyRead) throws IOException {
|
||||
|
||||
log.info("开始同步PHP学习记录到ES");
|
||||
// 增量获取PHP中所有已完成的课程
|
||||
if (syncTimePointOfBegin == null || syncTimePointOfEnd == null) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
LocalDateTime halfAnHourAgo = now.minusMinutes(30);
|
||||
syncTimePointOfBegin = halfAnHourAgo.atZone(ZoneId.systemDefault()).toInstant().getEpochSecond();
|
||||
syncTimePointOfEnd = now.atZone(ZoneId.systemDefault()).toInstant().getEpochSecond();
|
||||
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
log.info("同步时间起点:{}", formatter.format(halfAnHourAgo));
|
||||
log.info("同步时间终点:{}", formatter.format(now));
|
||||
}
|
||||
|
||||
int pageSize = 1000;
|
||||
int totalRecordsCount = phpOnlineCourseDao.selectRecentLearnRecordListOfCount(syncTimePointOfBegin, syncTimePointOfEnd); // 总记录数
|
||||
|
||||
int totalPages = (int) Math.ceil((double) totalRecordsCount / pageSize);
|
||||
|
||||
ArrayList<String> tempResultList = new ArrayList<>();
|
||||
|
||||
for (int pageNumber = 1; pageNumber <= totalPages; pageNumber++) {
|
||||
int offset = (pageNumber - 1) * pageSize;
|
||||
List<PhpOnlineDto> pageData = phpOnlineCourseDao.selectRecentLearnRecordList(syncTimePointOfBegin, syncTimePointOfEnd, offset, pageSize);
|
||||
ArrayList<String> singleResultList = esDataHandle(isOnlyRead, pageData);
|
||||
tempResultList.addAll(singleResultList);
|
||||
}
|
||||
|
||||
return tempResultList;
|
||||
}
|
||||
|
||||
|
||||
private ArrayList<String> esDataHandle(Integer isOnlyRead, List<PhpOnlineDto> recentLearnRecordList) throws IOException {
|
||||
ArrayList<String> tempResultList = new ArrayList<>();
|
||||
// 将数据分批,每批50条
|
||||
int batchSize = 50;
|
||||
int totalSize = recentLearnRecordList.size();
|
||||
List<List<PhpOnlineDto>> batches = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < totalSize; i += batchSize) {
|
||||
int end = Math.min(i + batchSize, totalSize);
|
||||
batches.add(recentLearnRecordList.subList(i, end));
|
||||
}
|
||||
|
||||
for (List<PhpOnlineDto> batch : batches) {
|
||||
// 构建映射关系
|
||||
Map<String, PhpOnlineDto> map = batch.stream()
|
||||
.collect(Collectors.toMap(
|
||||
phpOnlineDto -> phpOnlineDto.getUserIdOfJava() + "-" + phpOnlineDto.getCourseId(),
|
||||
phpOnlineDto -> phpOnlineDto
|
||||
));
|
||||
|
||||
// 获取ES中的数据
|
||||
List<CourseStudyDto> esDataList = getEsData(batch);
|
||||
|
||||
if (CollUtil.isEmpty(esDataList)){
|
||||
continue;
|
||||
}
|
||||
|
||||
// 更新ES数据
|
||||
List<CourseStudyDto> toBeUpdatedEs = esDataList.stream()
|
||||
.map(esDataItem -> {
|
||||
String key = esDataItem.getAccountId() + "-" + esDataItem.getCourseId();
|
||||
PhpOnlineDto phpOnlineDto = map.get(key);
|
||||
|
||||
// 如果找到相应的 PhpOnlineDto 且进度有变化,则进行更新
|
||||
if (phpOnlineDto != null && !esDataItem.getProgress().equals(phpOnlineDto.getProgress())) {
|
||||
esDataItem.setProgress(phpOnlineDto.getProgress());
|
||||
if (phpOnlineDto.getProgress() == 100) {
|
||||
esDataItem.setStatus(9); // 完成
|
||||
} else {
|
||||
esDataItem.setStatus(2); // 进行中
|
||||
}
|
||||
return esDataItem;
|
||||
}
|
||||
return null; // 返回 null 表示不需要更新
|
||||
})
|
||||
.filter(Objects::nonNull) // 去掉返回为 null 的项
|
||||
.collect(Collectors.toList());
|
||||
|
||||
tempResultList.addAll(toBeUpdatedEs.stream().map(esDataItem -> esDataItem.getId()).collect(Collectors.toList()));
|
||||
|
||||
if (isOnlyRead != null && isOnlyRead == 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 调用批量更新方法
|
||||
toBeUpdatedEs(toBeUpdatedEs);
|
||||
}
|
||||
return tempResultList;
|
||||
}
|
||||
|
||||
private List<CourseStudyDto> getEsData(List<PhpOnlineDto> finishedCourseList) throws IOException {
|
||||
log.info("待处理的数据:{}", finishedCourseList);
|
||||
SearchRequest searchRequest = new SearchRequest("new_study_resource");
|
||||
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
|
||||
|
||||
for (PhpOnlineDto phpOnlineDto : finishedCourseList) {
|
||||
if (StringUtils.isBlank(phpOnlineDto.getUserIdOfJava()) || StringUtils.isBlank(phpOnlineDto.getCourseId())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
boolQuery.should(QueryBuilders.boolQuery()
|
||||
.must(QueryBuilders.termQuery("courseId.keyword", phpOnlineDto.getCourseId()))
|
||||
.must(QueryBuilders.termQuery("accountId.keyword", phpOnlineDto.getUserIdOfJava()))
|
||||
.mustNot(QueryBuilders.termQuery("status", 9))
|
||||
);
|
||||
}
|
||||
|
||||
if (!boolQuery.hasClauses()) {
|
||||
return null;
|
||||
}
|
||||
SearchSourceBuilder sourceBuilder = new SearchSourceBuilder()
|
||||
.query(boolQuery)
|
||||
.timeout(new TimeValue(60, TimeUnit.SECONDS))
|
||||
.size(finishedCourseList.size() + 10);
|
||||
searchRequest.source(sourceBuilder);
|
||||
|
||||
SearchResponse response = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT);
|
||||
SearchHits hits = response.getHits();
|
||||
|
||||
List<CourseStudyDto> courseStudyDtoList = new ArrayList<>();
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
for (SearchHit hit : hits) {
|
||||
String sourceAsString = hit.getSourceAsString();
|
||||
try {
|
||||
CourseStudyDto cft = mapper.readValue(sourceAsString, CourseStudyDto.class);
|
||||
courseStudyDtoList.add(cft);
|
||||
} catch (Exception e) {
|
||||
log.error("转化json到对应失败", sourceAsString);
|
||||
}
|
||||
}
|
||||
return courseStudyDtoList;
|
||||
}
|
||||
|
||||
private void toBeUpdatedEs(List<CourseStudyDto> toBeUpdatedEsData) {
|
||||
if (CollUtil.isEmpty(toBeUpdatedEsData)) {
|
||||
return;
|
||||
}
|
||||
BulkRequest bulkRequest = new BulkRequest();
|
||||
for (CourseStudyDto courseStudyDto : toBeUpdatedEsData) {
|
||||
Map<String, Object> docMap = new HashMap<>();
|
||||
docMap.put("status", courseStudyDto.getStatus());
|
||||
docMap.put("progress", courseStudyDto.getProgress());
|
||||
|
||||
// 创建更新请求,并传入单一的docMap
|
||||
UpdateRequest updateRequest = new UpdateRequest("new_study_resource", courseStudyDto.getId())
|
||||
.doc(docMap, XContentType.JSON);
|
||||
|
||||
// 将请求添加到批量请求中
|
||||
bulkRequest.add(updateRequest);
|
||||
}
|
||||
|
||||
try {
|
||||
// 执行批量更新操作
|
||||
BulkResponse bulkResponse = restHighLevelClient.bulk(bulkRequest, RequestOptions.DEFAULT);
|
||||
// 检查是否有失败的操作
|
||||
if (bulkResponse.hasFailures()) {
|
||||
log.error("批量更新失败: {}", bulkResponse.buildFailureMessage());
|
||||
} else {
|
||||
List<String> collect = toBeUpdatedEsData.stream().map(CourseStudyDto::getId).collect(Collectors.toList());
|
||||
log.info("批量更新成功,更新的ES ID列表: {}", collect);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("执行批量更新时发生错误", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 第一步,查询最近报名的学习,获取的信息有课程ID,学员ID,学习状态、学习进度。
|
||||
* 第二步,根据上述得到的课程ID,学员ID,查询es中的未完成的记录。
|
||||
* 第三步,比对两者学习进度,如果不一致,以数据库学习记录为准,修改ES。
|
||||
*/
|
||||
public List<String> phpOnlineStudyRecordSyncEsOfFull(Long syncTimePointOfBegin, Long syncTimePointOfEnd, Integer isOnlyRead) throws IOException {
|
||||
|
||||
log.info("开始同步PHP学习记录到ES");
|
||||
// 增量获取PHP中所有已完成的课程
|
||||
if (syncTimePointOfBegin == null || syncTimePointOfEnd == null) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
LocalDateTime halfAnHourAgo = now.minusMinutes(30);
|
||||
syncTimePointOfBegin = halfAnHourAgo.atZone(ZoneId.systemDefault()).toInstant().getEpochSecond();
|
||||
syncTimePointOfEnd = now.atZone(ZoneId.systemDefault()).toInstant().getEpochSecond();
|
||||
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
log.info("同步时间起点:{}", formatter.format(halfAnHourAgo));
|
||||
log.info("同步时间终点:{}", formatter.format(now));
|
||||
}
|
||||
|
||||
int pageSize = 1000;
|
||||
int totalRecordsCount = phpOnlineCourseDao.selectRecentRegRecordListOfCount(syncTimePointOfBegin, syncTimePointOfEnd); // 总记录数
|
||||
|
||||
int totalPages = (int) Math.ceil((double) totalRecordsCount / pageSize);
|
||||
|
||||
ArrayList<String> tempResultList = new ArrayList<>();
|
||||
|
||||
for (int pageNumber = 1; pageNumber <= totalPages; pageNumber++) {
|
||||
int offset = (pageNumber - 1) * pageSize;
|
||||
List<PhpOnlineDto> pageData = phpOnlineCourseDao.selectRecentRegRecordList(syncTimePointOfBegin, syncTimePointOfEnd, offset, pageSize);
|
||||
ArrayList<String> singleResultList = esDataHandle(isOnlyRead, pageData);
|
||||
tempResultList.addAll(singleResultList);
|
||||
}
|
||||
|
||||
return tempResultList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -750,18 +750,26 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
* @param courseId 课程id 用于删除课程报名信息和修改课程学习人数
|
||||
* */
|
||||
@PostMapping("/delete-signup")
|
||||
public JsonResponse<Boolean> deleteSignUp(String id,String courseId,String studentId){
|
||||
public JsonResponse<Boolean> deleteSignUp(String id,String courseId,String studentId, HttpServletRequest request){
|
||||
if(StringUtils.isBlank(id)){
|
||||
return badRequest("参数异常");
|
||||
}
|
||||
//String aid = this.getCurrent().getAccountId();
|
||||
try {
|
||||
service.deleteSignUp(id,courseId,studentId);
|
||||
return success(true);
|
||||
} catch (Exception e) {
|
||||
log.error("删除报名信息失败",e.getMessage());
|
||||
return error("删除失败",e.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
String token = request.getHeader("Xboe-Access-Token");
|
||||
thirdApi.syncCourseStudent(Long.parseLong(courseId),token);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return success(true);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,8 @@ import com.xboe.school.study.service.IStudyCourseService;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* ES的课程检索
|
||||
* @author seastar
|
||||
@@ -39,6 +41,10 @@ public class StudyCourseESApi extends ApiBaseController{
|
||||
|
||||
@Autowired
|
||||
IStudyCourseService service;
|
||||
|
||||
@Resource
|
||||
private PhpOnlineStudyRecordScheduledTasks phpOnlineStudyRecordScheduledTasks;
|
||||
|
||||
|
||||
@RequestMapping(value="/search",method = {RequestMethod.GET,RequestMethod.POST})
|
||||
public JsonResponse<PageList<CourseStudyDto>> search(Pagination page, CourseStudyDto dto){
|
||||
@@ -161,4 +167,26 @@ public class StudyCourseESApi extends ApiBaseController{
|
||||
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param syncTimePointOfBegin
|
||||
* @param syncTimePointOfEnd
|
||||
* @param isOnlyRead
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
@PostMapping("/phpOnlineStudyRecordSyncEs")
|
||||
public JsonResponse<List<String>> phpOnlineStudyRecordSyncEs(Long syncTimePointOfBegin, Long syncTimePointOfEnd, Integer isOnlyRead) throws IOException {
|
||||
List<String> courseStudyDtoList = phpOnlineStudyRecordScheduledTasks.phpOnlineStudyRecordSyncEs(syncTimePointOfBegin, syncTimePointOfEnd, isOnlyRead);
|
||||
return success(courseStudyDtoList);
|
||||
}
|
||||
|
||||
@PostMapping("/phpOnlineStudyRecordSyncEsOfFull")
|
||||
public JsonResponse<List<String>> phpOnlineStudyRecordSyncEsOfFull(Long syncTimePointOfBegin, Long syncTimePointOfEnd, Integer isOnlyRead) throws IOException {
|
||||
List<String> courseStudyDtoList = phpOnlineStudyRecordScheduledTasks.phpOnlineStudyRecordSyncEsOfFull(syncTimePointOfBegin, syncTimePointOfEnd, isOnlyRead);
|
||||
return success(courseStudyDtoList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,280 @@
|
||||
package com.xboe.school.study.dao;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.xboe.core.orm.BaseDao;
|
||||
import com.xboe.school.study.dto.PhpOnlineDto;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Repository
|
||||
@Slf4j
|
||||
public class PhpOnlineCourseDao extends BaseDao<PhpOnlineDto> {
|
||||
|
||||
@Value("${spring.profiles.active}")
|
||||
private String activeProfile;
|
||||
|
||||
public List<PhpOnlineDto> selectRecentLearnRecordList(Long syncTimePointOfBegin, Long syncTimePointOfEnd, Integer offset, Integer limit) {
|
||||
String sql =
|
||||
"SELECT\n" +
|
||||
" elc.kid AS courseId,\n" +
|
||||
" elcr.user_id AS userIdOfPhp,\n" +
|
||||
" ROUND((SUM(CASE WHEN elrc.kid IS NOT NULL THEN 1 ELSE 0 END) / COUNT(1)) * 100, 0) AS progress\n" +
|
||||
"FROM\n" +
|
||||
" elearninglms.eln_ln_course elc\n" +
|
||||
" INNER JOIN elearninglms.eln_ln_course_reg elcr \n" +
|
||||
" ON elc.kid = elcr.course_id\n" +
|
||||
" INNER JOIN (\n" +
|
||||
" SELECT\n" +
|
||||
" user_id,\n" +
|
||||
" course_id \n" +
|
||||
" FROM\n" +
|
||||
" elearninglms.eln_ln_res_complete\n" +
|
||||
" WHERE\n" +
|
||||
" complete_type = '1'\n" +
|
||||
" AND complete_status = '2'\n" +
|
||||
" AND updated_at > ?1 AND updated_at < ?2\n" +
|
||||
" AND is_deleted = 0\n" +
|
||||
" GROUP BY\n" +
|
||||
" user_id,\n" +
|
||||
" course_id\n" +
|
||||
" ) recentFinishStuent \n" +
|
||||
" ON recentFinishStuent.user_id = elcr.user_id \n" +
|
||||
" AND recentFinishStuent.course_id = elcr.course_id\n" +
|
||||
" INNER JOIN elearninglms.eln_ln_mod_res elms \n" +
|
||||
" ON elms.course_id = elcr.course_id\n" +
|
||||
" LEFT JOIN elearninglms.eln_ln_res_complete elrc \n" +
|
||||
" ON elrc.mod_res_id = elms.kid\n" +
|
||||
" AND elrc.user_id = elcr.user_id\n" +
|
||||
" AND elrc.complete_type = '1'\n" +
|
||||
" AND elrc.complete_status = '2'\n" +
|
||||
"WHERE\n" +
|
||||
" elc.is_deleted = 0\n" +
|
||||
" AND elcr.is_deleted = 0\n" +
|
||||
" AND elcr.reg_state = '1'\n" +
|
||||
" AND elms.publish_status = '1'\n" +
|
||||
" AND elms.is_deleted = '0'\n" +
|
||||
"GROUP BY\n" +
|
||||
" elc.kid,\n" +
|
||||
" elcr.user_id\n" +
|
||||
"LIMIT " + offset + "," + limit;
|
||||
|
||||
|
||||
List<Object[]> objectList1 = this.sqlFindList(sql, syncTimePointOfBegin, syncTimePointOfEnd);
|
||||
if (CollUtil.isEmpty(objectList1)) {
|
||||
log.info("没有找到已完成的数据");
|
||||
return null;
|
||||
}
|
||||
|
||||
List<PhpOnlineDto> recentLearnRecordList = new ArrayList<>();
|
||||
for (Object[] objects : objectList1) {
|
||||
String courseId = objects[0].toString();
|
||||
String userIdOfPhp = objects[1].toString();
|
||||
Integer progress = ((BigDecimal) objects[2]).intValue();
|
||||
PhpOnlineDto phpOnlineDto = new PhpOnlineDto();
|
||||
phpOnlineDto.setCourseId(courseId);
|
||||
phpOnlineDto.setUserIdOfPhp(userIdOfPhp);
|
||||
phpOnlineDto.setProgress(progress);
|
||||
recentLearnRecordList.add(phpOnlineDto);
|
||||
}
|
||||
|
||||
// 拼接获取所有新系统用户id,这里不选择与上面的联表查询,有效率问题
|
||||
|
||||
String userBasicDataBase;
|
||||
if (activeProfile.equals("pro")) {
|
||||
userBasicDataBase = "user_basic";
|
||||
} else {
|
||||
userBasicDataBase = "userbasic";
|
||||
}
|
||||
|
||||
List<String> userIdOfPhpList = objectList1.stream().map(objects -> String.valueOf(objects[1])).distinct().collect(Collectors.toList());
|
||||
List<Object[]> objectList2 = this.sqlFindList("select kid,user_id from " + userBasicDataBase + ".user_account where kid in (?1) and deleted=0 and account_status = 0", userIdOfPhpList);
|
||||
|
||||
if (CollUtil.isEmpty(objectList1)) {
|
||||
log.info("新系统用户数据不存在");
|
||||
return null;
|
||||
}
|
||||
|
||||
Map<Object, Object> kidAndUserIdMap = objectList2.stream().collect(Collectors.toMap(object -> object[0], object -> object[1]));
|
||||
|
||||
// 设置新系统用户ID
|
||||
recentLearnRecordList = recentLearnRecordList.stream()
|
||||
.map(phpOnlineDto -> {
|
||||
Object userIdOfJavaObj = kidAndUserIdMap.get(phpOnlineDto.getUserIdOfPhp());
|
||||
if (userIdOfJavaObj != null) {
|
||||
phpOnlineDto.setUserIdOfJava(userIdOfJavaObj.toString());
|
||||
}
|
||||
return phpOnlineDto;
|
||||
})
|
||||
.filter(phpOnlineDto -> StringUtils.isNotBlank(phpOnlineDto.getUserIdOfJava()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
return recentLearnRecordList;
|
||||
}
|
||||
|
||||
|
||||
public int selectRecentLearnRecordListOfCount(Long syncTimePointOfBegin, Long syncTimePointOfEnd) {
|
||||
String sql =
|
||||
"SELECT COUNT(1) \n" +
|
||||
"FROM (\n" +
|
||||
" SELECT elc.kid\n" +
|
||||
" FROM elearninglms.eln_ln_course elc\n" +
|
||||
" INNER JOIN elearninglms.eln_ln_course_reg elcr\n" +
|
||||
" ON elc.kid = elcr.course_id\n" +
|
||||
" INNER JOIN (\n" +
|
||||
" SELECT user_id, course_id\n" +
|
||||
" FROM elearninglms.eln_ln_res_complete\n" +
|
||||
" WHERE complete_type = '1'\n" +
|
||||
" AND complete_status = '2'\n" +
|
||||
" AND updated_at > ?1\n" +
|
||||
" AND updated_at < ?2\n" +
|
||||
" AND is_deleted = 0\n" +
|
||||
" GROUP BY user_id, course_id\n" +
|
||||
" ) recentFinishStuent\n" +
|
||||
" ON recentFinishStuent.user_id = elcr.user_id\n" +
|
||||
" AND recentFinishStuent.course_id = elcr.course_id\n" +
|
||||
" INNER JOIN elearninglms.eln_ln_mod_res elms\n" +
|
||||
" ON elms.course_id = elcr.course_id\n" +
|
||||
" LEFT JOIN elearninglms.eln_ln_res_complete elrc\n" +
|
||||
" ON elrc.mod_res_id = elms.kid\n" +
|
||||
" AND elrc.user_id = elcr.user_id\n" +
|
||||
" AND elrc.complete_type = '1'\n" +
|
||||
" AND elrc.complete_status = '2'\n" +
|
||||
" WHERE elc.is_deleted = 0\n" +
|
||||
" AND elcr.is_deleted = 0\n" +
|
||||
" AND elcr.reg_state = '1'\n" +
|
||||
" AND elms.publish_status = '1'\n" +
|
||||
" AND elms.is_deleted = '0'\n" +
|
||||
" GROUP BY elc.kid, elcr.user_id\n" +
|
||||
") temp;\n"; // 每页 1000 条记录,OFFSET 计算分页
|
||||
|
||||
|
||||
int count = this.sqlCount(sql, syncTimePointOfBegin, syncTimePointOfEnd);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
public List<PhpOnlineDto> selectRecentRegRecordList(Long syncTimePointOfBegin, Long syncTimePointOfEnd, Integer offset, Integer limit) {
|
||||
String sql =
|
||||
"SELECT\n" +
|
||||
" elc.kid AS courseId,\n" +
|
||||
" elcr.user_id AS userIdOfPhp,\n" +
|
||||
" ROUND((SUM(CASE WHEN elrc.kid IS NOT NULL THEN 1 ELSE 0 END) / COUNT(1)) * 100, 0) AS progress\n" +
|
||||
"FROM\n" +
|
||||
" elearninglms.eln_ln_course elc\n" +
|
||||
" INNER JOIN elearninglms.eln_ln_course_reg elcr ON elc.kid = elcr.course_id AND elcr.created_at > ?1 AND elcr.created_at < ?2\n" +
|
||||
" INNER JOIN elearninglms.eln_ln_mod_res elms \n" +
|
||||
" ON elms.course_id = elcr.course_id\n" +
|
||||
" LEFT JOIN elearninglms.eln_ln_res_complete elrc \n" +
|
||||
" ON elrc.mod_res_id = elms.kid\n" +
|
||||
" AND elrc.user_id = elcr.user_id\n" +
|
||||
" AND elrc.complete_type = '1'\n" +
|
||||
" AND elrc.complete_status = '2'\n" +
|
||||
"WHERE\n" +
|
||||
" elc.is_deleted = 0\n" +
|
||||
" AND elcr.is_deleted = 0\n" +
|
||||
" AND elcr.reg_state = '1'\n" +
|
||||
" AND elms.publish_status = '1'\n" +
|
||||
" AND elms.is_deleted = '0'\n" +
|
||||
"GROUP BY\n" +
|
||||
" elc.kid,\n" +
|
||||
" elcr.user_id\n" +
|
||||
"LIMIT " + offset + "," + limit;
|
||||
|
||||
|
||||
List<Object[]> objectList1 = this.sqlFindList(sql, syncTimePointOfBegin, syncTimePointOfEnd);
|
||||
if (CollUtil.isEmpty(objectList1)) {
|
||||
log.info("没有找到已完成的数据");
|
||||
return null;
|
||||
}
|
||||
|
||||
List<PhpOnlineDto> recentLearnRecordList = new ArrayList<>();
|
||||
for (Object[] objects : objectList1) {
|
||||
String courseId = objects[0].toString();
|
||||
String userIdOfPhp = objects[1].toString();
|
||||
Integer progress = ((BigDecimal) objects[2]).intValue();
|
||||
PhpOnlineDto phpOnlineDto = new PhpOnlineDto();
|
||||
phpOnlineDto.setCourseId(courseId);
|
||||
phpOnlineDto.setUserIdOfPhp(userIdOfPhp);
|
||||
phpOnlineDto.setProgress(progress);
|
||||
recentLearnRecordList.add(phpOnlineDto);
|
||||
}
|
||||
|
||||
// 拼接获取所有新系统用户id,这里不选择与上面的联表查询,有效率问题
|
||||
String userBasicDataBase;
|
||||
if (activeProfile.equals("pro")) {
|
||||
userBasicDataBase = "user_basic";
|
||||
} else {
|
||||
userBasicDataBase = "userbasic";
|
||||
}
|
||||
|
||||
List<String> userIds = objectList1.stream().map(objects -> String.valueOf(objects[1])).distinct().collect(Collectors.toList());
|
||||
List<Object[]> objectList2 = this.sqlFindList("select kid,user_id from " + userBasicDataBase + ".user_account where kid in (?1) and deleted=0 and account_status = 0", userIds);
|
||||
|
||||
if (CollUtil.isEmpty(objectList1)) {
|
||||
log.info("新系统用户数据不存在");
|
||||
return null;
|
||||
}
|
||||
|
||||
Map<Object, Object> userIdToKidMap = objectList2.stream().collect(Collectors.toMap(object -> object[0], object -> object[1]));
|
||||
|
||||
// 设置新系统用户ID
|
||||
recentLearnRecordList = recentLearnRecordList.stream()
|
||||
.map(phpOnlineDto -> {
|
||||
Object userIdOfJavaObj = userIdToKidMap.get(phpOnlineDto.getUserIdOfPhp());
|
||||
if (userIdOfJavaObj != null) {
|
||||
phpOnlineDto.setUserIdOfJava(userIdOfJavaObj.toString());
|
||||
}
|
||||
return phpOnlineDto;
|
||||
})
|
||||
.filter(phpOnlineDto -> phpOnlineDto.getUserIdOfJava() != null)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
return recentLearnRecordList;
|
||||
}
|
||||
|
||||
public int selectRecentRegRecordListOfCount(Long syncTimePointOfBegin, Long syncTimePointOfEnd) {
|
||||
String sql =
|
||||
"SELECT COUNT(1)\n" +
|
||||
"FROM (\n" +
|
||||
" SELECT\n" +
|
||||
" elc.kid\n" +
|
||||
" FROM\n" +
|
||||
" elearninglms.eln_ln_course elc\n" +
|
||||
" INNER JOIN elearninglms.eln_ln_course_reg elcr \n" +
|
||||
" ON elc.kid = elcr.course_id\n" +
|
||||
" AND elcr.created_at > ?1\n" +
|
||||
" AND elcr.created_at < ?2\n" +
|
||||
" INNER JOIN elearninglms.eln_ln_mod_res elms \n" +
|
||||
" ON elms.course_id = elcr.course_id\n" +
|
||||
" LEFT JOIN elearninglms.eln_ln_res_complete elrc \n" +
|
||||
" ON elrc.mod_res_id = elms.kid\n" +
|
||||
" AND elrc.user_id = elcr.user_id\n" +
|
||||
" AND elrc.complete_type = '1'\n" +
|
||||
" AND elrc.complete_status = '2'\n" +
|
||||
" WHERE\n" +
|
||||
" elc.is_deleted = 0\n" +
|
||||
" AND elcr.is_deleted = 0\n" +
|
||||
" AND elcr.reg_state = '1'\n" +
|
||||
" AND elms.publish_status = '1'\n" +
|
||||
" AND elms.is_deleted = '0'\n" +
|
||||
" GROUP BY\n" +
|
||||
" elc.kid,\n" +
|
||||
" elcr.user_id\n" +
|
||||
") temp;\n"; // 每页 1000 条记录,OFFSET 计算分页
|
||||
|
||||
|
||||
int count = this.sqlCount(sql, syncTimePointOfBegin, syncTimePointOfEnd);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.xboe.school.study.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 批量报名
|
||||
*
|
||||
* @author seastar
|
||||
*/
|
||||
@Data
|
||||
public class PhpOnlineDto {
|
||||
|
||||
/**
|
||||
* 课程id
|
||||
*/
|
||||
private String courseId;
|
||||
|
||||
/**
|
||||
* 课程名称
|
||||
*/
|
||||
private String userIdOfPhp;
|
||||
|
||||
|
||||
/**
|
||||
* 课程名称
|
||||
*/
|
||||
private String userIdOfJava;
|
||||
|
||||
/**
|
||||
* 进度
|
||||
*/
|
||||
private Integer progress;
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.xboe.system.api;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
@@ -14,6 +11,11 @@ import java.util.Set;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.xboe.core.SysConstant;
|
||||
import com.xboe.standard.BaseConstant;
|
||||
import com.xboe.system.assist.entity.XUploadResultDto;
|
||||
import it.sauronsoftware.jave.Encoder;
|
||||
import it.sauronsoftware.jave.MultimediaInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -115,8 +117,23 @@ public class SysUploaderApi extends ApiBaseController{
|
||||
// ex.printStackTrace();
|
||||
log.error("处理失败",ex);
|
||||
}
|
||||
|
||||
return wrap(xur);
|
||||
Long ls = 0L;
|
||||
XUploadResultDto dto=new XUploadResultDto();
|
||||
String fileFullPath = SysConstant.getConfigValue(BaseConstant.CONFIG_UPLOAD_FILES_SAVEPATH) + xur.getFilePath();
|
||||
try {
|
||||
Encoder encoder = new Encoder();
|
||||
MultimediaInfo m = encoder.getInfo(new File(fileFullPath));
|
||||
ls = m.getDuration() / 1000;//秒
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
log.error("读取视频时长错误");
|
||||
}
|
||||
dto.setDuration(ls);
|
||||
dto.setDisplayName(xur.getDisplayName());
|
||||
dto.setFilePath(xur.getFilePath());
|
||||
dto.setFileType(xur.getFileType());
|
||||
dto.setHttpPath(xur.getHttpPath());
|
||||
return wrap(dto);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("upload file error ",e);
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.xboe.system.assist.entity;
|
||||
|
||||
import com.xboe.core.upload.XUploadResult;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class XUploadResultDto extends XUploadResult {
|
||||
private Long duration;
|
||||
}
|
||||
159
servers/boe-server-all/src/main/resources/application-dev.yml
Normal file
159
servers/boe-server-all/src/main/resources/application-dev.yml
Normal file
@@ -0,0 +1,159 @@
|
||||
spring:
|
||||
# application.yml
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 500MB
|
||||
max-request-size: 500MB
|
||||
redis:
|
||||
database: 1
|
||||
host: 192.168.0.101
|
||||
password: boe@123
|
||||
port: 6379
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 8
|
||||
min-idle: 0
|
||||
max-idle: 30
|
||||
max-wait: 10000ms
|
||||
shutdown-timeout: 100ms
|
||||
jpa:
|
||||
database: MYSQL
|
||||
properties:
|
||||
hibernate:
|
||||
naming_strategy: org.hibernate.cfg.EJB3NamingStrategy
|
||||
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext
|
||||
show-sql: true
|
||||
hibernate:
|
||||
ddl-auto: update
|
||||
datasource:
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.0.101:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
|
||||
username: root
|
||||
password: boe#1234A
|
||||
web:
|
||||
resources:
|
||||
static-locations: file:E:/Projects/BOE/10/static
|
||||
server:
|
||||
port: 9090
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 500MB
|
||||
max-request-size: 500MB
|
||||
session:
|
||||
timeout: 30m
|
||||
encoding:
|
||||
charset: UTF-8
|
||||
enabled: true
|
||||
force: true
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
servlet:
|
||||
multipart:
|
||||
maxFileSize: 1024MB
|
||||
maxRequestSize: 1024MB
|
||||
mvc:
|
||||
static-path-pattern: /cdn/**
|
||||
|
||||
#logging.level.org.hibernate.SQL=DEBUG
|
||||
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
|
||||
#logging.config=classpath:log/logback-@profileActive@.xml
|
||||
|
||||
# logging:
|
||||
# config: classpath:log/logback-${spring.profiles.active}.xml
|
||||
# level:
|
||||
# org:
|
||||
# hibernate:
|
||||
# SQL: DEBUG
|
||||
# type:
|
||||
# descriptor:
|
||||
# sql:
|
||||
# BasicBinder: TRACE
|
||||
|
||||
xcaching:
|
||||
specs:
|
||||
favorites:
|
||||
timeout: 10s
|
||||
praises:
|
||||
timeout: 10s
|
||||
shares:
|
||||
timeout: 10s
|
||||
|
||||
xboe:
|
||||
api:
|
||||
cross_filter: true
|
||||
local:
|
||||
dev: true
|
||||
upload:
|
||||
file:
|
||||
temp_path: D:/Projects/BOE/10/static/temp
|
||||
save_path: /home/www/elearning/upload
|
||||
http_path: http://127.0.0.1/upload
|
||||
externalinterface:
|
||||
url:
|
||||
system: http://localhost:9091
|
||||
old:
|
||||
base:
|
||||
url: http://192.168.0.101
|
||||
server:
|
||||
userbasic:
|
||||
url: http://192.168.0.101/userbasic
|
||||
stat:
|
||||
base:
|
||||
url: http://127.0.0.1:9080
|
||||
elasticsearch:
|
||||
server:
|
||||
ip: 192.168.0.101
|
||||
port: 9200
|
||||
user:
|
||||
password:
|
||||
email:
|
||||
url: http://192.168.0.101/api/b1/email/send
|
||||
from: boeu_learning@boe.com.cn
|
||||
user:
|
||||
security:
|
||||
|
||||
jasypt:
|
||||
encryptor:
|
||||
algorithm: PBEWithMD5AndDES
|
||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
||||
|
||||
boe:
|
||||
domain: http://127.0.0.1
|
||||
|
||||
ok:
|
||||
http:
|
||||
connect-timeout: 30
|
||||
read-timeout: 30
|
||||
write-timeout: 30
|
||||
max-idle-connections: 200
|
||||
keep-alive-duration: 300
|
||||
|
||||
|
||||
|
||||
orgTree:
|
||||
orgTreeList: ${boe.domain}/userbasic/org/list
|
||||
orgChildTreeList: ${boe.domain}/userbasic/org/childOrgs
|
||||
|
||||
userBasic:
|
||||
searchUserList: ${boe.domain}/userbasic/user/list
|
||||
getUserBasicInfo: ${boe.domain}/userbasic/user/getUserBasicInfo
|
||||
getTeacherIds: ${boe.domain}/userbasic/user/getTeacherInfo
|
||||
|
||||
audience:
|
||||
usersByAudienceList: ${boe.domain}/userbasic/audience/memberList
|
||||
getOrgUsers: ${boe.domain}/userbasic/user/getOrgUsers
|
||||
|
||||
statApi:
|
||||
userdynamicList: ${boe.domain}/statApi/xboe/m/stat/userdynamic/list
|
||||
|
||||
infrasApi:
|
||||
dict: ${boe.domain}/infrasApi/dict/list
|
||||
|
||||
manageApi:
|
||||
stu:
|
||||
offcourse: ${boe.domain}/manageApi/stu/offcourse/getOffCourseId
|
||||
editExam: ${boe.domain}/manageApi/admin/project/editExam
|
||||
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
||||
coursesuilt:
|
||||
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
||||
159
servers/boe-server-all/src/main/resources/application-test.yml
Normal file
159
servers/boe-server-all/src/main/resources/application-test.yml
Normal file
@@ -0,0 +1,159 @@
|
||||
spring:
|
||||
# application.yml
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 500MB
|
||||
max-request-size: 500MB
|
||||
redis:
|
||||
database: 1
|
||||
host: 10.251.186.27
|
||||
password: qwert!W577
|
||||
port: 6379
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 8
|
||||
min-idle: 0
|
||||
max-idle: 30
|
||||
max-wait: 10000ms
|
||||
shutdown-timeout: 100ms
|
||||
jpa:
|
||||
database: MYSQL
|
||||
properties:
|
||||
hibernate:
|
||||
naming_strategy: org.hibernate.cfg.EJB3NamingStrategy
|
||||
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext
|
||||
show-sql: true
|
||||
hibernate:
|
||||
ddl-auto: update
|
||||
datasource:
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://10.251.160.40:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
|
||||
username: admin
|
||||
password: boeRds01
|
||||
web:
|
||||
resources:
|
||||
static-locations: file:E:/Projects/BOE/10/static
|
||||
server:
|
||||
port: 9090
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 500MB
|
||||
max-request-size: 500MB
|
||||
session:
|
||||
timeout: 30m
|
||||
encoding:
|
||||
charset: UTF-8
|
||||
enabled: true
|
||||
force: true
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
servlet:
|
||||
multipart:
|
||||
maxFileSize: 1024MB
|
||||
maxRequestSize: 1024MB
|
||||
mvc:
|
||||
static-path-pattern: /cdn/**
|
||||
|
||||
#logging.level.org.hibernate.SQL=DEBUG
|
||||
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
|
||||
#logging.config=classpath:log/logback-@profileActive@.xml
|
||||
|
||||
# logging:
|
||||
# config: classpath:log/logback-${spring.profiles.active}.xml
|
||||
# level:
|
||||
# org:
|
||||
# hibernate:
|
||||
# SQL: DEBUG
|
||||
# type:
|
||||
# descriptor:
|
||||
# sql:
|
||||
# BasicBinder: TRACE
|
||||
|
||||
xcaching:
|
||||
specs:
|
||||
favorites:
|
||||
timeout: 10s
|
||||
praises:
|
||||
timeout: 10s
|
||||
shares:
|
||||
timeout: 10s
|
||||
|
||||
xboe:
|
||||
api:
|
||||
cross_filter: true
|
||||
local:
|
||||
dev: true
|
||||
upload:
|
||||
file:
|
||||
temp_path: /Projects/BOE/10/static/temp
|
||||
save_path: /home/www/elearning/upload
|
||||
http_path: http://127.0.0.1/upload
|
||||
externalinterface:
|
||||
url:
|
||||
system: http://localhost:9091
|
||||
old:
|
||||
base:
|
||||
url: http://localhost
|
||||
server:
|
||||
userbasic:
|
||||
url: http://localhost/userbasic
|
||||
stat:
|
||||
base:
|
||||
url: http://localhost:9080
|
||||
elasticsearch:
|
||||
server:
|
||||
ip: 10.251.129.25
|
||||
port: 9200
|
||||
user:
|
||||
password:
|
||||
email:
|
||||
url: http://localhost/api/b1/email/send
|
||||
from: boeu_learning@boe.com.cn
|
||||
user:
|
||||
security:
|
||||
|
||||
jasypt:
|
||||
encryptor:
|
||||
algorithm: PBEWithMD5AndDES
|
||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
||||
|
||||
boe:
|
||||
domain: http://127.0.0.1
|
||||
|
||||
ok:
|
||||
http:
|
||||
connect-timeout: 30
|
||||
read-timeout: 30
|
||||
write-timeout: 30
|
||||
max-idle-connections: 200
|
||||
keep-alive-duration: 300
|
||||
|
||||
|
||||
|
||||
orgTree:
|
||||
orgTreeList: ${boe.domain}/userbasic/org/list
|
||||
orgChildTreeList: ${boe.domain}/userbasic/org/childOrgs
|
||||
|
||||
userBasic:
|
||||
searchUserList: ${boe.domain}/userbasic/user/list
|
||||
getUserBasicInfo: ${boe.domain}/userbasic/user/getUserBasicInfo
|
||||
getTeacherIds: ${boe.domain}/userbasic/user/getTeacherInfo
|
||||
|
||||
audience:
|
||||
usersByAudienceList: ${boe.domain}/userbasic/audience/memberList
|
||||
getOrgUsers: ${boe.domain}/userbasic/user/getOrgUsers
|
||||
|
||||
statApi:
|
||||
userdynamicList: ${boe.domain}/statApi/xboe/m/stat/userdynamic/list
|
||||
|
||||
infrasApi:
|
||||
dict: ${boe.domain}/infrasApi/dict/list
|
||||
|
||||
manageApi:
|
||||
stu:
|
||||
offcourse: ${boe.domain}/manageApi/stu/offcourse/getOffCourseId
|
||||
editExam: ${boe.domain}/manageApi/admin/project/editExam
|
||||
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
||||
coursesuilt:
|
||||
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
||||
159
servers/boe-server-all/src/main/resources/application.yml
Normal file
159
servers/boe-server-all/src/main/resources/application.yml
Normal file
@@ -0,0 +1,159 @@
|
||||
spring:
|
||||
# application.yml
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 500MB
|
||||
max-request-size: 500MB
|
||||
redis:
|
||||
database: 1
|
||||
host: 10.251.186.27
|
||||
password: qwert!W577
|
||||
port: 6379
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 8
|
||||
min-idle: 0
|
||||
max-idle: 30
|
||||
max-wait: 10000ms
|
||||
shutdown-timeout: 100ms
|
||||
jpa:
|
||||
database: MYSQL
|
||||
properties:
|
||||
hibernate:
|
||||
naming_strategy: org.hibernate.cfg.EJB3NamingStrategy
|
||||
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext
|
||||
show-sql: true
|
||||
hibernate:
|
||||
ddl-auto: update
|
||||
datasource:
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://10.251.160.40:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
|
||||
username: admin
|
||||
password: boeRds01
|
||||
web:
|
||||
resources:
|
||||
static-locations: file:E:/Projects/BOE/10/static
|
||||
server:
|
||||
port: 9090
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 500MB
|
||||
max-request-size: 500MB
|
||||
session:
|
||||
timeout: 30m
|
||||
encoding:
|
||||
charset: UTF-8
|
||||
enabled: true
|
||||
force: true
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
servlet:
|
||||
multipart:
|
||||
maxFileSize: 1024MB
|
||||
maxRequestSize: 1024MB
|
||||
mvc:
|
||||
static-path-pattern: /cdn/**
|
||||
|
||||
#logging.level.org.hibernate.SQL=DEBUG
|
||||
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
|
||||
#logging.config=classpath:log/logback-@profileActive@.xml
|
||||
|
||||
# logging:
|
||||
# config: classpath:log/logback-${spring.profiles.active}.xml
|
||||
# level:
|
||||
# org:
|
||||
# hibernate:
|
||||
# SQL: DEBUG
|
||||
# type:
|
||||
# descriptor:
|
||||
# sql:
|
||||
# BasicBinder: TRACE
|
||||
|
||||
xcaching:
|
||||
specs:
|
||||
favorites:
|
||||
timeout: 10s
|
||||
praises:
|
||||
timeout: 10s
|
||||
shares:
|
||||
timeout: 10s
|
||||
|
||||
xboe:
|
||||
api:
|
||||
cross_filter: true
|
||||
local:
|
||||
dev: true
|
||||
upload:
|
||||
file:
|
||||
temp_path: /Projects/BOE/10/static/temp
|
||||
save_path: /home/www/elearning/upload
|
||||
http_path: http://127.0.0.1/upload
|
||||
externalinterface:
|
||||
url:
|
||||
system: http://localhost:9091
|
||||
old:
|
||||
base:
|
||||
url: http://localhost
|
||||
server:
|
||||
userbasic:
|
||||
url: http://localhost/userbasic
|
||||
stat:
|
||||
base:
|
||||
url: http://localhost:9080
|
||||
elasticsearch:
|
||||
server:
|
||||
ip: 10.251.129.25
|
||||
port: 9200
|
||||
user:
|
||||
password:
|
||||
email:
|
||||
url: http://localhost/api/b1/email/send
|
||||
from: boeu_learning@boe.com.cn
|
||||
user:
|
||||
security:
|
||||
|
||||
jasypt:
|
||||
encryptor:
|
||||
algorithm: PBEWithMD5AndDES
|
||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
||||
|
||||
boe:
|
||||
domain: http://127.0.0.1
|
||||
|
||||
ok:
|
||||
http:
|
||||
connect-timeout: 30
|
||||
read-timeout: 30
|
||||
write-timeout: 30
|
||||
max-idle-connections: 200
|
||||
keep-alive-duration: 300
|
||||
|
||||
|
||||
|
||||
orgTree:
|
||||
orgTreeList: ${boe.domain}/userbasic/org/list
|
||||
orgChildTreeList: ${boe.domain}/userbasic/org/childOrgs
|
||||
|
||||
userBasic:
|
||||
searchUserList: ${boe.domain}/userbasic/user/list
|
||||
getUserBasicInfo: ${boe.domain}/userbasic/user/getUserBasicInfo
|
||||
getTeacherIds: ${boe.domain}/userbasic/user/getTeacherInfo
|
||||
|
||||
audience:
|
||||
usersByAudienceList: ${boe.domain}/userbasic/audience/memberList
|
||||
getOrgUsers: ${boe.domain}/userbasic/user/getOrgUsers
|
||||
|
||||
statApi:
|
||||
userdynamicList: ${boe.domain}/statApi/xboe/m/stat/userdynamic/list
|
||||
|
||||
infrasApi:
|
||||
dict: ${boe.domain}/infrasApi/dict/list
|
||||
|
||||
manageApi:
|
||||
stu:
|
||||
offcourse: ${boe.domain}/manageApi/stu/offcourse/getOffCourseId
|
||||
editExam: ${boe.domain}/manageApi/admin/project/editExam
|
||||
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
||||
coursesuilt:
|
||||
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
||||
@@ -1,22 +1,22 @@
|
||||
spring:
|
||||
application:
|
||||
name: boe-server-all
|
||||
profiles:
|
||||
active: dev
|
||||
# profiles:
|
||||
# active: test
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.0.101:8848
|
||||
server-addr: 10.251.186.27:8848
|
||||
config:
|
||||
server-addr: 192.168.0.101:8848
|
||||
file-extension: yaml
|
||||
namespace: fd5741ee-c2aa-4002-a9b0-43a11436d35c
|
||||
name: boe-server-all
|
||||
group: SERVER_GROUP
|
||||
extension-configs:
|
||||
- data-id: redis0.yaml
|
||||
group: COMMON_GROUP
|
||||
refresh: true
|
||||
server-addr: 10.251.186.27:8848
|
||||
# file-extension: yaml
|
||||
# namespace: fd5741ee-c2aa-4002-a9b0-43a11436d35c
|
||||
# name: boe-server-all
|
||||
# group: SERVER_GROUP
|
||||
# extension-configs:
|
||||
# - data-id: redis0.yaml
|
||||
# group: COMMON_GROUP
|
||||
# refresh: true
|
||||
|
||||
# shared-configs:
|
||||
# - data-id: redis0.yaml
|
||||
|
||||
Reference in New Issue
Block a user