Compare commits

...

23 Commits

Author SHA1 Message Date
sunhonglai
cdf9698f71 修改注解 2025-04-07 15:09:04 +08:00
sunhonglai
74bcec72bc 修改学习时长取值 2025-04-01 09:59:59 +08:00
sunhonglai
b8c171bf86 Merge branch '250331-bugfix-shl-newmaster' into 250331-bugfix-shl
# Conflicts:
#	servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java
2025-04-01 09:51:14 +08:00
sunhonglai
175e7f6c28 查询课程和修改课程学习上报进度,增加视频播放进度的处理 2025-04-01 08:32:41 +08:00
sunhonglai
5705bb8529 查询课程和修改课程学习上报进度,增加视频播放进度的处理 2025-03-31 13:14:14 +08:00
sunhonglai
87e5dd81f8 查询课程和修改课程学习上报进度,增加视频播放进度的处理 2025-03-31 11:27:13 +08:00
joshen
9924769bc8 Merge remote-tracking branch 'yx/master-20250227-lyc' into release-20250328-master 2025-03-29 12:38:10 +08:00
670788339
d4964ca7f1 日志 2025-03-29 12:22:11 +08:00
670788339
efdfa6f00c study-video-time 最后修改时间调整 2025-03-29 10:51:08 +08:00
joshen
ceb30f7f1d Merge remote-tracking branch 'yx/master-20250227-lyc' into release-20250328-master
# Conflicts:
#	servers/boe-server-all/src/main/java/com/xboe/module/course/entity/CourseTeacher.java
#	servers/boe-server-all/src/main/java/com/xboe/school/study/api/StudyCourseApi.java
2025-03-28 15:32:27 +08:00
joshen
60d891edcf Merge remote-tracking branch 'yx/250324-casebugfix-zsh' 2025-03-26 16:54:25 +08:00
emcchui
b9f00f2602 SZX-927:学员端-个人设置-手机号未同步到 2025-03-25 08:47:19 +08:00
emcchui
77884d3e7e SZX-927:学员端-个人设置-手机号未同步到 2025-03-25 08:39:48 +08:00
emcchui
3a9a8d86af SZX-927:学员端-个人设置-手机号未同步到 2025-03-24 18:10:41 +08:00
emcchui
3a139925c9 SZX-927:学员端-个人设置-手机号未同步到 2025-03-24 17:41:22 +08:00
emcchui
fdc0c7959e SZX-927:学员端-个人设置-手机号未同步到 2025-03-24 16:27:50 +08:00
sunhonglai
a1352ec813 修改后端返回分页结果 2025-03-24 09:23:06 +08:00
670788339
c9db78ea94 在线课-外部讲师 补充 2025-03-21 09:42:02 +08:00
670788339
f33de0c326 在线课-外部讲师 2025-03-20 20:57:49 +08:00
670788339
4be72391ad 在线课-外部讲师报错 添加讲师类型 2025-03-20 17:37:04 +08:00
670788339
3d9b26982c 在线课-外部讲师报错 2025-03-18 11:49:53 +08:00
emcchui
a65fa797cc dev 2025-03-16 13:29:06 +08:00
emcchui
feba3237ab dev 2025-03-16 13:27:05 +08:00
10 changed files with 218 additions and 174 deletions

View File

@@ -2,11 +2,16 @@ 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;
@@ -39,6 +44,9 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
@Autowired @Autowired
TeacherDao teacherDao; TeacherDao teacherDao;
@Resource
private CacheManager cacheManager;
@Override @Override
@Transactional @Transactional
@@ -59,6 +67,8 @@ 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 {
@@ -71,14 +81,18 @@ 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才会更新
@@ -106,9 +120,17 @@ 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());

View File

@@ -314,8 +314,10 @@ 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")){ if(Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1") && ( t==null || t.getTeacherType() == 1)){
ct.setTeacherName("BOE教师"); ct.setTeacherName("BOE教师");
} }
teacherCourseDto.setCourseId(ct.getCourseId()); teacherCourseDto.setCourseId(ct.getCourseId());
@@ -327,13 +329,15 @@ 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());
teacherCourseDto.setUserNo(user.getUserNo()); if(user!=null){
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")){ if(Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1") && ( t==null || t.getTeacherType() == 1)){
ct.setTeacherName("BOE教师"); ct.setTeacherName("BOE教师");
} }
teacherCourseDto.setCourseId(ct.getCourseId()); teacherCourseDto.setCourseId(ct.getCourseId());
@@ -345,7 +349,9 @@ 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());
teacherCourseDto.setUserNo(user.getUserNo()); if(user!=null){
teacherCourseDto.setUserNo(user.getUserNo());
}
teacherCourseDtos.add(teacherCourseDto); teacherCourseDtos.add(teacherCourseDto);
} }
} }

View File

@@ -448,6 +448,7 @@ public class CourseServiceImpl implements ICourseService {
List<Course> paginate = paginate(listByFilters2, pageIndex, pageSize); List<Course> paginate = paginate(listByFilters2, pageIndex, pageSize);
PageList<Course> rs = new PageList<>(); PageList<Course> rs = new PageList<>();
rs.setCount(listByFilters2.size()); rs.setCount(listByFilters2.size());
rs.setPageSize(pageSize);
rs.setList(paginate); rs.setList(paginate);
return rs; return rs;
} }

View File

@@ -1,9 +1,14 @@
package com.xboe.school.study.api; package com.xboe.school.study.api;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.nacos.shaded.com.google.common.util.concurrent.RateLimiter; import com.alibaba.nacos.shaded.com.google.common.util.concurrent.RateLimiter;
import com.xboe.api.ThirdApi; import com.xboe.api.ThirdApi;
import com.xboe.constants.CacheName; import com.xboe.constants.CacheName;
@@ -214,11 +219,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.getTeacherType() == 1 ){ if (Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1") && ( t==null || t.getTeacherType() == 1)){
ct.setTeacherName("BOE教师"); ct.setTeacherName("BOE教师");
} }
} }
if (Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1") && t.getTeacherType() == 1 ){ if (Objects.equals(redisTemplate.opsForValue().get(ct.getTeacherId()), "1") && ( t==null || t.getTeacherType() == 1)){
ct.setTeacherName("BOE教师"); ct.setTeacherName("BOE教师");
} }
} }
@@ -253,6 +258,49 @@ public class StudyCourseApi extends ApiBaseController{
rs.put("progress", sc.getProgress()); rs.put("progress", sc.getProgress());
//查询上次学习的是什么资源。查询用户的学习情况 //查询上次学习的是什么资源。查询用户的学习情况
List<StudyCourseItem> items=studyService.findByStudyId(sc.getId()); List<StudyCourseItem> items=studyService.findByStudyId(sc.getId());
// 和内容匹配,根据内容的视频时长,计算学习进度
if(CollectionUtil.isNotEmpty(items) && CollectionUtil.isNotEmpty(cclist)){
// 根据ID转换map
Map<String, CourseContent> contentMap = cclist.stream().collect(Collectors.toMap(CourseContent::getId, Function.identity()));
for (StudyCourseItem item : items) {
CourseContent content = contentMap.get(item.getContentId());
if(null == content){
continue;
}
if(null==item.getLastStudyTime()
|| item.getLastStudyTime()<=0
|| null==content.getDuration()
|| content.getDuration()<=0){
continue;
}
// 查询redis上面的key并解析value获取到lastStudyTime
String lastActive = redisTemplate.opsForValue().get("studyContentId:" + item.getId() + ":last_active");
if (StringUtil.isNotBlank(lastActive)) {
String[] parts = lastActive.split("&");
if (parts.length == 2) {
int lastStudyTimeRedis = Integer.parseInt(parts[0]);
log.info("study-video-time-redis获取---lastStudyTimeRedis = " + lastStudyTimeRedis);
if(lastStudyTimeRedis>0){
item.setLastStudyTime(lastStudyTimeRedis);
}
}
}
BigDecimal lastStudyTime = new BigDecimal(item.getLastStudyTime());
BigDecimal duration = new BigDecimal(content.getDuration());
BigDecimal progress = lastStudyTime.divide(duration, 10, RoundingMode.HALF_UP);
if(progress.compareTo(BigDecimal.ZERO) < 0){
progress = BigDecimal.ZERO;
}else if(progress.compareTo(BigDecimal.ONE) > 0){
progress = BigDecimal.ONE;
}
item.setProgressVideo(progress);
}
}
rs.put("contentStudys",items);//学习的内容 rs.put("contentStudys",items);//学习的内容
} }

View File

@@ -10,6 +10,8 @@ import org.springframework.data.redis.core.ScanOptions;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Objects; import java.util.Objects;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@@ -33,7 +35,7 @@ public class StudyCourseTask {
public void saveStudyCourseItemLastTime() { public void saveStudyCourseItemLastTime() {
// 1. 定义匹配模式匹配所有目标key // 1. 定义匹配模式匹配所有目标key
final String KEY_PATTERN = "studyContentId:*:last_active"; final String KEY_PATTERN = "studyContentId:*:last_active";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
// 2. 使用SCAN安全遍历避免阻塞 // 2. 使用SCAN安全遍历避免阻塞
ScanOptions options = ScanOptions.scanOptions() ScanOptions options = ScanOptions.scanOptions()
.match(KEY_PATTERN) .match(KEY_PATTERN)
@@ -59,12 +61,17 @@ public class StudyCourseTask {
String studyContentId = parts[1]; String studyContentId = parts[1];
// 7. 获取存储的时间点(示例逻辑) // 7. 获取存储的时间点(示例逻辑)
String lastStudyTimeStr = redisTemplate.opsForValue().get(redisKey); String redisValue = redisTemplate.opsForValue().get(redisKey);
if (lastStudyTimeStr == null) continue; if (redisValue == null) continue;
int lastStudyTime = Integer.parseInt(lastStudyTimeStr); String[] partValues = redisValue.split("&");
int lastStudyTime = Integer.parseInt(partValues[0]);
LocalDateTime timestamp = null;
if (partValues.length >= 2){
timestamp = LocalDateTime.parse(partValues[1], formatter);
}
// 8. 更新数据库(调用已有服务方法) // 8. 更新数据库(调用已有服务方法)
studyService.updateStudyCourseItemLastTime(studyContentId, lastStudyTime, "system_job"); studyService.updateStudyCourseItemLastTime(studyContentId, lastStudyTime, timestamp);
// 9. 删除Redis键原子操作 // 9. 删除Redis键原子操作
redisTemplate.delete(redisKey); redisTemplate.delete(redisKey);

View File

@@ -1,10 +1,12 @@
package com.xboe.school.study.entity; package com.xboe.school.study.entity;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.xboe.core.SysConstant; import com.xboe.core.SysConstant;
@@ -128,5 +130,11 @@ public class StudyCourseItem extends IdEntity {
*/ */
@Column(name = "status",length=1) @Column(name = "status",length=1)
private Integer status; private Integer status;
/**
* 视频播放进度
* */
@Transient
private BigDecimal progressVideo;
} }

View File

@@ -1,5 +1,6 @@
package com.xboe.school.study.service; package com.xboe.school.study.service;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -7,7 +8,6 @@ import com.xboe.common.PageList;
import com.xboe.school.study.dto.StudyContentDto; import com.xboe.school.study.dto.StudyContentDto;
import com.xboe.school.study.entity.StudyCourseItem; import com.xboe.school.study.entity.StudyCourseItem;
import com.xboe.school.study.entity.StudyTime; import com.xboe.school.study.entity.StudyTime;
import com.xboe.system.user.entity.User;
/** /**
* 学习情况处理,比较综合一个处理类 * 学习情况处理,比较综合一个处理类
@@ -35,11 +35,12 @@ public interface IStudyService {
/** /**
* 更新最后的学习时间,及学习时间点 * 更新最后的学习时间,及学习时间点
*
* @param studyContentId * @param studyContentId
* @param lastStudyTime * @param lastStudyTime
* @param aid * @param aid
*/ */
void updateLastTime(String studyContentId,int lastStudyTime,String aid); void updateLastTime(String studyContentId, int lastStudyTime, String aid);
/** /**
* 资源学习记录 * 资源学习记录
@@ -99,5 +100,5 @@ public interface IStudyService {
List<StudyCourseItem> getList(String courseId, String contentId, String name, Integer status); List<StudyCourseItem> getList(String courseId, String contentId, String name, Integer status);
void updateStudyCourseItemLastTime(String studyContentId, int lastStudyTime, String systemJob); void updateStudyCourseItemLastTime(String studyContentId, int lastStudyTime, LocalDateTime timestamp);
} }

View File

@@ -10,10 +10,6 @@ import java.util.Map;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import com.xboe.module.article.entity.Article;
import com.xboe.module.interaction.entity.Shares;
import com.xboe.school.study.entity.StudyCourse;
import com.xboe.system.user.entity.User;
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.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
@@ -330,19 +326,25 @@ public class StudyServiceImpl implements IStudyService{
// 更新 前端传输已学习时长 // 更新 前端传输已学习时长
@Override @Override
public void updateLastTime(String studyContentId, int lastStudyTime,String aid) { public void updateLastTime(String studyContentId, int lastStudyTime,String aid) {
LocalDateTime now = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
String value = lastStudyTime + "&" + now.format(formatter); // 使用ISO8601时间格式
log.info("-study-video-time-----value = " + value);
// 20250303 优化 多次更新改一次更新 // 20250303 优化 多次更新改一次更新
// 更新Redis中的最后活跃时间带30秒过期 // 更新Redis中的最后活跃时间带30秒过期
redisTemplate.opsForValue().set( redisTemplate.opsForValue().set(
"studyContentId:" + studyContentId + ":last_active", "studyContentId:" + studyContentId + ":last_active",
String.valueOf(lastStudyTime), value,
Duration.ofSeconds(2592000) Duration.ofSeconds(2592000)
); );
log.info("-study-video-time-redis保存---value = " + value);
// Duration.ofDays(30) 也就是 2592000秒 // Duration.ofDays(30) 也就是 2592000秒
} }
@Override @Override
@Transactional @Transactional
public void updateStudyCourseItemLastTime(String studyContentId, int lastStudyTime,String aid) { public void updateStudyCourseItemLastTime(String studyContentId, int lastStudyTime,LocalDateTime timestamp) {
log.info("-study-video-time-定时---studyContentId = " + studyContentId + ",lastStudyTime = " + lastStudyTime + ", timestamp = " + timestamp);
// 更新最后的学习时间点 // 更新最后的学习时间点
LocalDateTime now=LocalDateTime.now(); LocalDateTime now=LocalDateTime.now();
UpdateBuilder update=UpdateBuilder.from(StudyCourseItem.class); UpdateBuilder update=UpdateBuilder.from(StudyCourseItem.class);
@@ -350,8 +352,9 @@ public class StudyServiceImpl implements IStudyService{
//只记录时间长的时候的处理 //只记录时间长的时候的处理
update.addFilter(FieldFilters.lt("lastStudyTime", lastStudyTime)); update.addFilter(FieldFilters.lt("lastStudyTime", lastStudyTime));
update.addUpdateField("lastStudyTime", lastStudyTime); update.addUpdateField("lastStudyTime", lastStudyTime);
update.addUpdateField("lastTime", now); update.addUpdateField("lastTime", timestamp==null ? now : timestamp);
scItemDao.update(update.builder()); scItemDao.update(update.builder());
log.info("-study-video-time-mysql保存---studyContentId = " + studyContentId);
} }
@Override @Override

View File

@@ -1,159 +1,102 @@
boe:
domain: http://192.168.0.253
spring: spring:
# application.yml
servlet: servlet:
multipart: multipart:
max-file-size: 500MB max-file-size: 1000MB
max-request-size: 500MB max-request-size: 1000MB
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: web:
resources: resources:
static-locations: file:E:/Projects/BOE/10/static static-locations: file:E:/Projects/BOE/java/static
server: cloud:
port: 9090 nacos:
servlet: discovery:
multipart: server-addr: 192.168.0.253:8848
max-file-size: 500MB config:
max-request-size: 500MB server-addr: 192.168.0.253:8848
session: redis:
timeout: 30m database: 1
encoding: host: 192.168.0.253
charset: UTF-8 password: boe@123
enabled: true port: 6379
force: true jpa:
tomcat: hibernate:
uri-encoding: UTF-8 ddl-auto: none
servlet: datasource:
multipart: driverClassName: com.mysql.jdbc.Driver
maxFileSize: 1024MB url: jdbc:mysql://192.168.0.253:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
maxRequestSize: 1024MB username: root
mvc: password: boe#1234A
static-path-pattern: /cdn/** type: com.zaxxer.hikari.HikariDataSource
hikari:
#logging.level.org.hibernate.SQL=DEBUG auto-commit: true
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE minimum-idle: 5
#logging.config=classpath:log/logback-@profileActive@.xml idle-timeout: 60000
connection-timeout: 30000
# logging: max-lifetime: 1800000
# config: classpath:log/logback-${spring.profiles.active}.xml maximum-pool-size: 20
# level: logging:
# org: level:
# hibernate: org:
# SQL: DEBUG hibernate:
# type: SQL: ERROR
# descriptor: config: classpath:log/logback-@profileActive@.xml
# 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: D:/Projects/BOE/10/static/temp temp_path: /tmp
save_path: /home/www/elearning/upload save_path: /home/www/elearning/upload
http_path: http://127.0.0.1/upload http_path: http://192.168.0.253/upload
externalinterface: externalinterface:
url: url:
system: http://localhost:9091 system: http://127.0.0.1:9091
old: old:
base: base:
url: http://192.168.0.101 url: http://192.168.0.253
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.101 ip: 192.168.0.253
port: 9200 port: 9200
user: user:
password: password:
email: email:
url: http://192.168.0.101/api/b1/email/send url: http://192.168.0.253/api/b1/email/send
from: boeu_learning@boe.com.cn from: boeu_learning@boe.com.cn
user: user:
security: security:
jasypt:
jasypt: encryptor:
encryptor: algorithm: PBEWithMD5AndDES
algorithm: PBEWithMD5AndDES iv-generator-classname: org.jasypt.iv.NoIvGenerator
iv-generator-classname: org.jasypt.iv.NoIvGenerator xxl:
job:
boe: accessToken: 65ddc683-22f5-83b4-de3a-3c97a0a29af0
domain: http://127.0.0.1 admin:
addresses: http://192.168.0.253/jobAdmin
ok: executor:
http: appname: java-servers-job-api
connect-timeout: 30 port: 9995
read-timeout: 30 address:
write-timeout: 30 ip:
max-idle-connections: 200 logpath: /var/log/xxl-job/dw/
keep-alive-duration: 300 logretentiondays: 30
aop-log-record:
#是否开启日志记录
enabled: true
orgTree: #不进行拦截的包或者类
orgTreeList: ${boe.domain}/userbasic/org/list excludeClassNames:
orgChildTreeList: ${boe.domain}/userbasic/org/childOrgs activemq:
broker-url: tcp://192.168.0.253:61616
userBasic: user: admin
searchUserList: ${boe.domain}/userbasic/user/list password: admin
getUserBasicInfo: ${boe.domain}/userbasic/user/getUserBasicInfo elasticsearch:
getTeacherIds: ${boe.domain}/userbasic/user/getTeacherInfo host: 192.168.0.253
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

View File

@@ -1,13 +1,13 @@
# application-dev.yml # application-pro.yml
spring: spring:
redis: redis:
database: 2 database: 1
port: 6379 host: 192.168.0.253
host: 192.168.0.101
password: boe@123 password: boe@123
port: 6379
jpa: jpa:
hibernate: hibernate:
ddl-auto: none ddl-auto: update
open-in-view: false open-in-view: false
properties: properties:
hibernate: hibernate:
@@ -16,41 +16,46 @@ 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.101:3306/boe_basic?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull jdbc-url: jdbc:mysql://192.168.0.253: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.101:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull jdbc-url: jdbc:mysql://192.168.0.253:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull
username: root username: root
password: boe#1234A password: boe#1234A
web:
resources: web:
static-locations: file:E:/Projects/BOE/java/static resources:
static-locations: file:E:/Projects/BOE/java/static
logging: logging:
level: level:
org: org:
hibernate: hibernate:
SQL: DEBUG SQL: ERROR
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: E:/Projects/BOE/java/static/temp temp_path: /tmp
save_path: E:/Projects/BOE/java/static/upload save_path: /home/www/elearning/upload
http_path: http://localhost:9090/upload http_path: http://192.168.0.253/upload
inner: inner:
data: data:
sync: sync:
baseurl: http://localhost:9090 baseurl: http://127.0.0.1:9090
jasypt: jasypt:
encryptor: encryptor:
algorithm: PBEWithMD5AndDES algorithm: PBEWithMD5AndDES
iv-generator-classname: org.jasypt.iv.NoIvGenerator iv-generator-classname: org.jasypt.iv.NoIvGenerator