Compare commits

..

25 Commits

Author SHA1 Message Date
Wangxxz
fec28f5baf 讲师管理-查询讲师时加启用条件判断 2024-10-20 14:24:04 +08:00
nisen
18bb8a434a Merge branch 'master-0705' into 121-master 2024-09-05 14:57:17 +08:00
nisen
2ae3d99f21 Merge branch 'zcwy0823-llf' into master-0705 2024-08-23 19:44:02 +08:00
nisen
457597eabc Merge branch 'zcwy0823-llf' into master-0705 2024-08-23 19:28:25 +08:00
nisen
52a58a6c6f Merge branch 'zcwy0823-llf' into master-0705 2024-08-23 18:45:46 +08:00
nisen
23e63062e9 Merge branch 'zcwy0823-llf' into master-0705 2024-08-23 18:30:42 +08:00
nisen
3fc8ce614d Merge branch 'zcwy0823-llf' into master-0705 2024-08-23 18:00:57 +08:00
nisen
d4af5ba8d5 Merge branch 'zcwy0823-llf' into master-0705 2024-08-23 17:59:12 +08:00
nisen
cf64f0406f Merge branch 'zcwy0815-llf' into master-0705 2024-08-15 20:20:14 +08:00
zhaolongfei
df3b0b95c1 处理study接口,studyitemid返回值为空的问题 2024-08-15 20:19:27 +08:00
nisen
f5ff666c07 Merge branch 'zcwy0815-llf' into master-0705 2024-08-15 19:57:23 +08:00
zhaolongfei
731e62c89f 处理study接口,studyitemid返回值为空的问题 2024-08-15 19:44:23 +08:00
zhaolongfei
7fe53c026e 处理study接口,studyitemid返回值为空的问题 2024-08-15 19:26:10 +08:00
zhaolongfei
6492e3b0dd 处理study接口,studyitemid返回值为空的问题 2024-08-15 19:18:28 +08:00
zhaolongfei
30aab6eab4 处理study接口,studyitemid返回值为空的问题 2024-08-15 19:03:11 +08:00
670788339
61754d3852 放开redis 2024-08-15 16:26:47 +08:00
670788339
a26ee1c707 放开注释 2024-08-15 15:42:45 +08:00
670788339
1f0060c4dc 放开注释 2024-08-15 15:27:41 +08:00
670788339
6b0050286c 放开注释 2024-08-15 15:19:59 +08:00
670788339
2b07029aca 注释 2024-08-15 12:09:40 +08:00
670788339
d2d7fab96c 注释 2024-08-15 12:03:05 +08:00
670788339
be3bae969c study接口加redis过滤 2024-08-15 11:35:02 +08:00
670788339
8e1b7519ef study接口加redis过滤 2024-08-15 11:31:17 +08:00
670788339
bddb11caf8 study接口加redis过滤 2024-08-15 10:53:26 +08:00
joshen
92a4e509ef Merge branch 'master-0705' into 'master'
Master 0705

See merge request !116
2024-07-30 11:58:33 +08:00
4 changed files with 37 additions and 3 deletions

View File

@@ -142,6 +142,9 @@ public class AloneExamServiceImpl implements IAloneExamService{
if(StringUtils.isNotBlank(aea.getTestId())) {
query.addFilter(FieldFilters.eq("testId",aea.getTestId()));
}
if(StringUtils.isNotBlank(aea.getTestName())) {
query.addFilter(FieldFilters.eq("testName",aea.getTestName()));
}
if(StringUtils.isNotBlank(aea.getAid())) {
query.addFilter(FieldFilters.eq("aid",aea.getAid()));
}

View File

@@ -101,7 +101,7 @@ public class TeacherServiceImpl implements ITeacherService {
@Override
public List<Teacher> findByName(String name) {
String hql="Select t.id,t.name,u.userNo from "+Teacher.class.getSimpleName()+" t,"+User.class.getSimpleName()+" u ";
hql+=" where t.id=u.id and (t.name like '%"+name+"%' or u.userNo=?1)";
hql+=" where t.id=u.id and t.status = 1 and (t.name like '%"+name+"%' or u.userNo=?1)";
List<Teacher> teachers=new ArrayList<Teacher>();
try {
List<Object[]> list =dao.findListFields(hql,name);

View File

@@ -324,8 +324,19 @@ public class StudyCourseApi extends ApiBaseController{
if (StringUtils.isEmpty(token)) {
token = request.getHeader("token");
}
//检查是否已存在
StudyCourseItem item = studyService.checkHas(sci.getStudyId(),sci.getContentId());
// 20240815 特训营结营考试 临时代码
// if(item != null && redisTemplate.opsForValue().get(item.getId())==null){
// redisTemplate.opsForValue().set(item.getId(),item.getId());
// //设置过期时间为1天
// redisTemplate.expire(item.getId(), 60, TimeUnit.SECONDS);
// }else{
// return success("");
// }
if(item!=null) {
//如果记录存在但是进度不100无成情况就更新进度一期不会有这种情况
if(item.getProgress()<100 && sci.getProgress()>item.getProgress()) {
@@ -410,6 +421,14 @@ public class StudyCourseApi extends ApiBaseController{
StudyCourseItem item = studyService.checkHas(sci.getStudyId(),sci.getContentId());
if(item!=null) {
//如果记录存在但是进度不到100未完成情况就更新进度一期不会有这种情况
// 20240815 特训营结营考试 临时代码
// if(item != null && redisTemplate.opsForValue().get(item.getId())==null){
// redisTemplate.opsForValue().set(item.getId(),item.getId());
// //设置过期时间为1天
// redisTemplate.expire(item.getId(), 60, TimeUnit.SECONDS);
// }else{
// return success("");
// }
if(item.getProgress()<100) {
studyService.updateProcess(item.getId(),sci.getStudyId(),sci.getCourseId(), sci.getContentTotal(),100,token);
}
@@ -515,6 +534,14 @@ public class StudyCourseApi extends ApiBaseController{
token = request.getHeader("token");
}
try {
// 20240815 特训营结营考试 临时代码
// if(itemId != null && redisTemplate.opsForValue().get(itemId)==null){
// redisTemplate.opsForValue().set(itemId,itemId);
// //设置过期时间为1天
// redisTemplate.expire(itemId, 60, TimeUnit.SECONDS);
// }else{
// return success(true);
// }
studyService.finishVideoStudyItem(itemId, studyId,courseId,cnum,token);
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(studyId ,courseId, token);
log.info("在线课学习记录"+allUserList);

View File

@@ -98,8 +98,12 @@ public class StudyServiceImpl implements IStudyService{
//sci.setProgress(100);//直接设置为学习完成
sci.setLastTime(ldt);
scItemDao.saveOrUpdate(sci);
dto.setStudyItemId(sci.getId());
if (sci.getId() != null){
dto.setStudyItemId(sci.getId());
}else {
log.info("学习记录插入失败"+sci.getId());
throw new IllegalArgumentException("学习记录插入失败");
}
//检查是否全部学习完成
scDao.finishCheck(dto.getStudyId(),dto.getCourseId(),dto.getContentTotal(),token);