Browse Source

fix 合并

he2802 3 years ago
parent
commit
12cc4b32bb

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

@@ -1,11 +1,13 @@
 package com.zhongzheng.controller.cmmon;
 
+import cn.hutool.core.lang.Validator;
 import com.zhongzheng.common.core.controller.BaseController;
 import com.zhongzheng.common.core.domain.AjaxResult;
 import com.zhongzheng.common.core.page.TableDataInfo;
 import com.zhongzheng.common.core.redis.RedisCache;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.framework.web.service.WxTokenService;
+import com.zhongzheng.modules.base.bo.ConfigQueryBo;
 import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
 import com.zhongzheng.modules.course.bo.CourseQueryBo;
 import com.zhongzheng.modules.course.service.ICourseChapterSectionService;
@@ -94,9 +96,14 @@ public class CommonController extends BaseController {
 
     @ApiOperation("小程序配置")
     @GetMapping("/config")
-    public AjaxResult<Map<String,Object>> config(CourseQueryBo bo) throws InterruptedException, ParseException {
+    public AjaxResult<Map<String,Object>> config(ConfigQueryBo bo) {
         Map<String,Object> map = new HashMap<>();
         map.put("hide",false);
+        if(Validator.isNotEmpty(bo.getVersion())){
+            if(bo.getVersion().equals("4.1")){
+                map.put("hide",true);
+            }
+        }
         return AjaxResult.success(map);
     }
 

+ 26 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ConfigQueryBo.java

@@ -0,0 +1,26 @@
+package com.zhongzheng.modules.base.bo;
+
+import com.zhongzheng.common.annotation.Excel;
+import com.zhongzheng.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * 填写资料审核分页查询对象 user_profile
+ *
+ * @author ruoyi
+ * @date 2021-12-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ConfigQueryBo extends BaseEntity {
+
+
+	@ApiModelProperty("版本号")
+	private String version;
+
+}

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/vo/GoodsPeriodVo.java

@@ -105,4 +105,7 @@ public class GoodsPeriodVo {
 
 	@ApiModelProperty("重修目录")
 	private Long rebuildNum;
+
+	@ApiModelProperty("订单商品ID")
+	private Long orderGoodsId;
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/bo/ClassGradeAddBo.java

@@ -86,4 +86,8 @@ public class ClassGradeAddBo {
     /** 班級編碼 */
     @ApiModelProperty("班級編碼")
     private String gradeCode;
+
+    /** 官方学习地址 */
+    @ApiModelProperty("官方学习地址")
+    private String officialLearningUrl;
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/bo/ClassGradeEditBo.java

@@ -104,4 +104,7 @@ public class ClassGradeEditBo {
     @ApiModelProperty("班級編碼")
     private String gradeCode;
 
+    /** 官方学习地址 */
+    @ApiModelProperty("官方学习地址")
+    private String officialLearningUrl;
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/domain/ClassGrade.java

@@ -80,4 +80,6 @@ private static final long serialVersionUID=1L;
 
     /** 班級編碼 */
     private String gradeCode;
+    /** 官方学习地址 */
+    private String officialLearningUrl;
 }

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

@@ -146,4 +146,8 @@ public class ClassGradeVo {
 	/** 已做试卷 */
 	@ApiModelProperty("已做试卷")
 	private Long recordNum;
+	/** 官方学习地址 */
+	@Excel(name = "官方学习地址")
+	@ApiModelProperty("官方学习地址")
+	private String officialLearningUrl;
 }

+ 3 - 1
zhongzheng-system/src/main/resources/mapper/modules/course/CourseMapper.xml

@@ -103,6 +103,7 @@
         <result property="beforeName" column="before_name"/>
         <result property="rebuildNum" column="rebuildNum"/>
         <result property="rebuildStatus" column="rebuild_status"/>
+        <result property="orderGoodsId" column="order_goods_id"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.goods.vo.GoodsPeriodStatusVo" id="GoodsPeriodStatusVo">
@@ -398,7 +399,8 @@
             (case WHEN (SELECT COUNT(1) FROM exam_apply_goods eag LEFT JOIN exam_apply ea on eag.apply_id = ea.apply_id where eag.goods_id = cgg.goods_id and ea.`status` = 1 and unix_timestamp(now()) BETWEEN ea.apply_start_time and ea.apply_end_time) >0 then 1 ELSE 0 end) as apply_status,
             (case WHEN (SELECT COUNT(1) FROM exam_before_goods ebg LEFT JOIN exam_before eb on ebg.before_id = eb.before_id where ebg.goods_id = cgg.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) >0 then 1 ELSE 0 end) as before_status,
             (SELECT ea.apply_name FROM exam_apply_goods eag LEFT JOIN exam_apply ea on eag.apply_id = ea.apply_id where eag.goods_id = cgg.goods_id and ea.`status` = 1 and unix_timestamp(now()) BETWEEN ea.apply_start_time and ea.apply_end_time) as apply_name,
-            (SELECT eb.before_name FROM exam_before_goods ebg LEFT JOIN exam_before eb on ebg.before_id = eb.before_id where ebg.goods_id = cgg.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) as before_name
+            (SELECT eb.before_name FROM exam_before_goods ebg LEFT JOIN exam_before eb on ebg.before_id = eb.before_id where ebg.goods_id = cgg.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) as before_name,
+            (SELECT og.order_goods_id FROM order_goods og LEFT JOIN `order` o ON og.order_sn = o.order_sn WHERE og.grade_id = cgu.grade_id AND o.user_id = #{userId} AND og.refund_status != 2 AND og.pay_status IN (2,3)) as order_goods_id
         FROM
             class_grade_user cgu
                 LEFT JOIN class_grade_goods cgg ON cgu.grade_id = cgg.grade_id

+ 2 - 0
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="remark" column="remark"/>
         <result property="interfaceAccountId" column="interface_account_id"/>
         <result property="interfacePeriodId" column="interface_period_id"/>
+        <result property="officialLearningUrl" column="official_learning_url"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.grade.vo.ClassGradeVo" id="ClassGradeVoResult">
@@ -48,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="interfacePeriodName" column="interface_period_name"/>
         <result property="interfacePushName" column="interface_push_name"/>
         <result property="studentNum" column="student_num"/>
+        <result property="officialLearningUrl" column="official_learning_url"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.grade.vo.ClassGradeUserListVo" id="ClassGradeUserListVo">