change il y a 3 ans
Parent
commit
f3500e4eb3

+ 2 - 2
zhongzheng-api/src/main/java/com/zhongzheng/controller/course/CourseController.java

@@ -100,10 +100,10 @@ public class CourseController extends BaseController {
      */
     @ApiOperation("查询章与节关系列表+章卷同级展示")
     @GetMapping("/sectionList")
-    public AjaxResult<List<CourseChapterSectionVo>> sectionList(CourseMenuQueryBo bo) {
+    public AjaxResult<List<CourseUserChapterSectionVo>> sectionList(CourseMenuQueryBo bo) {
         ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
         bo.setUserId(loginUser.getUser().getUserId());
-        List<CourseChapterSectionVo> list = iCourseChapterSectionService.sectionList(bo);
+        List<CourseUserChapterSectionVo> list = iCourseChapterSectionService.sectionList(bo);
         return AjaxResult.success(list);
     }
 }

+ 2 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/ICourseChapterSectionService.java

@@ -8,6 +8,7 @@ import com.zhongzheng.modules.course.bo.CourseChapterSectionQueryBo;
 import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
 import com.zhongzheng.modules.course.domain.CourseChapterSection;
 import com.zhongzheng.modules.course.vo.CourseChapterSectionVo;
+import com.zhongzheng.modules.course.vo.CourseUserChapterSectionVo;
 
 import java.util.Collection;
 import java.util.List;
@@ -56,5 +57,5 @@ public interface ICourseChapterSectionService extends IService<CourseChapterSect
 	 */
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
 
-    List<CourseChapterSectionVo> sectionList(CourseMenuQueryBo bo);
+    List<CourseUserChapterSectionVo> sectionList(CourseMenuQueryBo bo);
 }

+ 4 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseChapterSectionServiceImpl.java

@@ -10,6 +10,8 @@ import com.zhongzheng.modules.course.mapper.CourseChapterMapper;
 import com.zhongzheng.modules.course.mapper.CourseChapterSectionMapper;
 import com.zhongzheng.modules.course.service.ICourseChapterSectionService;
 import com.zhongzheng.modules.course.vo.CourseChapterSectionVo;
+import com.zhongzheng.modules.course.vo.CourseUserChapterSectionVo;
+import com.zhongzheng.modules.course.vo.CourseUserVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -127,7 +129,8 @@ public class CourseChapterSectionServiceImpl extends ServiceImpl<CourseChapterSe
     }
 
     @Override
-    public List<CourseChapterSectionVo> sectionList(CourseMenuQueryBo bo) {
+    public List<CourseUserChapterSectionVo> sectionList(CourseMenuQueryBo bo) {
+        //courseChapterSectionMapper.sectionList(bo)
         return null;
     }
 }

+ 7 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/UserExamGoodsSupplementVo.java

@@ -76,4 +76,11 @@ public class UserExamGoodsSupplementVo {
 	/** 更新时间 */
 	@ApiModelProperty("更新时间")
 	private Long updateTime;
+
+	@ApiModelProperty("教育名称")
+	private String educationName;
+	@ApiModelProperty("项目名称")
+	private String projectName;
+	@ApiModelProperty("业务名称")
+	private String businessName;
 }

+ 7 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/UserExamGoodsVo.java

@@ -74,6 +74,13 @@ public class UserExamGoodsVo {
 	@ApiModelProperty("已消耗前培次数")
 	private Long expendBefore;
 
+	@ApiModelProperty("教育名称")
+	private String educationName;
+	@ApiModelProperty("项目名称")
+	private String projectName;
+	@ApiModelProperty("业务名称")
+	private String businessName;
+
 	/** 已消耗前培次数 */
 	@Excel(name = "补考商品自带考试次数")
 	@ApiModelProperty("补考商品自带考试次数")

+ 19 - 4
zhongzheng-system/src/main/resources/mapper/modules/user/UserExamGoodsMapper.xml

@@ -25,6 +25,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="goodsCode" column="goods_code"/>
         <result property="goodsName" column="goods_name"/>
         <result property="standPrice" column="stand_price"/>
+        <result property="projectName" column="project_name"/>
+        <result property="businessName" column="business_name"/>
+        <result property="educationName" column="education_name"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.user.vo.UserExamGoodsSupplementVo" id="UserExamGoodsSupplementVo">
@@ -34,11 +37,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="doNumber" column="do_number"/>
         <result property="createTime" column="create_time"/>
         <result property="updateTime" column="update_time"/>
-        <result property="code" column="code"/>
+        <result property="code" column="goods_code"/>
         <result property="goodsName" column="goods_name"/>
         <result property="standPrice" column="stand_price"/>
         <result property="status" column="status"/>
         <result property="timeStatus" column="time_status"/>
+        <result property="makeStartTime" column="make_start_time"/>
+        <result property="makeEndTime" column="make_end_time"/>
+        <result property="timeStatus" column="time_status"/>
+        <result property="projectName" column="project_name"/>
+        <result property="businessName" column="business_name"/>
+        <result property="educationName" column="education_name"/>
     </resultMap>
 
     <select id="listUserExam" parameterType="com.zhongzheng.modules.user.bo.UserExamGoodsQueryBo" resultMap="UserExamGoodsVo">
@@ -46,14 +55,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             *,
             (SELECT g.goods_name FROM goods g where ueg.goods_id = g.goods_id) as goods_name,
             (SELECT g.code FROM goods g where ueg.goods_id = g.goods_id) as goods_code,
-            (SELECT g.stand_price FROM goods g where ueg.goods_id = g.goods_id) as stand_price
+            (SELECT g.stand_price FROM goods g where ueg.goods_id = g.goods_id) as stand_price,
+            (SELECT cet.education_name FROM goods g LEFT JOIN course_education_type cet on cet.id = g.education_type_id where ueg.goods_id = g.goods_id) as education_name,
+            (SELECT cpt.project_name FROM goods g LEFT JOIN course_project_type cpt on cpt.id = g.project_id  where ueg.goods_id = g.goods_id) as project_name,
+            (SELECT cb.business_name FROM goods g LEFT JOIN course_business cb on cb.id = g.business_id where ueg.goods_id = g.goods_id) as business_name
         FROM
             user_exam_goods ueg
         WHERE
             ueg.user_id = #{userId}
     </select>
 
-    <select id="getUserExam" parameterType="map" resultMap="UserExamGoodsVo">
+    <select id="getUserExam" parameterType="map" resultMap="UserExamGoodsSupplementVo">
         SELECT
             *,
             (SELECT g.goods_name FROM goods g where uegs.goods_id = g.goods_id) as goods_name,
@@ -61,7 +73,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             (SELECT g.stand_price FROM goods g where uegs.goods_id = g.goods_id) as stand_price,
             (SELECT g.make_start_time FROM goods g where uegs.goods_id = g.goods_id) as make_start_time,
             (SELECT g.make_end_time FROM goods g where uegs.goods_id = g.goods_id) as make_end_time,
-            (case WHEN (SELECT COUNT(g.goods_id) FROM goods g where uegs.goods_id = g.goods_id and unix_timestamp(now()) BETWEEN g.make_start_time and g.make_end_time) >0 then 1 ELSE 0 end) as time_status
+            (case WHEN (SELECT COUNT(g.goods_id) FROM goods g where uegs.goods_id = g.goods_id and unix_timestamp(now()) BETWEEN g.make_start_time and g.make_end_time) >0 then 1 ELSE 0 end) as time_status,
+            (SELECT cet.education_name FROM goods g LEFT JOIN course_education_type cet on cet.id = g.education_type_id where uegs.goods_id = g.goods_id) as education_name,
+            (SELECT cpt.project_name FROM goods g LEFT JOIN course_project_type cpt on cpt.id = g.project_id  where uegs.goods_id = g.goods_id) as project_name,
+            (SELECT cb.business_name FROM goods g LEFT JOIN course_business cb on cb.id = g.business_id where uegs.goods_id = g.goods_id) as business_name
         FROM
             user_exam_goods_supplement uegs
         WHERE