Commit af101367 authored by 刘帅's avatar 刘帅

1.BUG修复

parent c44c63a4
......@@ -167,9 +167,9 @@ public class ApiPCController {
if (StringUtils.isNull(params.get("examNoticeId"))&&StringUtils.isNull(params.get("examId"))){
return AjaxResult.error("缺少 examNoticeId 考试通知ID 或者 examId 考试id");
}
if (!params.containsKey("examRegistrationId") || StringUtils.isBlank(params.get("examRegistrationId").toString())) {
return AjaxResult.error("缺少 examRegistrationId 考试报名ID");
}
// if (!params.containsKey("examRegistrationId") || StringUtils.isBlank(params.get("examRegistrationId").toString())) {
// return AjaxResult.error("缺少 examRegistrationId 考试报名ID");
// }
try {
return AjaxResult.success().put("data", examNoticeService.getExamNoticeInfo(params));
} catch (Exception e) {
......@@ -301,6 +301,29 @@ public class ApiPCController {
}
}
/**
* 师资课程列表
*
* @param pageNum 页码
* @param pageSize 每页数据量
* @param params searchValue 搜索词
* @return success
*/
@GetMapping("/getTbTeacherCourseList")
public AjaxResult TbTeacherCourseList(@RequestParam(value = "pageNum", defaultValue = "1", required = false) Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "100", required = false) Integer pageSize,
@RequestParam Map<String, Object> params) {
try {
PageHelper.startPage(pageNum, pageSize);
List<Map> list = teacherService.selectTbTeacherCourseList(params);
PageInfo<Map<String, Object>> pageInfo = new PageInfo(list);
return AjaxResult.success().put("data", pageInfo);
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error("师资团队列表异常");
}
}
/**
* 学习中心列表
*
......
......@@ -67,6 +67,10 @@ public class TbExam extends BaseEntity
@Excel(name = "logo")
private String logo;
/** 广告位 */
@Excel(name = "广告位")
private String advertisingUrl;
/** 文件 */
@Excel(name = "文件")
private String fileUrl;
......
......@@ -30,6 +30,14 @@ public interface TbTeacherMapper
*/
public List<TbTeacher> selectTbTeacherList(TbTeacher tbTeacher);
/**
* 查询教师列表
*
* @param params 教师
* @return 教师集合
*/
public List<Map> selectTbTeacherCourseList(Map<String, Object> params);
/**
* 新增教师
*
......
......@@ -31,6 +31,14 @@ public interface ITbTeacherService
*/
public List<TbTeacher> selectTbTeacherList(TbTeacher tbTeacher);
/**
* 查询师资课程列表
*
* @param params
* @return 教师集合
*/
public List<Map> selectTbTeacherCourseList(Map<String, Object> params);
/**
* 新增教师
*
......
......@@ -64,6 +64,18 @@ public class TbTeacherServiceImpl implements ITbTeacherService
return tbTeacherMapper.selectTbTeacherList(tbTeacher);
}
/**
* 查询师资课程列表
*
* @param params 教师
* @return 教师
*/
@Override
public List<Map> selectTbTeacherCourseList(Map<String, Object> params)
{
return tbTeacherMapper.selectTbTeacherCourseList(params);
}
/**
* 新增教师
*
......
......@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="careerId" column="career_id" />
<result property="careerName" column="career_name" />
<result property="logo" column="logo" />
<result property="advertisingUrl" column="advertising_url" />
<result property="fileUrl" column="file_url" />
<result property="name" column="name" />
<result property="title" column="title" />
......@@ -62,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTbExamVo">
select exam_id, exam_no, class_id, class_name, major_id, major_name, evaluate_agency_id, evaluate_agency_name, career_id, career_name, logo, file_url, name, title, content, introduce, single_select_num, single_select_score, many_select_num, many_select_score, judge_num, judge_score, discuss_num, discuss_score, total_score, pass_score, exam_minute, exam_batch_early, exam_batch, tips, exam_start_time, exam_end_time, sign_start_time, sign_end_time, price, exam_status, is_change, change_day, type, examine_status, examine_feedback, sort, remarks, status, publication_time, publisher, create_time, create_by, update_time, update_by, delete_time, delete_by, del_flag, level from tb_exam
select exam_id, exam_no, class_id, class_name, major_id, major_name, evaluate_agency_id, evaluate_agency_name, career_id, career_name, logo, advertising_url, file_url, name, title, content, introduce, single_select_num, single_select_score, many_select_num, many_select_score, judge_num, judge_score, discuss_num, discuss_score, total_score, pass_score, exam_minute, exam_batch_early, exam_batch, tips, exam_start_time, exam_end_time, sign_start_time, sign_end_time, price, exam_status, is_change, change_day, type, examine_status, examine_feedback, sort, remarks, status, publication_time, publisher, create_time, create_by, update_time, update_by, delete_time, delete_by, del_flag, level from tb_exam
</sql>
<select id="selectTbExamList" parameterType="TbExam" resultMap="TbExamResult">
......@@ -146,6 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="careerId != null">career_id,</if>
<if test="careerName != null">career_name,</if>
<if test="logo != null and logo != ''">logo,</if>
<if test="advertisingUrl != null and advertisingUrl != ''">advertising_url,</if>
<if test="fileUrl != null">file_url,</if>
<if test="name != null and name != ''">name,</if>
<if test="title != null and title != ''">title,</if>
......@@ -201,6 +203,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="careerId != null">#{careerId},</if>
<if test="careerName != null">#{careerName},</if>
<if test="logo != null and logo != ''">#{logo},</if>
<if test="advertisingUrl != null and advertisingUrl != ''">#{advertisingUrl},</if>
<if test="fileUrl != null">#{fileUrl},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="title != null and title != ''">#{title},</if>
......@@ -260,6 +263,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="careerId != null">career_id = #{careerId},</if>
<if test="careerName != null">career_name = #{careerName},</if>
<if test="logo != null and logo != ''">logo = #{logo},</if>
<if test="advertisingUrl != null and advertisingUrl != ''">advertising_url = #{advertisingUrl},</if>
<if test="fileUrl != null">file_url = #{fileUrl},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="title != null and title != ''">title = #{title},</if>
......
......@@ -207,6 +207,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ten.exam_notice_id AS examNoticeId,
te.career_id AS courseId,
te.career_name AS courseName,
te.advertising_url AS advertisingUrl,
<choose>
<when test="examNoticeId != null and examNoticeId !=''">
ten.exam_id AS examId,
......@@ -243,10 +244,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHEN DATE_FORMAT( now(), '%Y-%m-%d %H:%i' ) > DATE_FORMAT( teb.exam_end_time, '%Y-%m-%d %H:%i' ) THEN
2 ELSE 1
END AS examStatus,
CASE
WHEN ifnull( count( ter.exam_registration_id ), 0 ) > 0 THEN
1 ELSE 0
END isJoin,
CASE
WHEN #{memberUserId} = 0 THEN - 1
WHEN #{memberUserId} != 0
......@@ -282,20 +279,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
CASE
WHEN DATE_FORMAT( teb.exam_start_time, '%Y-%m-%d %H:%i' ) > DATE_FORMAT( now(), '%Y-%m-%d %H:%i' ) THEN
CONCAT( FLOOR( TIMESTAMPDIFF( MINUTE, now(), DATE_ADD( teb.exam_start_time, INTERVAL 1 MINUTE ) ) % 60 ) ) ELSE "0"
END `minute`,
ter.exam_registration_id AS examRegistrationId
END `minute`
FROM
tb_exam_registration ter
LEFT JOIN tb_exam te ON ter.exam_id = te.exam_id
LEFT JOIN tb_exam_notice ten ON ten.exam_id = te.exam_id
INNER JOIN tb_exam_batch teb ON te.exam_id = teb.exam_id AND ter.exam_batch_index = teb.batch_index
tb_exam_notice ten
LEFT JOIN tb_exam te ON ten.exam_id = te.exam_id
INNER JOIN tb_exam_batch teb ON te.exam_id = teb.exam_id AND ten.batch_index = teb.batch_index
<where>
<if test="examNoticeId != null and examNoticeId !=''">
and ten.exam_notice_id = #{examNoticeId}
</if>
<if test="examRegistrationId != null and examRegistrationId !=''">
and ter.exam_registration_id = #{examRegistrationId}
</if>
</where>
limit 1
......
......@@ -283,8 +283,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
CONVERT(IFNULL(tc.course_syllabus, ''), CHAR) AS courseSyllabus,
CONVERT(IFNULL(tc.course_knowledge, ''), CHAR) AS courseKnowledge,
CONVERT(IFNULL(tc.course_certificate, ''), CHAR) AS courseCertificate,
CONVERT(IFNULL(tc.course_information, ''), CHAR) AS courseInformation
CONVERT(IFNULL(tc.course_information, ''), CHAR) AS courseInformation,
tc.participate_num as participateNum
from tb_course tc
left join tb_major_class tmcTwo on tc.major_id = tmcTwo.major_id
LEFT JOIN tb_evaluate_agency tea ON tea.evaluate_agency_id=tc.evaluate_agency_id
......@@ -300,6 +300,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tc.major_id AS majorId,
ttc.course_id AS courseId,
ttc.teacher_id AS teacherId,
CONVERT(IFNULL(tt.id_img, ''), CHAR) AS idImg,
CONVERT(IFNULL(tt.whole_img, ''), CHAR) AS wholeImg,
CONVERT(IFNULL(tc.cover_image, ''), CHAR) AS coverImage,
CONVERT(IFNULL(tc.course_name, ''), CHAR) AS courseName,
......@@ -329,6 +330,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="courseId != null and courseId != '' and courseId != 0">
AND ttc.course_id = #{courseId}
</if>
<if test="studyCenterName != null and studyCenterName != ''">
AND tt.college_name = #{studyCenterName}
</if>
and tc.status = 0
and tt.del_flag = 0
and tc.del_flag = 0
......
......@@ -202,4 +202,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where tt.teacher_id = #{teacherId}
</select>
<select id="selectTbTeacherCourseList" resultType="java.util.Map">
SELECT
tc.cover_image, tc.course_name, tc.tag_name, tt.id_img, tt.whole_img, tt.teacher_name, tt.teacher_title
FROM tb_teacher_course ttc
LEFT JOIN tb_course tc ON ttc.course_id = tc.course_id
LEFT JOIN tb_teacher tt ON ttc.teacher_id = tt.teacher_id
WHERE ttc.del_flag = 0 AND tt.del_flag = 0 AND tc.del_flag = 0
</select>
</mapper>
......@@ -132,11 +132,11 @@
<tooltip :contentName="scope.row.evaluateAgencyTitle" />
</template>
</el-table-column>
<el-table-column label="评价机构标签" align="center" prop="evaluateAgencyTag" width="100px">
<template slot-scope="scope">
<tooltip :contentName="scope.row.evaluateAgencyTag" />
</template>
</el-table-column>
<!-- <el-table-column label="评价机构标签" align="center" prop="evaluateAgencyTag" width="100px">-->
<!-- <template slot-scope="scope">-->
<!-- <tooltip :contentName="scope.row.evaluateAgencyTag" />-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" prop="screenTeacher" width="50">-->
<!-- <template slot-scope="scope">-->
......@@ -252,9 +252,9 @@
<el-form-item label="证书链接" prop="certificateUrl">
<el-input v-model="form.certificateUrl" placeholder="请输入证书链接" />
</el-form-item>
<el-form-item label="评价机构标签(英文逗号隔开)" prop="evaluateAgencyTag">
<el-input v-model="form.evaluateAgencyTag" placeholder="请输入评价机构标签" />
</el-form-item>
<!-- <el-form-item label="评价机构标签(英文逗号隔开)" prop="evaluateAgencyTag">-->
<!-- <el-input v-model="form.evaluateAgencyTag" placeholder="请输入评价机构标签" />-->
<!-- </el-form-item>-->
<el-form-item label="评价机构简介" prop="evaluateAgencyIntroduce">
<editor v-model="form.evaluateAgencyIntroduce" :min-height="192" />
</el-form-item>
......
......@@ -261,6 +261,9 @@
<el-form-item label="logo" prop="logo">
<image-upload v-model="form.logo" :limit="1" :width="500" :height="500"/>
</el-form-item>
<el-form-item label="广告位" prop="advertisingUrl">
<image-upload v-model="form.advertisingUrl" :limit="1" :width="3000" :height="250"/>
</el-form-item>
<!-- <el-form-item label="文件" prop="fileUrl">-->
<!-- <file-upload v-model="form.fileUrl"/>-->
<!-- </el-form-item>-->
......@@ -723,6 +726,7 @@ export default {
careerId: null,
careerName: null,
logo: null,
advertisingUrl: null,
fileUrl: null,
name: null,
title: null,
......
......@@ -144,11 +144,11 @@
<el-radio v-for="dict in typeOptions" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="专栏类型" prop="typeTwo" v-if="form.type === 1">
<el-radio-group v-model="form.typeTwo">
<el-radio v-for="dict in typeTwoOptions" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="专栏类型" prop="typeTwo" v-if="form.type === 1">-->
<!-- <el-radio-group v-model="form.typeTwo">-->
<!-- <el-radio v-for="dict in typeTwoOptions" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="发布人" prop="publisher">
<el-input v-model="form.publisher" placeholder="请输入发布人" disabled />
</el-form-item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment