mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-11 03:46:50 +08:00
Compare commits
66 Commits
dev
...
dev250106-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0c292cabd | ||
|
|
ab38597570 | ||
|
|
a205effce1 | ||
|
|
5698a3ea58 | ||
|
|
0804c47d22 | ||
|
|
aab50a0ff0 | ||
|
|
c95e0faf63 | ||
|
|
9866618110 | ||
|
|
d6744bb990 | ||
|
|
be18f7477b | ||
|
|
157e692203 | ||
|
|
492032a77a | ||
|
|
1c6a64e504 | ||
|
|
6f861c3d2c | ||
|
|
b701f88586 | ||
|
|
6532cf75e3 | ||
|
|
ad357a61b7 | ||
|
|
f70b4cb32a | ||
|
|
f577e82551 | ||
|
|
ee25fa40cd | ||
|
|
45d38d6df7 | ||
|
|
3703cfb9c8 | ||
|
|
3a1908532e | ||
|
|
963fae8191 | ||
|
|
b2bad03ba9 | ||
|
|
4152baf8de | ||
|
|
0f2d8af1e4 | ||
|
|
4d161a1d36 | ||
|
|
971478f206 | ||
|
|
eaafb57b83 | ||
|
|
ee74f47261 | ||
|
|
c0a00e9647 | ||
|
|
9d3bbcbf3a | ||
|
|
05dc7b984f | ||
|
|
5b4afdde65 | ||
|
|
53ff0d979e | ||
|
|
9a28d65c54 | ||
|
|
32fcc830de | ||
|
|
d0e5f8c329 | ||
|
|
9c5941fd6b | ||
|
|
2c94b09199 | ||
|
|
d147a5f861 | ||
|
|
e9995753c7 | ||
|
|
e59aab127f | ||
|
|
ede76f74e8 | ||
|
|
f28d120688 | ||
|
|
425a1edf01 | ||
|
|
d9d1e0fecc | ||
|
|
cb9e94ce5e | ||
|
|
16df953a86 | ||
|
|
af0c26294d | ||
|
|
485b110613 | ||
|
|
15fcfdcc2b | ||
|
|
f54eae0cec | ||
|
|
2d0b79878b | ||
|
|
00deb3f825 | ||
|
|
76a10ec726 | ||
|
|
87adf2aca5 | ||
|
|
b6f188389d | ||
|
|
f61f344f60 | ||
|
|
2a214530f6 | ||
|
|
05656669ca | ||
|
|
5905fd6db8 | ||
|
|
ddd35b4731 | ||
|
|
5af8ca335c | ||
|
|
cd029d43c1 |
@@ -219,13 +219,13 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.elasticsearch</groupId>
|
<groupId>org.elasticsearch</groupId>
|
||||||
<artifactId>elasticsearch</artifactId>
|
<artifactId>elasticsearch</artifactId>
|
||||||
<version>7.9.0</version> <!-- 请根据实际需求选择合适的版本 -->
|
<version>7.10.2</version> <!-- 请根据实际需求选择合适的版本 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.elasticsearch.client</groupId>
|
<groupId>org.elasticsearch.client</groupId>
|
||||||
<artifactId>elasticsearch-rest-high-level-client</artifactId>
|
<artifactId>elasticsearch-rest-high-level-client</artifactId>
|
||||||
<version>7.9.0</version> <!-- 请根据实际需求选择合适的版本 -->
|
<version>7.10.2</version> <!-- 请根据实际需求选择合适的版本 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -237,9 +237,10 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.xuxueli</groupId>
|
<groupId>com.xuxueli</groupId>
|
||||||
<artifactId>xxl-job-core</artifactId>
|
<artifactId>xxl-job-core</artifactId>
|
||||||
<version>2.3.0</version> <!-- 请根据实际需求选择版本 -->
|
<version>2.3.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
@@ -269,9 +270,9 @@
|
|||||||
</build>
|
</build>
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>prod</id>
|
<id>pro</id>
|
||||||
<properties>
|
<properties>
|
||||||
<profileActive>prod</profileActive>
|
<profileActive>pro</profileActive>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ import com.boe.feign.api.usercenter.reps.AudienceMemberVo;
|
|||||||
import com.boe.feign.api.usercenter.reps.Response;
|
import com.boe.feign.api.usercenter.reps.Response;
|
||||||
import com.xboe.api.infrastructure.res.InfraResult;
|
import com.xboe.api.infrastructure.res.InfraResult;
|
||||||
import com.xboe.api.vo.*;
|
import com.xboe.api.vo.*;
|
||||||
import com.xboe.module.course.dto.CourseParam;
|
|
||||||
import com.xboe.module.course.dto.ScoreParam;
|
|
||||||
import com.xboe.common.PageList;
|
import com.xboe.common.PageList;
|
||||||
import com.xboe.common.Pagination;
|
import com.xboe.common.Pagination;
|
||||||
import com.xboe.core.JsonResponse;
|
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.StudyCourseVo;
|
||||||
import com.xboe.module.course.vo.TeacherVo;
|
import com.xboe.module.course.vo.TeacherVo;
|
||||||
import com.xboe.module.dict.entity.DictDto;
|
import com.xboe.module.dict.entity.DictDto;
|
||||||
@@ -92,8 +92,8 @@ public class ThirdApi {
|
|||||||
private String syncCourseStudent;
|
private String syncCourseStudent;
|
||||||
@Value("${coursesuilt.syncOnLineScore}")
|
@Value("${coursesuilt.syncOnLineScore}")
|
||||||
private String syncOnLineScore;
|
private String syncOnLineScore;
|
||||||
@Value("${coursesuilt.updateOnLineStatua}")
|
@Value("${coursesuilt.updateOnLineStatus}")
|
||||||
private String updateOnLineStatua;
|
private String updateOnLineStatus;
|
||||||
|
|
||||||
|
|
||||||
//获取例外人员的id
|
//获取例外人员的id
|
||||||
@@ -376,9 +376,9 @@ public class ThirdApi {
|
|||||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||||
log.info("syncOnLineScore = " + resp);
|
log.info("syncOnLineScore = " + resp);
|
||||||
}
|
}
|
||||||
public void updateOnLineStatua(CourseParam param, String token){
|
public void updateOnLineStatus(CourseParam param, String token){
|
||||||
String resp = Optional.ofNullable(
|
String resp = Optional.ofNullable(
|
||||||
HttpRequest.post(updateOnLineStatua).body(JSONUtil.toJsonStr(param)).header("token", token).execute()
|
HttpRequest.post(updateOnLineStatus).body(JSONUtil.toJsonStr(param)).header("token", token).execute()
|
||||||
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
.body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||||
log.info("updateOrSaveCourse = " + resp);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.xboe.config;
|
package com.xboe.config;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||||
@@ -7,11 +8,9 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.http.converter.HttpMessageConverter;
|
import org.springframework.http.converter.HttpMessageConverter;
|
||||||
import org.springframework.http.converter.cbor.MappingJackson2CborHttpMessageConverter;
|
import org.springframework.http.converter.cbor.MappingJackson2CborHttpMessageConverter;
|
||||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||||
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
|
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -21,15 +20,6 @@ public class WebConfig implements WebMvcConfigurer {
|
|||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(WebConfig.class);
|
private static final Logger logger = LoggerFactory.getLogger(WebConfig.class);
|
||||||
|
|
||||||
@Override
|
|
||||||
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
|
|
||||||
configurer.favorParameter(true)
|
|
||||||
.defaultContentType(MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML)
|
|
||||||
.parameterName("mediaType")
|
|
||||||
.mediaType("json", MediaType.APPLICATION_JSON)
|
|
||||||
.mediaType("xml", MediaType.APPLICATION_XML);
|
|
||||||
}
|
|
||||||
|
|
||||||
//结果处理器
|
//结果处理器
|
||||||
@Bean
|
@Bean
|
||||||
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter(ObjectMapper objectMapper) {
|
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter(ObjectMapper objectMapper) {
|
||||||
@@ -40,10 +30,9 @@ public class WebConfig implements WebMvcConfigurer {
|
|||||||
public ObjectMapper objectMapper() {
|
public ObjectMapper objectMapper() {
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
mapper.registerModule(new JavaTimeModule());
|
mapper.registerModule(new JavaTimeModule());
|
||||||
mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
|
mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY,true);
|
||||||
return mapper;
|
return mapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在默认的消息转换器基础上添加或移除某些转换器
|
* 在默认的消息转换器基础上添加或移除某些转换器
|
||||||
* 保证StringHttpMessageConverter在FastJsonHttpMessageConverter前被调用
|
* 保证StringHttpMessageConverter在FastJsonHttpMessageConverter前被调用
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ public interface CacheName {
|
|||||||
*/
|
*/
|
||||||
String NAME_USER = "user";
|
String NAME_USER = "user";
|
||||||
|
|
||||||
|
String NAME_INFO = "userInfo";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名缓存KEY前缀
|
* 用户名缓存KEY前缀
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -122,20 +122,13 @@ public class OutSideDataServiceImpl implements IOutSideDataService {
|
|||||||
//这里应该是单独的线程去处理
|
//这里应该是单独的线程去处理
|
||||||
user.setId(getNodeText(result.get("userId")));//最新接口变化,id改成userId
|
user.setId(getNodeText(result.get("userId")));//最新接口变化,id改成userId
|
||||||
String band=getNodeText(result.get("bandCode"));
|
String band=getNodeText(result.get("bandCode"));
|
||||||
try {
|
if(StringUtils.isNotBlank(band) && band.length()>4) {
|
||||||
if(StringUtils.isNotBlank(band) && band.length()>4 && band.contains("band")) {
|
String bandNum=band.substring(4);
|
||||||
String bandNum=band.substring(4);
|
user.setBandLevel(Integer.valueOf(bandNum));
|
||||||
user.setBandLevel(Integer.valueOf(bandNum));
|
}else {
|
||||||
}else if (StringUtils.isNotBlank(band) && band.length()>4 && band.contains("Level")) {
|
user.setBandLevel(0);
|
||||||
String bandNum=band.substring(5);
|
}
|
||||||
user.setBandLevel(Integer.valueOf(bandNum));
|
user.setAvatar(getNodeText(result.get("avatar")));
|
||||||
}else {
|
|
||||||
user.setBandLevel(0);
|
|
||||||
}
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
user.setBandLevel(0);
|
|
||||||
}
|
|
||||||
user.setAvatar(getNodeText(result.get("avatar")));
|
|
||||||
user.setCode(getNodeText(result.get("userNo")));
|
user.setCode(getNodeText(result.get("userNo")));
|
||||||
|
|
||||||
if(StringUtils.isBlank(user.getCode())) {
|
if(StringUtils.isBlank(user.getCode())) {
|
||||||
|
|||||||
@@ -2,16 +2,11 @@ package com.xboe.data.service.impl;
|
|||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
import com.boe.feign.api.serverall.entity.UserData;
|
import com.boe.feign.api.serverall.entity.UserData;
|
||||||
import com.xboe.constants.CacheName;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.cache.Cache;
|
|
||||||
import org.springframework.cache.CacheManager;
|
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
|
||||||
import org.springframework.retry.annotation.Recover;
|
import org.springframework.retry.annotation.Recover;
|
||||||
import org.springframework.retry.annotation.Retryable;
|
import org.springframework.retry.annotation.Retryable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -44,9 +39,6 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
TeacherDao teacherDao;
|
TeacherDao teacherDao;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private CacheManager cacheManager;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -67,8 +59,6 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
|
|||||||
a.setDeleted(user.getDeleted());
|
a.setDeleted(user.getDeleted());
|
||||||
}
|
}
|
||||||
a.setLoginName(user.getCode());
|
a.setLoginName(user.getCode());
|
||||||
a.setMobile(user.getMobile());
|
|
||||||
a.setEmail(user.getEmail());
|
|
||||||
log.info("更新账号code");
|
log.info("更新账号code");
|
||||||
accountDao.update(a);
|
accountDao.update(a);
|
||||||
} else {
|
} else {
|
||||||
@@ -81,18 +71,14 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
|
|||||||
a.setRegTime(LocalDateTime.now());
|
a.setRegTime(LocalDateTime.now());
|
||||||
a.setSysId(user.getKid());
|
a.setSysId(user.getKid());
|
||||||
a.setStatus(1);
|
a.setStatus(1);
|
||||||
a.setMobile(user.getMobile());
|
|
||||||
a.setEmail(user.getEmail());
|
|
||||||
accountDao.save(a);
|
accountDao.save(a);
|
||||||
log.info("账号不存在,新添加账号【" + user.getId() + "】");
|
log.info("账号不存在,新添加账号【" + user.getId() + "】");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u != null) {
|
if (u != null) {
|
||||||
//更新部分用户字段
|
//更新部分用户字段
|
||||||
u.setDepartId(user.getDepartId());
|
u.setDepartId(user.getDepartId());
|
||||||
u.setDepartName(user.getDepartName());
|
u.setDepartName(user.getDepartName());
|
||||||
u.setName(user.getName());
|
u.setName(user.getName());
|
||||||
u.setMobileNo(user.getMobile());
|
|
||||||
//2022-12-8 去掉用户类型的更新,因为返回的数据都是学员,
|
//2022-12-8 去掉用户类型的更新,因为返回的数据都是学员,
|
||||||
//u.setUserType(user.getUserType());
|
//u.setUserType(user.getUserType());
|
||||||
if (user.getLearningDuration() > 0) { //不大于0才会更新
|
if (user.getLearningDuration() > 0) { //不大于0才会更新
|
||||||
@@ -120,17 +106,9 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
|
|||||||
} else {
|
} else {
|
||||||
u.setShowHome(true);//band16以下,及其它无bandLevel的信息
|
u.setShowHome(true);//band16以下,及其它无bandLevel的信息
|
||||||
}
|
}
|
||||||
u.setMobileNo(user.getMobile());
|
|
||||||
userDao.save(u);
|
userDao.save(u);
|
||||||
log.info("添加新用户");
|
log.info("添加新用户");
|
||||||
}
|
}
|
||||||
|
|
||||||
Cache cache = cacheManager.getCache(CacheName.NAME_USER);
|
|
||||||
if(cache != null) {
|
|
||||||
cache.evict(CacheName.KEY_ACCOUNT + user.getId());
|
|
||||||
cache.evict(CacheName.KEY_USER + user.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
//对机构的判断,不为空时才会处理,为空时不处理
|
//对机构的判断,不为空时才会处理,为空时不处理
|
||||||
if (StringUtils.isNotBlank(user.getDepartId())) {
|
if (StringUtils.isNotBlank(user.getDepartId())) {
|
||||||
org = orgDao.get(user.getDepartId());
|
org = orgDao.get(user.getDepartId());
|
||||||
|
|||||||
@@ -140,9 +140,6 @@ public class CasesApi extends ApiBaseController {
|
|||||||
List<Cases> cases = views.getList();
|
List<Cases> cases = views.getList();
|
||||||
if (CollUtil.isNotEmpty(cases)) {
|
if (CollUtil.isNotEmpty(cases)) {
|
||||||
for (Cases c : cases) {
|
for (Cases c : cases) {
|
||||||
if ("null".equals(c.getSummary())) {
|
|
||||||
c.setSummary(null);
|
|
||||||
}
|
|
||||||
StringBuffer stringBuffer = new StringBuffer();
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
List<CasesMajorType> caseId = casesMajorTypeDao.findList(FieldFilters.eq("caseId", c.getId()));
|
List<CasesMajorType> caseId = casesMajorTypeDao.findList(FieldFilters.eq("caseId", c.getId()));
|
||||||
if (caseId != null && !caseId.isEmpty()) {
|
if (caseId != null && !caseId.isEmpty()) {
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ public class CourseAuditApi extends ApiBaseController{
|
|||||||
String token = request.getHeader("Xboe-Access-Token");
|
String token = request.getHeader("Xboe-Access-Token");
|
||||||
CourseParam param = new CourseParam();
|
CourseParam param = new CourseParam();
|
||||||
param.setId(courseId);
|
param.setId(courseId);
|
||||||
thirdApi.updateOnLineStatua(param,token);
|
thirdApi.updateOnLineStatus(param,token);
|
||||||
}
|
}
|
||||||
return success(true);
|
return success(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -285,9 +285,9 @@ public class CourseFullTextApi extends ApiBaseController{
|
|||||||
paras.setTypes(dto.getTypes());//多个分类的情况
|
paras.setTypes(dto.getTypes());//多个分类的情况
|
||||||
//用户的companyId
|
//用户的companyId
|
||||||
paras.setCompanyId(dto.getCompanyId());
|
paras.setCompanyId(dto.getCompanyId());
|
||||||
if(StringUtils.isNotBlank(dto.getAudiences())) {
|
// if(StringUtils.isNotBlank(dto.getAudiences())) {
|
||||||
paras.setAudiences(dto.getAudiences().split(","));
|
// paras.setAudiences(dto.getAudiences().split(","));
|
||||||
}
|
// }
|
||||||
if(StringUtils.isNotBlank(userIds)) {
|
if(StringUtils.isNotBlank(userIds)) {
|
||||||
paras.setSysCreateAids(userIds.split(","));
|
paras.setSysCreateAids(userIds.split(","));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -314,10 +314,8 @@ public class CoursePortalApi extends ApiBaseController{
|
|||||||
User user = userService.get(ct.getTeacherId());
|
User user = userService.get(ct.getTeacherId());
|
||||||
if(t!=null) {
|
if(t!=null) {
|
||||||
ct.setRemark(t.getDescription());
|
ct.setRemark(t.getDescription());
|
||||||
ct.setSupplier(t.getSupplier());
|
|
||||||
ct.setTeacherType(t.getTeacherType());
|
|
||||||
if(redisTemplate.opsForValue().get(ct.getTeacherId())!=null){
|
if(redisTemplate.opsForValue().get(ct.getTeacherId())!=null){
|
||||||
if(Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1") && ( t==null || t.getTeacherType() == 1)){
|
if(Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1")){
|
||||||
ct.setTeacherName("BOE教师");
|
ct.setTeacherName("BOE教师");
|
||||||
}
|
}
|
||||||
teacherCourseDto.setCourseId(ct.getCourseId());
|
teacherCourseDto.setCourseId(ct.getCourseId());
|
||||||
@@ -329,15 +327,13 @@ public class CoursePortalApi extends ApiBaseController{
|
|||||||
teacherCourseDto.setSysCreateBy(ct.getSysCreateBy());
|
teacherCourseDto.setSysCreateBy(ct.getSysCreateBy());
|
||||||
teacherCourseDto.setSysCreateTime(ct.getSysCreateTime());
|
teacherCourseDto.setSysCreateTime(ct.getSysCreateTime());
|
||||||
teacherCourseDto.setId(ct.getId());
|
teacherCourseDto.setId(ct.getId());
|
||||||
if(user!=null){
|
teacherCourseDto.setUserNo(user.getUserNo());
|
||||||
teacherCourseDto.setUserNo(user.getUserNo());
|
|
||||||
}
|
|
||||||
teacherCourseDtos.add(teacherCourseDto);
|
teacherCourseDtos.add(teacherCourseDto);
|
||||||
}else if (redisTemplate.opsForValue().get(ct.getTeacherId())==null){
|
}else if (redisTemplate.opsForValue().get(ct.getTeacherId())==null){
|
||||||
List<String> list=new ArrayList<>();
|
List<String> list=new ArrayList<>();
|
||||||
list.add(ct.getTeacherId());
|
list.add(ct.getTeacherId());
|
||||||
getTeacherInfo(request.getHeader("Xboe-Access-Token"),list);
|
getTeacherInfo(request.getHeader("Xboe-Access-Token"),list);
|
||||||
if(Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1") && ( t==null || t.getTeacherType() == 1)){
|
if(Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1")){
|
||||||
ct.setTeacherName("BOE教师");
|
ct.setTeacherName("BOE教师");
|
||||||
}
|
}
|
||||||
teacherCourseDto.setCourseId(ct.getCourseId());
|
teacherCourseDto.setCourseId(ct.getCourseId());
|
||||||
@@ -349,9 +345,7 @@ public class CoursePortalApi extends ApiBaseController{
|
|||||||
teacherCourseDto.setSysCreateBy(ct.getSysCreateBy());
|
teacherCourseDto.setSysCreateBy(ct.getSysCreateBy());
|
||||||
teacherCourseDto.setSysCreateTime(ct.getSysCreateTime());
|
teacherCourseDto.setSysCreateTime(ct.getSysCreateTime());
|
||||||
teacherCourseDto.setId(ct.getId());
|
teacherCourseDto.setId(ct.getId());
|
||||||
if(user!=null){
|
teacherCourseDto.setUserNo(user.getUserNo());
|
||||||
teacherCourseDto.setUserNo(user.getUserNo());
|
|
||||||
}
|
|
||||||
teacherCourseDtos.add(teacherCourseDto);
|
teacherCourseDtos.add(teacherCourseDto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
package com.xboe.module.course.api;
|
package com.xboe.module.course.api;
|
||||||
|
|
||||||
import java.util.Base64;
|
import java.util.*;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.Cookie;
|
import javax.servlet.http.Cookie;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@@ -33,13 +37,18 @@ import com.xboe.module.course.service.ICourseFileService;
|
|||||||
public class CourseWareApi extends ApiBaseController {
|
public class CourseWareApi extends ApiBaseController {
|
||||||
|
|
||||||
private String cookieName = "PLAYSIGN_TIME";
|
private String cookieName = "PLAYSIGN_TIME";
|
||||||
|
@Autowired
|
||||||
|
IOutSideDataService outsideDataService;
|
||||||
@Resource
|
@Resource
|
||||||
private ICourseFileService courseFileService;
|
private ICourseFileService courseFileService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private XFileUploader fileUploader;
|
private XFileUploader fileUploader;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
RedisTemplate<String, Object> redisTemplate;
|
||||||
|
|
||||||
private static Set<String> allowUrlSet = new HashSet<String>();
|
private static Set<String> allowUrlSet = new HashSet<String>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@@ -50,7 +59,7 @@ public class CourseWareApi extends ApiBaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 资源地址的加密,返回加密后的地址
|
* 资源地址的加密,返回加密后的地址
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param response
|
* @param response
|
||||||
* @param cfid 资源地址的id
|
* @param cfid 资源地址的id
|
||||||
@@ -85,25 +94,22 @@ public class CourseWareApi extends ApiBaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取资源,在header中保存
|
* 获取资源,在header中保存
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param response
|
* @param response
|
||||||
* @param cfid
|
|
||||||
* @param cf
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping("/resource")
|
@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)) {
|
if (StringUtils.isBlank(sign)) {
|
||||||
return badRequest("非法请求");
|
return badRequest("非法请求");
|
||||||
// return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String httpReferer = request.getHeader("referer");
|
String httpReferer = request.getHeader("referer");
|
||||||
if (StringUtils.isBlank(httpReferer)) {
|
if (StringUtils.isBlank(httpReferer)) {
|
||||||
return badRequest("非法请求");
|
return badRequest("非法请求");
|
||||||
// return "非法请求";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean has=false;
|
boolean has=false;
|
||||||
@@ -115,21 +121,37 @@ public class CourseWareApi extends ApiBaseController {
|
|||||||
|
|
||||||
if(!has) {
|
if(!has) {
|
||||||
return badRequest("页面不存在");
|
return badRequest("页面不存在");
|
||||||
//return "非法请求";
|
|
||||||
}
|
}
|
||||||
|
// String token = request.getHeader("Xboe-Access-Token");
|
||||||
//读取cookies中的时间
|
// if (StringUtils.isEmpty(token)) {
|
||||||
String cookieTime = getSignTimeCookie(request);
|
// token = request.getHeader("token");
|
||||||
if (StringUtils.isBlank(cookieTime)) {
|
// }
|
||||||
return badRequest("不支持的请求");
|
// 读取cookies中的时间
|
||||||
// return;
|
// 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 = Base64.getDecoder().decode(sign);
|
||||||
// byte[] signBytes = RSAUtil.decryptBase64(sign);
|
// byte[] signBytes = RSAUtil.decryptBase64(sign);
|
||||||
byte[] signDecryt = RSAUtil.decryptByPrivateKey(ConfigSecretKey.TEMP_PRIVATESTR, signBytes);
|
byte[] signDecryt = RSAUtil.decryptByPrivateKey(ConfigSecretKey.TEMP_PRIVATESTR, signBytes);
|
||||||
String signStr = new String(signDecryt);
|
String signStr = new String(signDecryt);
|
||||||
// System.out.println("解密后的字符串:"+signStr);
|
|
||||||
// 第一个/前端是时间
|
// 第一个/前端是时间
|
||||||
int index = signStr.indexOf("/");
|
int index = signStr.indexOf("/");
|
||||||
if (index <= 0) {
|
if (index <= 0) {
|
||||||
@@ -139,8 +161,15 @@ public class CourseWareApi extends ApiBaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String time = signStr.substring(0, signStr.indexOf("/"));// 时间字符中,long
|
String time = signStr.substring(0, signStr.indexOf("/"));// 时间字符中,long
|
||||||
|
String[] split = signStr.split("/");
|
||||||
String cfid = signStr.substring(index+1);// 文件路径
|
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)) {
|
// if (!time.equals(cookieTime)) {
|
||||||
// log.info("请求头时间和解析后的时间对比:"+"解析时间:"+time+" 请求头时间:"+cookieTime);
|
// log.info("请求头时间和解析后的时间对比:"+"解析时间:"+time+" 请求头时间:"+cookieTime);
|
||||||
// log.info("解密后的字符串的时间拼接:"+signStr);
|
// log.info("解密后的字符串的时间拼接:"+signStr);
|
||||||
@@ -172,7 +201,7 @@ public class CourseWareApi extends ApiBaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 读取cookies值
|
* 读取cookies值
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import com.xboe.core.orm.BaseDao;
|
|||||||
import com.xboe.core.orm.IFieldFilter;
|
import com.xboe.core.orm.IFieldFilter;
|
||||||
import com.xboe.module.course.entity.CourseFile;
|
import com.xboe.module.course.entity.CourseFile;
|
||||||
|
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public class CourseFileDao extends BaseDao<CourseFile> {
|
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);
|
PageList<CourseFile> page = this.getGenericDao().findPage(pageIndex, pageSize, getEntityClass(), filters,order);
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,11 +49,4 @@ public class CourseTeacher extends IdBaseEntity {
|
|||||||
@Transient
|
@Transient
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
/**供应商*/
|
|
||||||
@Transient
|
|
||||||
private String supplier;
|
|
||||||
|
|
||||||
/**讲师类型 1 内部讲师 2外部讲师*/
|
|
||||||
@Transient
|
|
||||||
private Integer teacherType;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,4 +54,6 @@ public interface ICourseFileService {
|
|||||||
* @param deleted
|
* @param deleted
|
||||||
*/
|
*/
|
||||||
void delete(String id,boolean 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.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.xboe.common.OrderCondition;
|
import com.xboe.common.OrderCondition;
|
||||||
|
import com.xboe.common.PageList;
|
||||||
import com.xboe.core.cache.IXaskCache;
|
import com.xboe.core.cache.IXaskCache;
|
||||||
import com.xboe.core.cache.XaskCacheProvider;
|
import com.xboe.core.cache.XaskCacheProvider;
|
||||||
import com.xboe.core.orm.FieldFilters;
|
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.dao.*;
|
||||||
import com.xboe.module.course.dto.CourseContentDto;
|
import com.xboe.module.course.dto.CourseContentDto;
|
||||||
import com.xboe.module.course.dto.SortItem;
|
import com.xboe.module.course.dto.SortItem;
|
||||||
import com.xboe.module.course.entity.CourseAssess;
|
import com.xboe.module.course.entity.*;
|
||||||
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.service.ICourseContentService;
|
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.dao.ExamPaperDao;
|
||||||
import com.xboe.module.exam.vo.TestQuestionVo;
|
import com.xboe.module.exam.vo.TestQuestionVo;
|
||||||
import com.xboe.standard.enums.BoedxContentType;
|
import com.xboe.standard.enums.BoedxContentType;
|
||||||
@@ -57,7 +56,8 @@ public class CourseContentServiceImpl implements ICourseContentService {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ExamPaperDao examPaperDao;
|
private ExamPaperDao examPaperDao;
|
||||||
|
@Resource
|
||||||
|
private ICourseFileService courseFileService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -83,6 +83,7 @@ public class CourseContentServiceImpl implements ICourseContentService {
|
|||||||
ccDao.save(cc);
|
ccDao.save(cc);
|
||||||
}else {
|
}else {
|
||||||
ccDao.update(cc);
|
ccDao.update(cc);
|
||||||
|
// courseFileService.updateDuration(cc.getContentRefId(),cc.getDuration());
|
||||||
cc.setSysVersion(ccDao.getVersion(cc.getId()));
|
cc.setSysVersion(ccDao.getVersion(cc.getId()));
|
||||||
}
|
}
|
||||||
//添加或保存其它信息
|
//添加或保存其它信息
|
||||||
|
|||||||
@@ -98,4 +98,14 @@ public class CourseFileServiceImpl implements ICourseFileService {
|
|||||||
public CourseFile get(String id) {
|
public CourseFile get(String id) {
|
||||||
return courseFileDao.get(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" +
|
String sql = "SELECT DISTINCT\n" +
|
||||||
"rt.course_id\n" +
|
"rt.course_id\n" +
|
||||||
"FROM\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" +
|
"\n" +
|
||||||
"WHERE\n" +
|
"WHERE\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
@@ -503,7 +503,7 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
String sql = "SELECT DISTINCT\n" +
|
String sql = "SELECT DISTINCT\n" +
|
||||||
"pt.course_id\n" +
|
"pt.course_id\n" +
|
||||||
"FROM\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" +
|
"\n" +
|
||||||
"WHERE\n" +
|
"WHERE\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
@@ -560,8 +560,8 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
String sql = "SELECT DISTINCT\n" +
|
String sql = "SELECT DISTINCT\n" +
|
||||||
"\tc.id \n" +
|
"\tc.id \n" +
|
||||||
"FROM\n" +
|
"FROM\n" +
|
||||||
"\tboe_new.student s\n" +
|
"\tboe.student s\n" +
|
||||||
"\tINNER JOIN boe_new.grow_task gt ON s.pid = gt.grow_id\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" +
|
"\tINNER JOIN boe_course c ON gt.course_id = c.id \n" +
|
||||||
"WHERE\n" +
|
"WHERE\n" +
|
||||||
"\ts.type = 14 \n" +
|
"\ts.type = 14 \n" +
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|||||||
@@ -43,7 +43,12 @@ public class PhpOnlineStudyRecordScheduledTasks {
|
|||||||
@Resource
|
@Resource
|
||||||
RestHighLevelClient restHighLevelClient;
|
RestHighLevelClient restHighLevelClient;
|
||||||
|
|
||||||
// todo 定时、分批、数据库名
|
/**
|
||||||
|
* 定时同步PHP数据库数据到es中,计划定时20分钟执行一次。具体实现是,
|
||||||
|
* 第一步,查询最近半小时内完成任一课件的课程学习,获取的信息有课程ID,学员ID,学习状态、学习进度。
|
||||||
|
* 第二步,根据上述得到的课程ID,学员ID,查询es中的未完成的记录。
|
||||||
|
* 第三步,比对两者学习进度,如果不一致,以数据库学习记录为准,修改ES
|
||||||
|
*/
|
||||||
@XxlJob("phpOnlineStudyRecordSyncEsTask")
|
@XxlJob("phpOnlineStudyRecordSyncEsTask")
|
||||||
public List<String> phpOnlineStudyRecordSyncEs(Long syncTimePointOfBegin, Long syncTimePointOfEnd, Integer isOnlyRead) throws IOException {
|
public List<String> phpOnlineStudyRecordSyncEs(Long syncTimePointOfBegin, Long syncTimePointOfEnd, Integer isOnlyRead) throws IOException {
|
||||||
|
|
||||||
@@ -101,6 +106,9 @@ public class PhpOnlineStudyRecordScheduledTasks {
|
|||||||
// 获取ES中的数据
|
// 获取ES中的数据
|
||||||
List<CourseStudyDto> esDataList = getEsData(batch);
|
List<CourseStudyDto> esDataList = getEsData(batch);
|
||||||
|
|
||||||
|
if (CollUtil.isEmpty(esDataList)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// 更新ES数据
|
// 更新ES数据
|
||||||
List<CourseStudyDto> toBeUpdatedEs = esDataList.stream()
|
List<CourseStudyDto> toBeUpdatedEs = esDataList.stream()
|
||||||
@@ -130,12 +138,13 @@ public class PhpOnlineStudyRecordScheduledTasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 调用批量更新方法
|
// 调用批量更新方法
|
||||||
// toBeUpdatedEs(toBeUpdatedEs, indexName);
|
toBeUpdatedEs(toBeUpdatedEs);
|
||||||
}
|
}
|
||||||
return tempResultList;
|
return tempResultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<CourseStudyDto> getEsData(List<PhpOnlineDto> finishedCourseList) throws IOException {
|
private List<CourseStudyDto> getEsData(List<PhpOnlineDto> finishedCourseList) throws IOException {
|
||||||
|
log.info("待处理的数据:{}", finishedCourseList);
|
||||||
SearchRequest searchRequest = new SearchRequest("new_study_resource");
|
SearchRequest searchRequest = new SearchRequest("new_study_resource");
|
||||||
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
|
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
|
||||||
|
|
||||||
@@ -151,11 +160,13 @@ public class PhpOnlineStudyRecordScheduledTasks {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchSourceBuilder sourceBuilder = new SearchSourceBuilder().query(boolQuery).timeout(new TimeValue(60, TimeUnit.SECONDS));
|
if (!boolQuery.hasClauses()) {
|
||||||
searchRequest.source(sourceBuilder);
|
return null;
|
||||||
if (boolQuery.hasClauses()) {
|
|
||||||
sourceBuilder.query(boolQuery);
|
|
||||||
}
|
}
|
||||||
|
SearchSourceBuilder sourceBuilder = new SearchSourceBuilder()
|
||||||
|
.query(boolQuery)
|
||||||
|
.timeout(new TimeValue(60, TimeUnit.SECONDS))
|
||||||
|
.size(finishedCourseList.size() + 10);
|
||||||
searchRequest.source(sourceBuilder);
|
searchRequest.source(sourceBuilder);
|
||||||
|
|
||||||
SearchResponse response = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT);
|
SearchResponse response = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT);
|
||||||
@@ -175,7 +186,7 @@ public class PhpOnlineStudyRecordScheduledTasks {
|
|||||||
return courseStudyDtoList;
|
return courseStudyDtoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toBeUpdatedEs(List<CourseStudyDto> toBeUpdatedEsData, String indexName) {
|
private void toBeUpdatedEs(List<CourseStudyDto> toBeUpdatedEsData) {
|
||||||
if (CollUtil.isEmpty(toBeUpdatedEsData)) {
|
if (CollUtil.isEmpty(toBeUpdatedEsData)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -186,7 +197,7 @@ public class PhpOnlineStudyRecordScheduledTasks {
|
|||||||
docMap.put("progress", courseStudyDto.getProgress());
|
docMap.put("progress", courseStudyDto.getProgress());
|
||||||
|
|
||||||
// 创建更新请求,并传入单一的docMap
|
// 创建更新请求,并传入单一的docMap
|
||||||
UpdateRequest updateRequest = new UpdateRequest(indexName, courseStudyDto.getId())
|
UpdateRequest updateRequest = new UpdateRequest("new_study_resource", courseStudyDto.getId())
|
||||||
.doc(docMap, XContentType.JSON);
|
.doc(docMap, XContentType.JSON);
|
||||||
|
|
||||||
// 将请求添加到批量请求中
|
// 将请求添加到批量请求中
|
||||||
@@ -208,7 +219,11 @@ public class PhpOnlineStudyRecordScheduledTasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第一步,查询最近报名的学习,获取的信息有课程ID,学员ID,学习状态、学习进度。
|
||||||
|
* 第二步,根据上述得到的课程ID,学员ID,查询es中的未完成的记录。
|
||||||
|
* 第三步,比对两者学习进度,如果不一致,以数据库学习记录为准,修改ES。
|
||||||
|
*/
|
||||||
public List<String> phpOnlineStudyRecordSyncEsOfFull(Long syncTimePointOfBegin, Long syncTimePointOfEnd, Integer isOnlyRead) throws IOException {
|
public List<String> phpOnlineStudyRecordSyncEsOfFull(Long syncTimePointOfBegin, Long syncTimePointOfEnd, Integer isOnlyRead) throws IOException {
|
||||||
|
|
||||||
log.info("开始同步PHP学习记录到ES");
|
log.info("开始同步PHP学习记录到ES");
|
||||||
|
|||||||
@@ -204,8 +204,6 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
Teacher t = teacherService.get(ct.getTeacherId());
|
Teacher t = teacherService.get(ct.getTeacherId());
|
||||||
if(t!=null) {
|
if(t!=null) {
|
||||||
ct.setRemark(t.getDescription());
|
ct.setRemark(t.getDescription());
|
||||||
ct.setSupplier(t.getSupplier());
|
|
||||||
ct.setTeacherType(t.getTeacherType());
|
|
||||||
}
|
}
|
||||||
if(redisTemplate.opsForValue().get(ct.getTeacherId())==null){
|
if(redisTemplate.opsForValue().get(ct.getTeacherId())==null){
|
||||||
List<String>list=new ArrayList<>();
|
List<String>list=new ArrayList<>();
|
||||||
@@ -214,11 +212,11 @@ public class StudyCourseApi extends ApiBaseController{
|
|||||||
redisTemplate.opsForValue().set(teacherVo.get(0).getTeacherId(), teacherVo.get(0).getStatus());
|
redisTemplate.opsForValue().set(teacherVo.get(0).getTeacherId(), teacherVo.get(0).getStatus());
|
||||||
//设置过期时间为1天
|
//设置过期时间为1天
|
||||||
redisTemplate.expire(teacherVo.get(0).getTeacherId(), 24 * 60 * 60, TimeUnit.SECONDS);
|
redisTemplate.expire(teacherVo.get(0).getTeacherId(), 24 * 60 * 60, TimeUnit.SECONDS);
|
||||||
if (Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1") && ( t==null || t.getTeacherType() == 1)){
|
if (Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1")){
|
||||||
ct.setTeacherName("BOE教师");
|
ct.setTeacherName("BOE教师");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1") && ( t==null || t.getTeacherType() == 1)){
|
if (Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1")){
|
||||||
ct.setTeacherName("BOE教师");
|
ct.setTeacherName("BOE教师");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,20 +95,20 @@ public class PhpOnlineCourseDao extends BaseDao<PhpOnlineDto> {
|
|||||||
userBasicDataBase = "userbasic";
|
userBasicDataBase = "userbasic";
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> userIds = objectList1.stream().map(objects -> String.valueOf(objects[1])).distinct().collect(Collectors.toList());
|
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", userIds);
|
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)) {
|
if (CollUtil.isEmpty(objectList1)) {
|
||||||
log.info("新系统用户数据不存在");
|
log.info("新系统用户数据不存在");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<Object, Object> userIdToKidMap = objectList2.stream().collect(Collectors.toMap(object -> object[0], object -> object[1]));
|
Map<Object, Object> kidAndUserIdMap = objectList2.stream().collect(Collectors.toMap(object -> object[0], object -> object[1]));
|
||||||
|
|
||||||
// 设置新系统用户ID
|
// 设置新系统用户ID
|
||||||
recentLearnRecordList = recentLearnRecordList.stream()
|
recentLearnRecordList = recentLearnRecordList.stream()
|
||||||
.map(phpOnlineDto -> {
|
.map(phpOnlineDto -> {
|
||||||
Object userIdOfJavaObj = userIdToKidMap.get(phpOnlineDto.getUserIdOfPhp());
|
Object userIdOfJavaObj = kidAndUserIdMap.get(phpOnlineDto.getUserIdOfPhp());
|
||||||
if (userIdOfJavaObj != null) {
|
if (userIdOfJavaObj != null) {
|
||||||
phpOnlineDto.setUserIdOfJava(userIdOfJavaObj.toString());
|
phpOnlineDto.setUserIdOfJava(userIdOfJavaObj.toString());
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,6 @@ public class PhpOnlineCourseDao extends BaseDao<PhpOnlineDto> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 拼接获取所有新系统用户id,这里不选择与上面的联表查询,有效率问题
|
// 拼接获取所有新系统用户id,这里不选择与上面的联表查询,有效率问题
|
||||||
|
|
||||||
String userBasicDataBase;
|
String userBasicDataBase;
|
||||||
if (activeProfile.equals("pro")) {
|
if (activeProfile.equals("pro")) {
|
||||||
userBasicDataBase = "user_basic";
|
userBasicDataBase = "user_basic";
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
package com.xboe.system.api;
|
package com.xboe.system.api;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -14,6 +11,11 @@ import java.util.Set;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
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.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@@ -115,8 +117,23 @@ public class SysUploaderApi extends ApiBaseController{
|
|||||||
// ex.printStackTrace();
|
// ex.printStackTrace();
|
||||||
log.error("处理失败",ex);
|
log.error("处理失败",ex);
|
||||||
}
|
}
|
||||||
|
Long ls = 0L;
|
||||||
return wrap(xur);
|
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) {
|
} catch (Exception e) {
|
||||||
log.error("upload file error ",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;
|
||||||
|
}
|
||||||
@@ -1,102 +1,159 @@
|
|||||||
boe:
|
|
||||||
domain: http://192.168.0.253
|
|
||||||
spring:
|
spring:
|
||||||
|
# application.yml
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 1000MB
|
max-file-size: 500MB
|
||||||
max-request-size: 1000MB
|
max-request-size: 500MB
|
||||||
web:
|
|
||||||
resources:
|
|
||||||
static-locations: file:E:/Projects/BOE/java/static
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
server-addr: 192.168.0.253:8848
|
|
||||||
config:
|
|
||||||
server-addr: 192.168.0.253:8848
|
|
||||||
redis:
|
redis:
|
||||||
database: 1
|
database: 1
|
||||||
host: 192.168.0.253
|
host: 192.168.0.101
|
||||||
password: boe@123
|
password: boe@123
|
||||||
port: 6379
|
port: 6379
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
max-active: 8
|
||||||
|
min-idle: 0
|
||||||
|
max-idle: 30
|
||||||
|
max-wait: 10000ms
|
||||||
|
shutdown-timeout: 100ms
|
||||||
jpa:
|
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:
|
hibernate:
|
||||||
ddl-auto: none
|
ddl-auto: update
|
||||||
datasource:
|
datasource:
|
||||||
driverClassName: com.mysql.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://192.168.0.253:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
|
url: jdbc:mysql://192.168.0.101:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
|
||||||
username: root
|
username: root
|
||||||
password: boe#1234A
|
password: boe#1234A
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
web:
|
||||||
hikari:
|
resources:
|
||||||
auto-commit: true
|
static-locations: file:E:/Projects/BOE/10/static
|
||||||
minimum-idle: 5
|
server:
|
||||||
idle-timeout: 60000
|
port: 9090
|
||||||
connection-timeout: 30000
|
servlet:
|
||||||
max-lifetime: 1800000
|
multipart:
|
||||||
maximum-pool-size: 20
|
max-file-size: 500MB
|
||||||
logging:
|
max-request-size: 500MB
|
||||||
level:
|
session:
|
||||||
org:
|
timeout: 30m
|
||||||
hibernate:
|
encoding:
|
||||||
SQL: ERROR
|
charset: UTF-8
|
||||||
config: classpath:log/logback-@profileActive@.xml
|
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:
|
xboe:
|
||||||
api:
|
api:
|
||||||
cross_filter: true
|
cross_filter: true
|
||||||
|
local:
|
||||||
|
dev: true
|
||||||
upload:
|
upload:
|
||||||
file:
|
file:
|
||||||
temp_path: /tmp
|
temp_path: D:/Projects/BOE/10/static/temp
|
||||||
save_path: /home/www/elearning/upload
|
save_path: /home/www/elearning/upload
|
||||||
http_path: http://192.168.0.253/upload
|
http_path: http://127.0.0.1/upload
|
||||||
externalinterface:
|
externalinterface:
|
||||||
url:
|
url:
|
||||||
system: http://127.0.0.1:9091
|
system: http://localhost:9091
|
||||||
old:
|
old:
|
||||||
base:
|
base:
|
||||||
url: http://192.168.0.253
|
url: http://192.168.0.101
|
||||||
|
server:
|
||||||
|
userbasic:
|
||||||
|
url: http://192.168.0.101/userbasic
|
||||||
stat:
|
stat:
|
||||||
base:
|
base:
|
||||||
url: http://127.0.0.1:9080
|
url: http://127.0.0.1:9080
|
||||||
server:
|
|
||||||
userbasic:
|
|
||||||
url: http://192.168.0.253/userbasic
|
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
server:
|
server:
|
||||||
ip: 192.168.0.253
|
ip: 192.168.0.101
|
||||||
port: 9200
|
port: 9200
|
||||||
user:
|
user:
|
||||||
password:
|
password:
|
||||||
email:
|
email:
|
||||||
url: http://192.168.0.253/api/b1/email/send
|
url: http://192.168.0.101/api/b1/email/send
|
||||||
from: boeu_learning@boe.com.cn
|
from: boeu_learning@boe.com.cn
|
||||||
user:
|
user:
|
||||||
security:
|
security:
|
||||||
jasypt:
|
|
||||||
encryptor:
|
jasypt:
|
||||||
algorithm: PBEWithMD5AndDES
|
encryptor:
|
||||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
algorithm: PBEWithMD5AndDES
|
||||||
xxl:
|
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
||||||
job:
|
|
||||||
accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
|
boe:
|
||||||
admin:
|
domain: http://127.0.0.1
|
||||||
addresses: http://192.168.0.253/jobAdmin
|
|
||||||
executor:
|
ok:
|
||||||
appname: java-servers-job-api
|
http:
|
||||||
port: 9995
|
connect-timeout: 30
|
||||||
address:
|
read-timeout: 30
|
||||||
ip:
|
write-timeout: 30
|
||||||
logpath: /var/log/xxl-job/dw/
|
max-idle-connections: 200
|
||||||
logretentiondays: 30
|
keep-alive-duration: 300
|
||||||
aop-log-record:
|
|
||||||
#是否开启日志记录
|
|
||||||
enabled: false
|
|
||||||
#不进行拦截的包或者类
|
orgTree:
|
||||||
excludeClassNames:
|
orgTreeList: ${boe.domain}/userbasic/org/list
|
||||||
activemq:
|
orgChildTreeList: ${boe.domain}/userbasic/org/childOrgs
|
||||||
broker-url: tcp://192.168.0.253:61616
|
|
||||||
user: admin
|
userBasic:
|
||||||
password: admin
|
searchUserList: ${boe.domain}/userbasic/user/list
|
||||||
elasticsearch:
|
getUserBasicInfo: ${boe.domain}/userbasic/user/getUserBasicInfo
|
||||||
host: 192.168.0.253
|
getTeacherIds: ${boe.domain}/userbasic/user/getTeacherInfo
|
||||||
port: 9200
|
|
||||||
|
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,181 +0,0 @@
|
|||||||
spring:
|
|
||||||
# application.yml
|
|
||||||
servlet:
|
|
||||||
multipart:
|
|
||||||
max-file-size: 1000MB
|
|
||||||
max-request-size: 1000MB
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
server-addr: 10.251.129.51:8848
|
|
||||||
config:
|
|
||||||
server-addr: 10.251.129.51:8848
|
|
||||||
redis:
|
|
||||||
database: 1
|
|
||||||
host: 10.251.129.122
|
|
||||||
password: qwert!W588
|
|
||||||
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.129.126: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
|
|
||||||
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: /tmp
|
|
||||||
save_path: /home/www/elearning/upload
|
|
||||||
http_path: http://10.251.132.75/upload
|
|
||||||
externalinterface:
|
|
||||||
url:
|
|
||||||
system: http://localhost:9091
|
|
||||||
old:
|
|
||||||
base:
|
|
||||||
url: http://10.251.132.75
|
|
||||||
server:
|
|
||||||
userbasic:
|
|
||||||
url: http://10.251.132.75/userbasic
|
|
||||||
stat:
|
|
||||||
base:
|
|
||||||
url: http://10.251.132.75:9080
|
|
||||||
elasticsearch:
|
|
||||||
server:
|
|
||||||
ip: 10.251.129.21
|
|
||||||
port: 9200
|
|
||||||
user:
|
|
||||||
password:
|
|
||||||
email:
|
|
||||||
url: http://10.251.132.75/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://10.251.132.75
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
admin:
|
|
||||||
addresses: http://10.251.132.75/jobAdmin
|
|
||||||
accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
|
|
||||||
executor:
|
|
||||||
appname: java-servers-job-api
|
|
||||||
port: 9995
|
|
||||||
address:
|
|
||||||
ip:
|
|
||||||
logpath: /var/log/xxl-job/system/
|
|
||||||
logretentiondays: 30
|
|
||||||
|
|
||||||
aop-log-record:
|
|
||||||
#是否开启日志记录
|
|
||||||
enabled: true
|
|
||||||
#不进行拦截的包或者类
|
|
||||||
excludeClassNames:
|
|
||||||
activemq:
|
|
||||||
broker-url: tcp://10.251.129.51:61616
|
|
||||||
user: admin
|
|
||||||
password: admin
|
|
||||||
elasticsearch:
|
|
||||||
host: 10.251.129.21
|
|
||||||
port: 9200
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
spring:
|
|
||||||
servlet:
|
|
||||||
multipart:
|
|
||||||
max-file-size: 1000MB
|
|
||||||
max-request-size: 1000MB
|
|
||||||
web:
|
|
||||||
resources:
|
|
||||||
static-locations: file:E:/Projects/BOE/java/static
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
server-addr: 10.251.113.100:8848
|
|
||||||
config:
|
|
||||||
server-addr: 10.251.113.100:8848
|
|
||||||
redis:
|
|
||||||
database: 1
|
|
||||||
host: 10.251.88.213
|
|
||||||
password: qwert!W588
|
|
||||||
port: 6379
|
|
||||||
jpa:
|
|
||||||
hibernate:
|
|
||||||
ddl-auto: none
|
|
||||||
datasource:
|
|
||||||
driverClassName: com.mysql.jdbc.Driver
|
|
||||||
url: jdbc:mysql://10.251.88.216:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
|
|
||||||
username: admin
|
|
||||||
password: boeRds01
|
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
|
||||||
hikari:
|
|
||||||
auto-commit: true
|
|
||||||
minimum-idle: 5
|
|
||||||
idle-timeout: 60000
|
|
||||||
connection-timeout: 30000
|
|
||||||
max-lifetime: 1800000
|
|
||||||
maximum-pool-size: 20
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
org:
|
|
||||||
hibernate:
|
|
||||||
SQL: ERROR
|
|
||||||
config: classpath:log/logback-@profileActive@.xml
|
|
||||||
xboe:
|
|
||||||
api:
|
|
||||||
cross_filter: true
|
|
||||||
upload:
|
|
||||||
file:
|
|
||||||
temp_path: /tmp
|
|
||||||
save_path: /home/www/elearning/upload
|
|
||||||
http_path: https://u.boe.com/upload
|
|
||||||
externalinterface:
|
|
||||||
url:
|
|
||||||
system: http://127.0.0.1:9091
|
|
||||||
old:
|
|
||||||
base:
|
|
||||||
url: https://u.boe.com
|
|
||||||
stat:
|
|
||||||
base:
|
|
||||||
url: http://127.0.0.1:9080
|
|
||||||
server:
|
|
||||||
userbasic:
|
|
||||||
url: https://u.boe.com/userbasic
|
|
||||||
elasticsearch:
|
|
||||||
server:
|
|
||||||
ip: 10.251.88.218
|
|
||||||
port: 9200
|
|
||||||
user:
|
|
||||||
password:
|
|
||||||
email:
|
|
||||||
url: https://u.boe.com/api/b1/email/send
|
|
||||||
from: boeu_learning@boe.com.cn
|
|
||||||
user:
|
|
||||||
security:
|
|
||||||
jasypt:
|
|
||||||
encryptor:
|
|
||||||
algorithm: PBEWithMD5AndDES
|
|
||||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
|
|
||||||
admin:
|
|
||||||
addresses: http://u.boe.com/jobAdmin
|
|
||||||
executor:
|
|
||||||
appname: java-servers-job-api
|
|
||||||
port: 9995
|
|
||||||
address:
|
|
||||||
ip:
|
|
||||||
logpath: /var/log/xxl-job/dw/
|
|
||||||
logretentiondays: 30
|
|
||||||
aop-log-record:
|
|
||||||
#是否开启日志记录
|
|
||||||
enabled: true
|
|
||||||
#不进行拦截的包或者类
|
|
||||||
excludeClassNames:
|
|
||||||
activemq:
|
|
||||||
broker-url: tcp://10.251.113.100:61616
|
|
||||||
user: admin
|
|
||||||
password: admin
|
|
||||||
elasticsearch:
|
|
||||||
host: 10.251.88.218
|
|
||||||
port: 9200
|
|
||||||
@@ -2,17 +2,11 @@ spring:
|
|||||||
# application.yml
|
# application.yml
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 1000MB
|
max-file-size: 500MB
|
||||||
max-request-size: 1000MB
|
max-request-size: 500MB
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
server-addr: 10.251.186.27:8848
|
|
||||||
config:
|
|
||||||
server-addr: 10.251.186.27:8848
|
|
||||||
redis:
|
redis:
|
||||||
database: 1
|
database: 1
|
||||||
host: 10.251.160.38
|
host: 10.251.186.27
|
||||||
password: qwert!W577
|
password: qwert!W577
|
||||||
port: 6379
|
port: 6379
|
||||||
lettuce:
|
lettuce:
|
||||||
@@ -42,6 +36,16 @@ spring:
|
|||||||
static-locations: file:E:/Projects/BOE/10/static
|
static-locations: file:E:/Projects/BOE/10/static
|
||||||
server:
|
server:
|
||||||
port: 9090
|
port: 9090
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
max-file-size: 500MB
|
||||||
|
max-request-size: 500MB
|
||||||
|
session:
|
||||||
|
timeout: 30m
|
||||||
|
encoding:
|
||||||
|
charset: UTF-8
|
||||||
|
enabled: true
|
||||||
|
force: true
|
||||||
tomcat:
|
tomcat:
|
||||||
uri-encoding: UTF-8
|
uri-encoding: UTF-8
|
||||||
servlet:
|
servlet:
|
||||||
@@ -82,29 +86,29 @@ xboe:
|
|||||||
dev: true
|
dev: true
|
||||||
upload:
|
upload:
|
||||||
file:
|
file:
|
||||||
temp_path: /tmp
|
temp_path: /Projects/BOE/10/static/temp
|
||||||
save_path: /home/www/elearning/upload
|
save_path: /home/www/elearning/upload
|
||||||
http_path: http://10.251.186.27/upload
|
http_path: http://127.0.0.1/upload
|
||||||
externalinterface:
|
externalinterface:
|
||||||
url:
|
url:
|
||||||
system: http://localhost:9091
|
system: http://localhost:9091
|
||||||
old:
|
old:
|
||||||
base:
|
base:
|
||||||
url: http://10.251.186.27
|
url: http://localhost
|
||||||
server:
|
server:
|
||||||
userbasic:
|
userbasic:
|
||||||
url: http://10.251.186.27/userbasic
|
url: http://localhost/userbasic
|
||||||
stat:
|
stat:
|
||||||
base:
|
base:
|
||||||
url: http://10.251.186.27:9080
|
url: http://localhost:9080
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
server:
|
server:
|
||||||
ip: 10.251.129.25
|
ip: 10.251.129.25
|
||||||
port: 9200
|
port: 9200
|
||||||
user: elastic
|
user:
|
||||||
password: Boe@es123
|
password:
|
||||||
email:
|
email:
|
||||||
url: http://10.251.186.27/api/b1/email/send
|
url: http://localhost/api/b1/email/send
|
||||||
from: boeu_learning@boe.com.cn
|
from: boeu_learning@boe.com.cn
|
||||||
user:
|
user:
|
||||||
security:
|
security:
|
||||||
@@ -115,7 +119,7 @@ jasypt:
|
|||||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
||||||
|
|
||||||
boe:
|
boe:
|
||||||
domain: http://10.251.186.27
|
domain: http://127.0.0.1
|
||||||
|
|
||||||
ok:
|
ok:
|
||||||
http:
|
http:
|
||||||
@@ -152,32 +156,4 @@ manageApi:
|
|||||||
editExam: ${boe.domain}/manageApi/admin/project/editExam
|
editExam: ${boe.domain}/manageApi/admin/project/editExam
|
||||||
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
||||||
coursesuilt:
|
coursesuilt:
|
||||||
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
admin:
|
|
||||||
addresses: http://10.251.186.27/jobAdmin
|
|
||||||
accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
|
|
||||||
executor:
|
|
||||||
appname: java-servers-job-api
|
|
||||||
port: 9995
|
|
||||||
address:
|
|
||||||
ip:
|
|
||||||
logpath: /var/log/xxl-job/system/
|
|
||||||
logretentiondays: 30
|
|
||||||
|
|
||||||
aop-log-record:
|
|
||||||
#是否开启日志记录
|
|
||||||
enabled: true
|
|
||||||
#不进行拦截的包或者类
|
|
||||||
excludeClassNames:
|
|
||||||
activemq:
|
|
||||||
broker-url: tcp://10.251.129.25:61616
|
|
||||||
user: admin
|
|
||||||
password: admin
|
|
||||||
elasticsearch:
|
|
||||||
host: 10.251.129.25
|
|
||||||
port: 9200
|
|
||||||
user: elastic
|
|
||||||
password: Boe@es123
|
|
||||||
@@ -1,35 +1,41 @@
|
|||||||
spring:
|
spring:
|
||||||
profiles:
|
# application.yml
|
||||||
active: dev
|
servlet:
|
||||||
application:
|
multipart:
|
||||||
name: boe-server-all
|
max-file-size: 500MB
|
||||||
|
max-request-size: 500MB
|
||||||
redis:
|
redis:
|
||||||
|
database: 1
|
||||||
|
host: 10.251.186.27
|
||||||
|
password: qwert!W577
|
||||||
|
port: 6379
|
||||||
lettuce:
|
lettuce:
|
||||||
pool:
|
pool:
|
||||||
max-active: 8
|
max-active: 8
|
||||||
min-idle: 0
|
min-idle: 0
|
||||||
max-idle: 30
|
max-idle: 30
|
||||||
max-wait: 10000ms
|
max-wait: 10000ms
|
||||||
shutdown-timeout: 100ms
|
shutdown-timeout: 100ms
|
||||||
jackson:
|
|
||||||
time-zone: GMT+8
|
|
||||||
mvc:
|
|
||||||
static-path-pattern: /cdn/**
|
|
||||||
jpa:
|
jpa:
|
||||||
database: MYSQL
|
database: MYSQL
|
||||||
show-sql: false
|
|
||||||
properties:
|
properties:
|
||||||
hibernate:
|
hibernate:
|
||||||
naming_strategy: org.hibernate.cfg.EJB3NamingStrategy
|
naming_strategy: org.hibernate.cfg.EJB3NamingStrategy
|
||||||
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||||
current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext
|
current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext
|
||||||
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
|
show-sql: true
|
||||||
logging:
|
hibernate:
|
||||||
config: classpath:log/logback-${spring.profiles.active}.xml
|
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:
|
server:
|
||||||
port: 9090
|
port: 9090
|
||||||
tomcat:
|
|
||||||
uri-encoding: UTF-8
|
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 500MB
|
max-file-size: 500MB
|
||||||
@@ -40,6 +46,80 @@ server:
|
|||||||
charset: UTF-8
|
charset: UTF-8
|
||||||
enabled: true
|
enabled: true
|
||||||
force: 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:
|
ok:
|
||||||
http:
|
http:
|
||||||
@@ -48,29 +128,32 @@ ok:
|
|||||||
write-timeout: 30
|
write-timeout: 30
|
||||||
max-idle-connections: 200
|
max-idle-connections: 200
|
||||||
keep-alive-duration: 300
|
keep-alive-duration: 300
|
||||||
boe:
|
|
||||||
domain: http://127.0.0.1
|
|
||||||
|
|
||||||
orgTree:
|
orgTree:
|
||||||
orgTreeList: ${boe.domain}/userbasic/org/list
|
orgTreeList: ${boe.domain}/userbasic/org/list
|
||||||
orgChildTreeList: ${boe.domain}/userbasic/org/childOrgs
|
orgChildTreeList: ${boe.domain}/userbasic/org/childOrgs
|
||||||
|
|
||||||
userBasic:
|
userBasic:
|
||||||
searchUserList: ${boe.domain}/userbasic/user/list
|
searchUserList: ${boe.domain}/userbasic/user/list
|
||||||
getTeacherIds: ${boe.domain}/userbasic/user/getTeacherInfo
|
|
||||||
getUserBasicInfo: ${boe.domain}/userbasic/user/getUserBasicInfo
|
getUserBasicInfo: ${boe.domain}/userbasic/user/getUserBasicInfo
|
||||||
|
getTeacherIds: ${boe.domain}/userbasic/user/getTeacherInfo
|
||||||
|
|
||||||
audience:
|
audience:
|
||||||
usersByAudienceList: ${boe.domain}/userbasic/audience/memberList
|
usersByAudienceList: ${boe.domain}/userbasic/audience/memberList
|
||||||
getOrgUsers: ${boe.domain}/userbasic/user/getOrgUsers
|
getOrgUsers: ${boe.domain}/userbasic/user/getOrgUsers
|
||||||
|
|
||||||
statApi:
|
statApi:
|
||||||
userdynamicList: ${boe.domain}/statApi/xboe/m/stat/userdynamic/list
|
userdynamicList: ${boe.domain}/statApi/xboe/m/stat/userdynamic/list
|
||||||
|
|
||||||
infrasApi:
|
infrasApi:
|
||||||
dict: ${boe.domain}/infrasApi/dict/list
|
dict: ${boe.domain}/infrasApi/dict/list
|
||||||
|
|
||||||
manageApi:
|
manageApi:
|
||||||
stu:
|
stu:
|
||||||
offcourse: ${boe.domain}/manageApi/stu/offcourse/getOffCourseId
|
offcourse: ${boe.domain}/manageApi/stu/offcourse/getOffCourseId
|
||||||
editExam: ${boe.domain}/manageApi/admin/project/editExam
|
editExam: ${boe.domain}/manageApi/admin/project/editExam
|
||||||
coursesuilt:
|
|
||||||
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
||||||
updateOrSaveCourse: ${boe.domain}/manageApi/admin/teacherRecord/updateOrSaveCourse
|
coursesuilt:
|
||||||
syncCourseStudent: ${boe.domain}/manageApi/admin/teacherRecord/syncCourseStudent
|
getStudyStatus: ${boe.domain}/manageApi/stu/project/completeStatus
|
||||||
syncOnLineScore: ${boe.domain}/manageApi/admin/teacherRecord/syncOnLineScore
|
|
||||||
updateOnLineStatua: ${boe.domain}/manageApi/admin/teacherRecord/updateOnLineStatua
|
|
||||||
24
servers/boe-server-all/src/main/resources/bootstrap.yml
Normal file
24
servers/boe-server-all/src/main/resources/bootstrap.yml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: boe-server-all
|
||||||
|
# profiles:
|
||||||
|
# active: test
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
server-addr: 10.251.186.27:8848
|
||||||
|
config:
|
||||||
|
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
|
||||||
|
# group: COMMON_GROUP
|
||||||
|
# refresh: true
|
||||||
@@ -52,7 +52,4 @@
|
|||||||
<appender-ref ref="debug"/>
|
<appender-ref ref="debug"/>
|
||||||
<appender-ref ref="error"/>
|
<appender-ref ref="error"/>
|
||||||
</root>
|
</root>
|
||||||
<root level="INFO">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</root>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -50,7 +50,6 @@
|
|||||||
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
||||||
<root level="INFO">
|
<root level="INFO">
|
||||||
<appender-ref ref="info"/>
|
<appender-ref ref="info"/>
|
||||||
<appender-ref ref="console"/>
|
|
||||||
<!-- <appender-ref ref="error"/> -->
|
<!-- <appender-ref ref="error"/> -->
|
||||||
</root>
|
</root>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration debug="false" scan="false">
|
|
||||||
<springProperty scop="context" name="spring.application.name" source="spring.application.name" defaultValue=""/>
|
|
||||||
<property name="log.path" value="/home/logs/${spring.application.name}"/>
|
|
||||||
<!-- 彩色日志格式 -->
|
|
||||||
<property name="CONSOLE_LOG_PATTERN"
|
|
||||||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
|
||||||
<!-- 彩色日志依赖的渲染类 -->
|
|
||||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
|
|
||||||
<conversionRule conversionWord="wex"
|
|
||||||
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
|
|
||||||
<conversionRule conversionWord="wEx"
|
|
||||||
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
|
|
||||||
<!-- Console log output -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Log file debug output -->
|
|
||||||
<appender name="info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/debug.log</file>
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
||||||
<fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
||||||
<maxFileSize>50MB</maxFileSize>
|
|
||||||
<maxHistory>30</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Log file error output -->
|
|
||||||
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
||||||
<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
||||||
<maxFileSize>50MB</maxFileSize>
|
|
||||||
<maxHistory>30</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
||||||
<level>ERROR</level>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
|
||||||
<root level="INFO">
|
|
||||||
<appender-ref ref="info"/>
|
|
||||||
<!-- <appender-ref ref="console"/>-->
|
|
||||||
<!-- <appender-ref ref="error"/> -->
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
||||||
@@ -51,6 +51,5 @@
|
|||||||
<root level="INFO">
|
<root level="INFO">
|
||||||
<appender-ref ref="debug"/>
|
<appender-ref ref="debug"/>
|
||||||
<appender-ref ref="error"/>
|
<appender-ref ref="error"/>
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</root>
|
</root>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>application-*.yml</include>
|
<include>application-${profileActive}.yml</include>
|
||||||
<include>application.yml</include>
|
<include>application.yml</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
@@ -136,9 +136,9 @@
|
|||||||
</build>
|
</build>
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>prod</id>
|
<id>pro</id>
|
||||||
<properties>
|
<properties>
|
||||||
<profileActive>prod</profileActive>
|
<profileActive>pro</profileActive>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
# application-pro.yml
|
# application-dev.yml
|
||||||
spring:
|
spring:
|
||||||
redis:
|
redis:
|
||||||
database: 1
|
database: 2
|
||||||
host: 192.168.0.253
|
|
||||||
password: boe@123
|
|
||||||
port: 6379
|
port: 6379
|
||||||
|
host: 192.168.0.101
|
||||||
|
password: boe@123
|
||||||
jpa:
|
jpa:
|
||||||
hibernate:
|
hibernate:
|
||||||
ddl-auto: update
|
ddl-auto: none
|
||||||
open-in-view: false
|
open-in-view: false
|
||||||
properties:
|
properties:
|
||||||
hibernate:
|
hibernate:
|
||||||
@@ -16,46 +16,41 @@ spring:
|
|||||||
driverClassName: com.mysql.jdbc.Driver
|
driverClassName: com.mysql.jdbc.Driver
|
||||||
db1:
|
db1:
|
||||||
driverClassName: com.mysql.jdbc.Driver
|
driverClassName: com.mysql.jdbc.Driver
|
||||||
jdbc-url: jdbc:mysql://192.168.0.253:3306/boe_basic?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
|
jdbc-url: jdbc:mysql://192.168.0.101:3306/boe_basic?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
|
||||||
username: root
|
username: root
|
||||||
password: boe#1234A
|
password: boe#1234A
|
||||||
db2:
|
db2:
|
||||||
driverClassName: com.mysql.jdbc.Driver
|
driverClassName: com.mysql.jdbc.Driver
|
||||||
jdbc-url: jdbc:mysql://192.168.0.253:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
|
jdbc-url: jdbc:mysql://192.168.0.101:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
|
||||||
username: root
|
username: root
|
||||||
password: boe#1234A
|
password: boe#1234A
|
||||||
|
web:
|
||||||
web:
|
resources:
|
||||||
resources:
|
static-locations: file:E:/Projects/BOE/java/static
|
||||||
static-locations: file:E:/Projects/BOE/java/static
|
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
org:
|
org:
|
||||||
hibernate:
|
hibernate:
|
||||||
SQL: ERROR
|
SQL: DEBUG
|
||||||
# type:
|
type:
|
||||||
# descriptor:
|
descriptor:
|
||||||
# sql:
|
sql:
|
||||||
# BasicBinder: TRACE
|
BasicBinder: TRACE
|
||||||
config: classpath:log/logback-dev.xml
|
config: classpath:log/logback-dev.xml
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
xboe:
|
xboe:
|
||||||
api:
|
|
||||||
cross_filter: true
|
|
||||||
upload:
|
upload:
|
||||||
file:
|
file:
|
||||||
temp_path: /tmp
|
temp_path: E:/Projects/BOE/java/static/temp
|
||||||
save_path: /home/www/elearning/upload
|
save_path: E:/Projects/BOE/java/static/upload
|
||||||
http_path: http://192.168.0.253/upload
|
http_path: http://localhost:9090/upload
|
||||||
inner:
|
inner:
|
||||||
data:
|
data:
|
||||||
sync:
|
sync:
|
||||||
baseurl: http://127.0.0.1:9090
|
baseurl: http://localhost:9090
|
||||||
|
|
||||||
jasypt:
|
jasypt:
|
||||||
encryptor:
|
encryptor:
|
||||||
algorithm: PBEWithMD5AndDES
|
algorithm: PBEWithMD5AndDES
|
||||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
# application-pro.yml
|
# application-pro.yml
|
||||||
spring:
|
spring:
|
||||||
|
profiles:
|
||||||
|
active: pro
|
||||||
redis:
|
redis:
|
||||||
database: 1
|
database: 3
|
||||||
host: 10.251.88.213
|
host: 10.251.88.213
|
||||||
password: qwert!W588
|
password: qwert!W588
|
||||||
port: 6379
|
port: 6379
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# application.yml
|
# application.yml
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: @profileActive@
|
||||||
application:
|
application:
|
||||||
name: boe-server-basic
|
name: boe-server-basic
|
||||||
jackson:
|
jackson:
|
||||||
@@ -62,4 +62,4 @@ ok:
|
|||||||
|
|
||||||
# 设置logback.xml位置
|
# 设置logback.xml位置
|
||||||
logging:
|
logging:
|
||||||
config: classpath:log/logback-${spring.profiles.active}.xml
|
config: classpath:log/logback-@profileActive@.xml
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration debug="false" scan="false">
|
|
||||||
<springProperty scop="context" name="spring.application.name" source="spring.application.name" defaultValue=""/>
|
|
||||||
<property name="log.path" value="/home/logs/${spring.application.name}"/>
|
|
||||||
<!-- 彩色日志格式 -->
|
|
||||||
<property name="CONSOLE_LOG_PATTERN"
|
|
||||||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
|
||||||
<!-- 彩色日志依赖的渲染类 -->
|
|
||||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
|
|
||||||
<conversionRule conversionWord="wex"
|
|
||||||
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
|
|
||||||
<conversionRule conversionWord="wEx"
|
|
||||||
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
|
|
||||||
<!-- Console log output -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Log file debug output -->
|
|
||||||
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/debug.log</file>
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
||||||
<fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
||||||
<maxFileSize>50MB</maxFileSize>
|
|
||||||
<maxHistory>30</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Log file error output -->
|
|
||||||
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
|
||||||
<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
|
||||||
<maxFileSize>50MB</maxFileSize>
|
|
||||||
<maxHistory>30</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
||||||
<level>ERROR</level>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
|
||||||
<root level="WARN">
|
|
||||||
<appender-ref ref="debug"/>
|
|
||||||
<appender-ref ref="error"/>
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
||||||
Reference in New Issue
Block a user