he2802 3 éve
szülő
commit
b1b4bef9cf

+ 1 - 1
zhongzheng-admin/src/main/resources/application-pre.yml

@@ -115,6 +115,6 @@ certificate:
     host: http://192.168.1.38:8000/
     host: http://192.168.1.38:8000/
 officialPush:
 officialPush:
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
-    periodPath: http://jypt.gdcic.net/organjxjy/XueshiShenqing
+    periodPath: http://jypt-dev.gdcic.net/organjxjy/XueshiShenqing
     infoAccount: peixunjigou
     infoAccount: peixunjigou
     token: 0ca175b9c0f726a831d895e26933246
     token: 0ca175b9c0f726a831d895e26933246

+ 1 - 1
zhongzheng-api/src/main/java/com/zhongzheng/controller/cmmon/CommonCourseController.java

@@ -72,7 +72,7 @@ public class CommonCourseController extends BaseController {
     /**
     /**
      * 查询章与节关系列表
      * 查询章与节关系列表
      */
      */
-    @ApiOperation("查询章与节关系列表+章卷同级展示")
+    @ApiOperation("查询章与节关系列表+章卷同级展示(不带用户信息)")
     @GetMapping("/sectionList/{id}")
     @GetMapping("/sectionList/{id}")
     public AjaxResult<List<CourseChapterSectionVo>> sectionList(@PathVariable("id" ) Long id) {
     public AjaxResult<List<CourseChapterSectionVo>> sectionList(@PathVariable("id" ) Long id) {
         List<CourseChapterSectionVo> list = iCourseChapterSectionService.getListById(id);
         List<CourseChapterSectionVo> list = iCourseChapterSectionService.getListById(id);

+ 5 - 2
zhongzheng-api/src/main/java/com/zhongzheng/controller/user/UserStudyRecordController.java

@@ -8,6 +8,7 @@ import com.zhongzheng.framework.web.service.WxTokenService;
 import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
 import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
 import com.zhongzheng.modules.course.vo.CourseUserMenuVo;
 import com.zhongzheng.modules.course.vo.CourseUserMenuVo;
 import com.zhongzheng.modules.grade.domain.UserPeriodStatus;
 import com.zhongzheng.modules.grade.domain.UserPeriodStatus;
+import com.zhongzheng.modules.grade.vo.ClassPeriodVo;
 import com.zhongzheng.modules.user.bo.UserStudyRecordAddBo;
 import com.zhongzheng.modules.user.bo.UserStudyRecordAddBo;
 import com.zhongzheng.modules.user.bo.UserStudyRecordEditBo;
 import com.zhongzheng.modules.user.bo.UserStudyRecordEditBo;
 import com.zhongzheng.modules.user.bo.UserStudyRecordQueryBo;
 import com.zhongzheng.modules.user.bo.UserStudyRecordQueryBo;
@@ -117,8 +118,10 @@ public class UserStudyRecordController extends BaseController {
      */
      */
     @ApiOperation("查询课程所有子目录结构列表")
     @ApiOperation("查询课程所有子目录结构列表")
     @GetMapping("/menuAllList")
     @GetMapping("/menuAllList")
-    public AjaxResult<Integer> menuAllList(UserStudyRecordQueryBo bo) {
-        return AjaxResult.success(iUserStudyRecordService.menuAllList(bo) ? 1 : 0);
+    public AjaxResult<List<ClassPeriodVo>> menuAllList(UserStudyRecordQueryBo bo) {
+        ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
+        bo.setUserId(loginUser.getUser().getUserId());
+        return AjaxResult.success(iUserStudyRecordService.menuAllList(bo));
     }
     }
 
 
 }
 }

+ 1 - 1
zhongzheng-api/src/main/resources/application-pre.yml

@@ -115,6 +115,6 @@ certificate:
 
 
 officialPush:
 officialPush:
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
-    periodPath: http://jypt.gdcic.net/organjxjy/XueshiShenqing
+    periodPath: http://jypt-dev.gdcic.net/organjxjy/XueshiShenqing
     infoAccount: peixunjigou
     infoAccount: peixunjigou
     token: 0ca175b9c0f726a831d895e26933246
     token: 0ca175b9c0f726a831d895e26933246

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/domain/ClassGradeUser.java

@@ -74,5 +74,6 @@ private static final long serialVersionUID=1L;
     private Long periodStatusNum;
     private Long periodStatusNum;
     /** 学时变为审核中时间 */
     /** 学时变为审核中时间 */
     private Long periodIngTime;
     private Long periodIngTime;
+
 }
 }
 
 

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/mapper/ClassGradeUserMapper.java

@@ -68,5 +68,6 @@ public interface ClassGradeUserMapper extends BaseMapper<ClassGradeUser> {
     List<ClassGradeUserGoodsVo> selectOfficialNotPush(UserQueryBo bo);
     List<ClassGradeUserGoodsVo> selectOfficialNotPush(UserQueryBo bo);
 
 
     List<ClassGradeUserGoodsVo> selectPeriodNotPush(UserQueryBo bo);
     List<ClassGradeUserGoodsVo> selectPeriodNotPush(UserQueryBo bo);
+    
 
 
 }
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassPeriodVo.java

@@ -164,6 +164,10 @@ public class ClassPeriodVo implements Comparable<ClassPeriodVo> {
 	@ApiModelProperty("以往审核记录")
 	@ApiModelProperty("以往审核记录")
 	private List<UserPeriodStatusVo> userPeriodStatusVos;
 	private List<UserPeriodStatusVo> userPeriodStatusVos;
 
 
+	@Excel(name = "学习状态 0 未完整看完 1完整播放 -1未看过")
+	@ApiModelProperty("学习状态 0 未完整看完 1完整播放 -1未看过")
+	private Integer studyStatus;
+
 
 
 	@Override
 	@Override
 	public int compareTo(ClassPeriodVo o) {
 	public int compareTo(ClassPeriodVo o) {

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/mapper/UserStudyRecordMapper.java

@@ -76,4 +76,6 @@ public interface UserStudyRecordMapper extends BaseMapper<UserStudyRecord> {
     List<ClassPeriodVo> listChapterSection(UserStudyRecordQueryBo bo);
     List<ClassPeriodVo> listChapterSection(UserStudyRecordQueryBo bo);
 
 
     List<ClassPeriodVo> listModuleChapter(UserStudyRecordQueryBo bo);
     List<ClassPeriodVo> listModuleChapter(UserStudyRecordQueryBo bo);
+
+    Integer getStudyStatus(ClassPeriodVo bo);
 }
 }

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserStudyRecordService.java

@@ -82,5 +82,5 @@ public interface IUserStudyRecordService extends IService<UserStudyRecord> {
 
 
 	boolean checkStudyOrder1(UserStudyRecordQueryBo entity);
 	boolean checkStudyOrder1(UserStudyRecordQueryBo entity);
 
 
-	boolean menuAllList(UserStudyRecordQueryBo bo);
+	List<ClassPeriodVo> menuAllList(UserStudyRecordQueryBo bo);
 }
 }

+ 8 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordServiceImpl.java

@@ -428,7 +428,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public boolean menuAllList(UserStudyRecordQueryBo bo) {
+    public List<ClassPeriodVo> menuAllList(UserStudyRecordQueryBo bo) {
         //存储整个目录节列表
         //存储整个目录节列表
         List<ClassPeriodVo> sectionList = new ArrayList<>();
         List<ClassPeriodVo> sectionList = new ArrayList<>();
         //获取课程目录
         //获取课程目录
@@ -456,7 +456,6 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                         sectionList.add(classSectionVo);
                         sectionList.add(classSectionVo);
                     }
                     }
                 }
                 }
-
             }
             }
             //为章搜索节记录
             //为章搜索节记录
             if (classPeriodVo.getType() == 2){
             if (classPeriodVo.getType() == 2){
@@ -479,13 +478,15 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                 classPeriodVo.setChapterId(0L);
                 classPeriodVo.setChapterId(0L);
                 classPeriodVo.setSectionId(classPeriodVo.getId());
                 classPeriodVo.setSectionId(classPeriodVo.getId());
                 sectionList.add(classPeriodVo);
                 sectionList.add(classPeriodVo);
-
             }
             }
         }
         }
-        System.out.println("事件"+sectionList.size());
-        System.out.println(sectionList);
-
-        return false;
+        for(ClassPeriodVo section : sectionList){
+            section.setGoodsId(bo.getGoodsId());
+            section.setGradeId(bo.getGradeId());
+            section.setUserId(bo.getUserId());
+            section.setStudyStatus(baseMapper.getStudyStatus(section));
+        }
+        return sectionList;
     }
     }
 
 
 
 

+ 3 - 1
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -302,6 +302,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         cgu.grade_id,
         cgu.grade_id,
         u.telphone,
         u.telphone,
         (case WHEN (select COUNT(uu.id) FROM user_update uu where cgu.user_id = uu.user_id and uu.status = 2) >0 then 1 ELSE 0 end) as user_status,
         (case WHEN (select COUNT(uu.id) FROM user_update uu where cgu.user_id = uu.user_id and uu.status = 2) >0 then 1 ELSE 0 end) as user_status,
+        (case WHEN cgu.official_status_time >  (select MAX(uu.create_time) FROM user_update uu where cgu.user_id = uu.user_id) then 0 ELSE 1 end) as user_info_status,
+        (select MAX(uu.create_time) FROM user_update uu where cgu.user_id = uu.user_id ) as update_info_time,
         (SELECT g.class_hours FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where cg.grade_id = cgg.grade_id) as class_hours,
         (SELECT g.class_hours FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where cg.grade_id = cgg.grade_id) as class_hours,
         cgu.period_status,
         cgu.period_status,
         cgu.finish_status,
         cgu.finish_status,
@@ -348,7 +350,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="studyCountMore != null and studyCountMore == 0 ">
         <if test="studyCountMore != null and studyCountMore == 0 ">
             AND og.study_count = 0
             AND og.study_count = 0
         </if>
         </if>
-        order by cgu.create_time desc
+        order by user_info_status desc ,user_status desc ,cgu.id desc
     </select>
     </select>
 
 
     <select id="listGradeInform" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeQueryBo" resultMap="ClassGradeUserListVo">
     <select id="listGradeInform" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeQueryBo" resultMap="ClassGradeUserListVo">

+ 7 - 0
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -53,7 +53,10 @@
         <result property="periodWaitTime" column="period_wait_time"/>
         <result property="periodWaitTime" column="period_wait_time"/>
         <result property="periodStatus" column="period_status"/>
         <result property="periodStatus" column="period_status"/>
         <result property="periodStatusNum" column="period_status_num"/>
         <result property="periodStatusNum" column="period_status_num"/>
+<<<<<<< HEAD
         <result property="periodIngTime" column="period_ing_time"/>
         <result property="periodIngTime" column="period_ing_time"/>
+=======
+>>>>>>> pre
     </resultMap>
     </resultMap>
 
 
 
 
@@ -107,6 +110,10 @@
         <result property="classStartTime" column="class_start_time"/>
         <result property="classStartTime" column="class_start_time"/>
         <result property="classEndTime" column="class_end_time"/>
         <result property="classEndTime" column="class_end_time"/>
         <result property="periodStatusNum" column="period_status_num"/>
         <result property="periodStatusNum" column="period_status_num"/>
+<<<<<<< HEAD
+=======
+
+>>>>>>> pre
     </resultMap>
     </resultMap>
 
 
     <resultMap type="com.zhongzheng.modules.grade.vo.ClassPeriodUserVo" id="ClassPeriodUserVo">
     <resultMap type="com.zhongzheng.modules.grade.vo.ClassPeriodUserVo" id="ClassPeriodUserVo">

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/order/OrderGoodsMapper.xml

@@ -231,7 +231,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             order_goods og
             order_goods og
                 LEFT JOIN `order` o on og.order_sn = o.order_sn
                 LEFT JOIN `order` o on og.order_sn = o.order_sn
         WHERE
         WHERE
-            o.user_id = #{userId} and og.grade_id = #{gradeId} and og.pay_status in (2,3)
+            o.user_id = #{userId} and og.grade_id = #{gradeId} and og.pay_status in (2,3) and og.refund_status !=2
     </select>
     </select>
 
 
 </mapper>
 </mapper>

+ 18 - 1
zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

@@ -1118,7 +1118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="listModuleChapter" parameterType="com.zhongzheng.modules.user.bo.UserStudyRecordQueryBo" resultMap="ClassPeriodVo">
     <select id="listModuleChapter" parameterType="com.zhongzheng.modules.user.bo.UserStudyRecordQueryBo" resultMap="ClassPeriodVo">
         SELECT
         SELECT
         cmc.sort,
         cmc.sort,
-        cc.chapter_id as id,
+        cmc.chapter_id as id,
         2 AS type
         2 AS type
         FROM
         FROM
          course_module_chapter cmc
          course_module_chapter cmc
@@ -1128,4 +1128,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND cmc.module_id=#{moduleId}
             AND cmc.module_id=#{moduleId}
         </if>
         </if>
     </select>
     </select>
+
+    <select id="getStudyStatus" parameterType="com.zhongzheng.modules.grade.vo.ClassPeriodVo" resultType="Integer">
+        SELECT
+            IFNULL(status,-1)
+        FROM
+            user_study_record
+        WHERE
+            user_id = #{userId}
+          AND grade_id = #{gradeId}
+          AND course_id = #{courseId}
+          AND module_id = #{moduleId}
+          AND chapter_id = #{chapterId}
+          AND section_id = #{sectionId}
+          AND goods_id = #{goodsId}
+          AND `status` = 1
+          AND current_status = 1
+    </select>
 </mapper>
 </mapper>