beetlsql3-dev
Mlxa0324 2 years ago
parent 16bc031b5c
commit c223ee3d05

@ -117,7 +117,7 @@ public class UniversitiesCollegesJurisdictionCurriculumResourcesService extends
/**
* ID
*
*
* @param orgId
* @return
*/
@ -126,7 +126,7 @@ public class UniversitiesCollegesJurisdictionCurriculumResourcesService extends
}
/**
* ID
*
*
* @param coreUser
* @return
*/
@ -136,7 +136,7 @@ public class UniversitiesCollegesJurisdictionCurriculumResourcesService extends
/**
* ID
*
*
* @param orgId
* @return
*/

@ -66,6 +66,25 @@ public class ResourcesQuestionQuery extends PageParam {
private Integer judgeNum;
private Long courseInfoId_0;
private Long courseInfoId_1;
public Long getCourseInfoId_0() {
return courseInfoId_0;
}
public void setCourseInfoId_0(Long courseInfoId_0) {
this.courseInfoId_0 = courseInfoId_0;
}
public Long getCourseInfoId_1() {
return courseInfoId_1;
}
public void setCourseInfoId_1(Long courseInfoId_1) {
this.courseInfoId_1 = courseInfoId_1;
}
public Long getResourcesQuestionId(){
return resourcesQuestionId;
}

@ -49,6 +49,14 @@ queryByCondition
@if(!isEmpty(courseInfoId)){
and t.course_info_id =#courseInfoId#
@}
@if(!isEmpty(courseInfoId_0)){
and t.course_info_id =#courseInfoId_0#
@}
@if(!isEmpty(courseInfoId_1)){
and t.course_info_id =#courseInfoId_1#
@} else if(!isEmpty(courseInfoId_0)){
and t.course_info_id =#courseInfoId_0#
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@}

@ -1560,7 +1560,7 @@ studentActiveInfo
AND zz.id = zxc.user_id
) AS class_rank_no,
(select count(1) from sys_log sl where request_url = #@com.ibeetl.jlw.conf.KeyExpiredListener.TOKEN_EXPIRED_MESSAGE#
and sl.student_id = zxc.student_id and sl.user_id = zxc.user_id group by date(create_time)) AS login_days
and sl.student_id = zxc.student_id and sl.user_id = zxc.user_id group by date(create_time) LIMIT 1) AS login_days
FROM
( SELECT user_id, org_id, class_id, student_name, student_sn, student_id FROM student WHERE 1
@if(!isEmpty(userId)) {

@ -373,66 +373,34 @@ getAllAuthCourseInfoByOrgId
* 获取授权的课程列表,根据系统用户
* 应用课程查询resources_application_course表应用和课程的绑定关系
* 理论课程授权表universities_colleges_jurisdiction_curriculum_resources查询理论课程授权给院校的数据
* 考证类课程:直接查询,不需要二次授权
* 考证类课程:直接查询,不需要二次授权。这里参与。
* 本sql只返回授权的应用课程类和理论课程类的课程列表
select * from (
@// 考证类课程
SELECT
ta.*,
FALSE as is_update,
NULL AS use_type,
NULL as use_type_text,
NULL AS use_start_time,
NULL AS use_end_time,
NULL AS second_level_name,
NULL AS second_level_logo
t.*,
tb.org_id = '45' AS is_update,
tb.use_type,
( CASE tb.use_type WHEN 1 THEN '购买' WHEN 2 THEN '试用' WHEN 12 THEN '购买+试用' END ) AS use_type_text,
tb.use_start_time,
tb.use_end_time,
tb.second_level_name,
tb.second_level_logo
FROM
course_info ta
INNER JOIN course_label tb ON ta.course_info_status = 1
AND ta.course_info_type = 1
AND ta.course_label_id = tb.course_label_id
course_info t
LEFT JOIN resources_application_course ta on ta.course_info_id = t.course_info_id
LEFT JOIN universities_colleges_jurisdiction_curriculum_resources tb ON tb.course_info_id = t.course_info_id
AND tb.use_type != 0
AND tb.use_type IS NOT NULL
AND tb.org_id = 45
AND ( now() BETWEEN tb.use_start_time AND tb.use_end_time )
LEFT JOIN course_label td ON td.course_label_id = t.course_label_id
AND td.course_label_status = 1
WHERE
1
AND tb.course_label_type = '考证课程类'
UNION
@// 应用课程。其实一个sql可以写完的为了方便阅读分开写比较好
SELECT
ta.*,
FALSE as is_update,
NULL AS use_type,
NULL as use_type_text,
NULL AS use_start_time,
NULL AS use_end_time,
NULL AS second_level_name,
NULL AS second_level_logo
FROM
resources_application_course t
INNER JOIN course_info ta ON ta.course_info_status = 1
AND ta.course_info_type = 1
AND t.course_info_id = ta.course_info_id
UNION
@// 需要在院校权限管理中授权,理论课程
SELECT
tb.*,
TRUE as is_update,
tc.use_type,
(CASE tc.use_type WHEN 1 THEN '购买' WHEN 2 THEN '试用' WHEN 12 THEN '购买+试用' END) as use_type_text,
tc.use_start_time,
tc.use_end_time,
tc.second_level_name,
tc.second_level_logo
FROM
course_info tb
LEFT JOIN universities_colleges_jurisdiction_curriculum_resources tc ON tc.course_info_id = tb.course_info_id
AND now() BETWEEN tc.use_start_time
AND tc.use_end_time
AND tc.use_type != 0
AND tc.use_type IS NOT NULL
AND tc.org_id = #orgId#
WHERE
1
AND tb.course_info_status = 1
AND tb.course_info_type = 1
) zz
left join course_label za on za.course_label_id = zz.course_label_id and za.course_label_status = 1
AND t.course_info_status = 1
AND t.course_info_type = 1
AND FIND_IN_SET(td.course_label_type, '应用课程类,理论课程类')
@if(!isEmpty(applicationIds)) {
AND FIND_IN_SET(ta.resources_application_id, #applicationIds#)
@ }
order by add_time desc
Loading…
Cancel
Save