考证辅导

beetlsql3-dev
Mlxa0324 2 years ago
parent 455f541aff
commit 57e33792f5

@ -97,7 +97,7 @@ public class HttpRequestLocal {
}); });
String currentThreadInfo = Thread.currentThread().getName() + "@" + Thread.currentThread().getId(); String currentThreadInfo = Thread.currentThread().getName() + "@" + Thread.currentThread().getId();
log.info(currentThreadInfo + " 读取到redis中的session数量{}写入到java内存中", keys.size()); log.info(currentThreadInfo + " 从redis中读取session到java内存中数量{}", keys.size());
}); });
} }

@ -10,7 +10,6 @@ import com.ibeetl.jlw.web.query.CourseInfoQuery;
import com.ibeetl.jlw.web.query.ResourcesQuestionQuery; import com.ibeetl.jlw.web.query.ResourcesQuestionQuery;
import org.beetl.sql.core.engine.PageQuery; import org.beetl.sql.core.engine.PageQuery;
import org.beetl.sql.mapper.BaseMapper; import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.Param;
import org.beetl.sql.mapper.annotation.SqlResource; import org.beetl.sql.mapper.annotation.SqlResource;
import org.beetl.sql.mapper.annotation.Update; import org.beetl.sql.mapper.annotation.Update;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@ -35,10 +34,9 @@ public interface ResourcesQuestionDao extends BaseMapper<ResourcesQuestion>{
/** /**
* ID * ID
* @param courseInfoQuery * @param courseInfoQuery
* @param courseLabelTypePlural
* @return * @return
*/ */
List<QuestionTypeCountVO> getGroupQuestionTypeCount(CourseInfoQuery courseInfoQuery, @Param("courseLabelTypePlural") String courseLabelTypePlural); List<QuestionTypeCountVO> getGroupQuestionTypeCount(CourseInfoQuery courseInfoQuery);
int checkUnique(ResourcesQuestion question); int checkUnique(ResourcesQuestion question);

@ -1,5 +1,6 @@
package com.ibeetl.jlw.job; package com.ibeetl.jlw.job;
import cn.hutool.core.collection.CollUtil;
import com.ibeetl.jlw.dao.UniversitiesCollegesJurisdictionCurriculumResourcesDao; import com.ibeetl.jlw.dao.UniversitiesCollegesJurisdictionCurriculumResourcesDao;
import com.ibeetl.jlw.dao.UniversitiesCollegesJurisdictionExperimentalSystemDao; import com.ibeetl.jlw.dao.UniversitiesCollegesJurisdictionExperimentalSystemDao;
import com.ibeetl.jlw.entity.UniversitiesCollegesJurisdictionCurriculumResources; import com.ibeetl.jlw.entity.UniversitiesCollegesJurisdictionCurriculumResources;
@ -59,8 +60,9 @@ public class UpdateAuthApplicationAndResourcesJob implements Job {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
universitiesCollegesJurisdictionCurriculumResourcesService.updateBatchTemplate(resourcesUpdateList); universitiesCollegesJurisdictionCurriculumResourcesService.updateBatchTemplate(resourcesUpdateList);
log.info("已更新授权课程列表:{}", listJoin(resourcesUpdateList, UniversitiesCollegesJurisdictionCurriculumResources::getUniversitiesCollegesJurisdictionCurriculumResourcesId)); if (CollUtil.isNotEmpty(resourcesUpdateList)) {
log.info("已更新授权课程列表:{}", listJoin(resourcesUpdateList, UniversitiesCollegesJurisdictionCurriculumResources::getUniversitiesCollegesJurisdictionCurriculumResourcesId));
}
List<UniversitiesCollegesJurisdictionExperimentalSystem> systemUpdateList = experimentSystemsAllOverdueAuth.stream().map(item -> { List<UniversitiesCollegesJurisdictionExperimentalSystem> systemUpdateList = experimentSystemsAllOverdueAuth.stream().map(item -> {
UniversitiesCollegesJurisdictionExperimentalSystem o = new UniversitiesCollegesJurisdictionExperimentalSystem(); UniversitiesCollegesJurisdictionExperimentalSystem o = new UniversitiesCollegesJurisdictionExperimentalSystem();
@ -70,7 +72,9 @@ public class UpdateAuthApplicationAndResourcesJob implements Job {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
universitiesCollegesJurisdictionExperimentalSystemService.updateBatchTemplate(systemUpdateList); universitiesCollegesJurisdictionExperimentalSystemService.updateBatchTemplate(systemUpdateList);
log.info("已更新授权应用列表:{}", listJoin(systemUpdateList, UniversitiesCollegesJurisdictionExperimentalSystem::getUniversitiesCollegesJurisdictionExperimentalSystemId)); if (CollUtil.isNotEmpty(systemUpdateList)) {
log.info("已更新授权应用列表:{}", listJoin(systemUpdateList, UniversitiesCollegesJurisdictionExperimentalSystem::getUniversitiesCollegesJurisdictionExperimentalSystemId));
}
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();

@ -790,19 +790,20 @@ public class ResourcesQuestionService extends CoreBaseService<ResourcesQuestion>
* @return * @return
*/ */
public List<QuestionTypeCountVO> getGroupQuestionTypeCount(CourseInfoQuery courseInfoQuery) { public List<QuestionTypeCountVO> getGroupQuestionTypeCount(CourseInfoQuery courseInfoQuery) {
List<QuestionTypeCountVO> g = resourcesQuestionDao.getGroupQuestionTypeCount(courseInfoQuery, null); List<QuestionTypeCountVO> g = resourcesQuestionDao.getGroupQuestionTypeCount(courseInfoQuery);
dictParser(g); dictParser(g);
return g; return g;
} }
/** /**
* ids * ids
* @param orgIdPlural * @param courseInfoQuery
* @param courseLabelTypePlural
* @return * @return
*/ */
public List<QuestionTypeCountVO> getQuestionTypeGroupInfoByOrgIdsAndCourseLabelTypes(CourseInfoQuery courseInfoQuery, String courseLabelTypePlural) { public List<QuestionTypeCountVO> getQuestionTypeGroupInfoByOrgIdsAndCourseLabelTypes(CourseInfoQuery courseInfoQuery, String courseLabelTypePlural) {
List<QuestionTypeCountVO> g = resourcesQuestionDao.getGroupQuestionTypeCount(courseInfoQuery, courseLabelTypePlural); courseInfoQuery.setCourseLabelTypes(courseLabelTypePlural);
courseInfoQuery.setCourseInfoStatus(1);
List<QuestionTypeCountVO> g = resourcesQuestionDao.getGroupQuestionTypeCount(courseInfoQuery);
dictParser(g); dictParser(g);
return g; return g;
} }

@ -384,70 +384,66 @@ getGroupQuestionTypeCount
AND ta.course_info_status = 1 AND ta.course_info_status = 1
AND t.question_status = 1 AND t.question_status = 1
AND tb.course_label_status = 1 AND tb.course_label_status = 1
@if(!isEmpty(courseLabelTypePlural)){
and find_in_set(tb.course_label_type, #courseLabelTypePlural#)
@}
@if(!isEmpty(resourcesQuestionIds)){ @if(!isEmpty(resourcesQuestionIds)){
and find_in_set(t.resources_question_id,#resourcesQuestionIds#) and find_in_set(t.resources_question_id,#resourcesQuestionIds#)
@} @}
@if(!isEmpty(resourcesQuestionId)){ @if(!isEmpty(courseInfoIdPlural)){
and t.resources_question_id =#resourcesQuestionId# and ta.course_info_full_id regexp #sputil.joinEx(@java.util.Arrays.asList(strUtil.splitToArray(courseInfoIdPlural, ',')), '|', '_', '_')#
@}
@if(!isEmpty(courseInfoIds)){
and find_in_set(t.course_info_id,#courseInfoIds#)
@} @}
@if(!isEmpty(courseInfoId)){ @if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId# and ta.course_info_full_id regexp #'_' + courseInfoId + '_'#
@}
@if(!isEmpty(courseInfoFullId)){
and ta.course_info_full_id =#courseInfoFullId#
@}
@if(!isEmpty(courseInfoName)){
and ta.course_info_name like #'%'+courseInfoName+'%'#
@}
@if(!isEmpty(courseInfoThumbnail)){
and ta.course_info_thumbnail =#courseInfoThumbnail#
@} @}
@if(!isEmpty(questionType)){ @if(!isEmpty(courseLabelId)){
and t.question_type =#questionType# and ta.course_label_id =#courseLabelId#
@} @}
@if(!isEmpty(questionStatus)){ @if(!isEmpty(courseLabelType)){
and t.question_status =#questionStatus# and tb.course_label_type like #'%'+courseLabelType+'%'#
@} @}
@if(!isEmpty(questionScore)){ @if(!isEmpty(courseLabelTypes)){
and t.question_score =#questionScore# and find_in_set(tb.course_label_type, #courseLabelTypes#)
@} @}
@if(!isEmpty(questionStem)){ @if(!isEmpty(courseInfoBasicsCount)){
and t.question_stem = #questionStem# and ta.course_info_basics_count =#courseInfoBasicsCount#
@} @}
@if(!isEmpty(questionOptionA)){ @if(!isEmpty(courseInfoContent)){
and t.question_option_a =#questionOptionA# and ta.course_info_content =#courseInfoContent#
@} @}
@if(!isEmpty(questionOptionB)){ @if(!isEmpty(courseInfoStatus)){
and t.question_option_b =#questionOptionB# and ta.course_info_status =#courseInfoStatus#
@}else{
and ta.course_info_status != 3
@} @}
@if(!isEmpty(questionOptionC)){ @if(!isEmpty(courseInfoType)){
and t.question_option_c =#questionOptionC# and ta.course_info_type =#courseInfoType#
@} @}
@if(!isEmpty(questionOptionD)){ @if(!isEmpty(courseInfoParentId)){
and t.question_option_d =#questionOptionD# and ta.course_info_parent_id =#courseInfoParentId#
@} @}
@if(!isEmpty(questionOptionE)){ @if(!isEmpty(courseVideoId)){
and t.question_option_e =#questionOptionE# and ta.course_video_id =#courseVideoId#
@} @}
@if(!isEmpty(questionAnswer)){ @if(!isEmpty(courseCoursewareId)){
and t.question_answer =#questionAnswer# and ta.course_courseware_id =#courseCoursewareId#
@} @}
@if(!isEmpty(questionAnalysis)){ @if(!isEmpty(courseEnclosureIds)){
and t.question_analysis =#questionAnalysis# and ta.course_enclosure_ids =#courseEnclosureIds#
@} @}
@if(!isEmpty(orgId)){ @if(!isEmpty(orgId)){
and t.org_id =#orgId# and t.org_id =#orgId#
@} @}
@if(!isEmpty(orgIdPlural)){
and find_in_set(ifnull(t.org_id, 1), #orgIdPlural#)
@}
@if(!isEmpty(userId)){ @if(!isEmpty(userId)){
and t.user_id =#userId# and t.user_id =#userId#
@} @}
@if(!isEmpty(addType)){ group by 1
and t.add_type =#addType#
@}
GROUP BY
t.question_type
ORDER BY
t.question_type ASC
checkUnique checkUnique
=== ===

Loading…
Cancel
Save