Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

yangdamao 2 lat temu
rodzic
commit
f9d319743e
17 zmienionych plików z 181 dodań i 8 usunięć
  1. 15 3
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/common/CommonController.java
  2. 9 0
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/order/OrderBusinessConfigGoodsController.java
  3. 1 0
      zhongzheng-framework/src/main/java/com/zhongzheng/framework/config/SecurityConfig.java
  4. 6 0
      zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java
  5. 2 2
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamServiceImpl.java
  6. 25 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/ReplenishExamBo.java
  7. 28 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/vo/ReplenishExamVo.java
  8. 5 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/mapper/GoodsMapper.java
  9. 4 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/IGoodsService.java
  10. 5 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java
  11. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/mapper/OrderBusinessConfigGoodsMapper.java
  12. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderBusinessConfigGoodsService.java
  13. 5 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderBusinessConfigGoodsServiceImpl.java
  14. 8 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserImportAddBo.java
  15. 13 0
      zhongzheng-system/src/main/resources/mapper/modules/goods/GoodsMapper.xml
  16. 3 2
      zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml
  17. 48 1
      zhongzheng-system/src/main/resources/mapper/modules/order/OrderBusinessConfigGoodsMapper.xml

+ 15 - 3
zhongzheng-admin/src/main/java/com/zhongzheng/controller/common/CommonController.java

@@ -30,7 +30,9 @@ import com.zhongzheng.modules.bank.service.IExamService;
 import com.zhongzheng.modules.bank.service.IQuestionOtherService;
 import com.zhongzheng.modules.base.bo.ConfigQueryBo;
 import com.zhongzheng.modules.course.bo.ExternalQuestionBo;
+import com.zhongzheng.modules.course.bo.ReplenishExamBo;
 import com.zhongzheng.modules.course.vo.ExternalQuestionVo;
+import com.zhongzheng.modules.course.vo.ReplenishExamVo;
 import com.zhongzheng.modules.distribution.bo.DistributionActivityGoodsQueryBo;
 import com.zhongzheng.modules.distribution.bo.DistributionCashWithdrawalPayBo;
 import com.zhongzheng.modules.distribution.service.IDistributionActivityGoodsService;
@@ -353,13 +355,23 @@ public class CommonController extends BaseController {
     @ApiOperation("获取外部题库商品(山东题库)")
     @PostMapping("common/external/question")
     public AjaxResult getExternalQuestion(@RequestBody ExternalQuestionBo bo) {
-//        if (!ToolsUtils.checkSignFromOldSys(bo.getStamp().toString(), bo.getSign())) {
-//            return AjaxResult.error("签名错误");
-//        }
+        if (!ToolsUtils.checkSignFromOldSys(bo.getStamp().toString(), bo.getSign())) {
+            return AjaxResult.error("签名错误");
+        }
         List<ExternalQuestionVo> questionVos = iGoodsService.getExternalQuestion(bo);
         return AjaxResult.success(questionVos);
     }
 
+    @ApiOperation("获取补考商品")
+    @PostMapping("common/replenish/exam")
+    public AjaxResult getReplenishExam(@RequestBody ReplenishExamBo bo) {
+        if (!ToolsUtils.checkSignFromOldSys(bo.getStamp().toString(), bo.getSign())) {
+            return AjaxResult.error("签名错误");
+        }
+        List<ReplenishExamVo> questionVos = iGoodsService.getReplenishExam(bo);
+        return AjaxResult.success(questionVos);
+    }
+
 
     @ApiOperation("获取某场考试信息")
     @PostMapping("common/apply/detail")

+ 9 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/order/OrderBusinessConfigGoodsController.java

@@ -54,6 +54,15 @@ public class OrderBusinessConfigGoodsController extends BaseController {
         return getDataTable(list);
     }
 
+    @ApiOperation("查询订单配置合并商品列表")
+    @PreAuthorize("@ss.hasPermi('system:goods:list')")
+    @GetMapping("/mergeList")
+    public TableDataInfo<OrderBusinessConfigGoodsVo> mergeList(OrderBusinessConfigGoodsQueryBo bo) {
+        startPage();
+        List<OrderBusinessConfigGoodsVo> list = iOrderBusinessConfigGoodsService.selectMergeList(bo);
+        return getDataTable(list);
+    }
+
 
 
     /**

+ 1 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/config/SecurityConfig.java

@@ -145,6 +145,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers("/common/get/goods/studyUrl").anonymous()
                 .antMatchers("/common/apply/detail").anonymous()
                 .antMatchers("/common/external/question").anonymous()
+                .antMatchers("/common/replenish/exam").anonymous()
                 .antMatchers("/common/student/image/update").anonymous()
                 .antMatchers("/common/platform/pay").anonymous()
                 .antMatchers("/common/platform/pay/handle").anonymous()

+ 6 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -861,6 +861,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
             SnowflakeIdUtils idWorker = new SnowflakeIdUtils(3, 1);
             inertData.setUserAccount(String.valueOf(idWorker.nextId()));
             inertData.setSex(1);
+            if(Validator.isNotEmpty(itemImport.getSex())){
+                inertData.setSex(itemImport.getSex().equals("女")?2:1);
+            }
+            if(Validator.isNotEmpty(itemImport.getEduLevel())){
+                inertData.setEduLevel(itemImport.getEduLevel());
+            }
             inertData.setIdCard(itemImport.getIdCard());
             inertData.setRealname(itemImport.getRealname());
             if (StringUtils.isNotBlank(itemImport.getCompanyName())) {

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamServiceImpl.java

@@ -351,7 +351,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
 
     @Override
     public boolean getShanDongExam(Long userId,String majorname,Long relExamId) {
-        Boolean getNew = false;
+        Boolean getNew = true;
         User user = iUserService.getOne(new LambdaQueryWrapper<User>()
                 .eq(User::getUserId, userId).last("limit 1"));
         String idnum = user.getIdCard();
@@ -374,6 +374,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
                 if (!respone.contains("\"msg\":\"获取成功\"")) {
                     throw new CustomException("同步请求错误" + respone);
                 }
+                System.out.println(respone);
                 QuestionOtherAddBo addBo = new QuestionOtherAddBo();
                 addBo.setJsonStr(respone);
                 addBo.setFromPlat(1);
@@ -382,7 +383,6 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
                 addBo.setRelExamId(relExamId);
                 Long id = iQuestionOtherService.insertByAddBo(addBo);
                 iQuestionOtherService.queryById(id);
-        //        System.out.println(respone);
             } catch (Exception e) {
                 throw new CustomException("同步请求错误" + e.getMessage());
             }

+ 25 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/ReplenishExamBo.java

@@ -0,0 +1,25 @@
+package com.zhongzheng.modules.course.bo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @author yangdamao
+ * @date 2023年09月20日 9:05
+ */
+@Data
+public class ReplenishExamBo implements Serializable {
+
+    @ApiModelProperty("当前时间戳")
+    @NotBlank(message = "当前时间戳不能为空")
+    private Long stamp;
+
+    @ApiModelProperty("签名")
+    @NotBlank(message = "签名不能为空")
+    private String sign;
+
+    private Long tenantId;
+}

+ 28 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/vo/ReplenishExamVo.java

@@ -0,0 +1,28 @@
+package com.zhongzheng.modules.course.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author yangdamao
+ * @date 2023年09月12日 8:52
+ */
+@Data
+public class ReplenishExamVo implements Serializable {
+
+    @ApiModelProperty("商品ID")
+    private Long goodsId;
+
+    @ApiModelProperty("商品名称")
+    private String goodsName;
+
+    @ApiModelProperty("商品价格")
+    private BigDecimal goodsPrice;
+
+    @ApiModelProperty("封面地址")
+    private String coverUrl;
+
+}

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/mapper/GoodsMapper.java

@@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.zhongzheng.modules.course.bo.CourseQueryBo;
 import com.zhongzheng.modules.course.bo.ExternalQuestionBo;
+import com.zhongzheng.modules.course.bo.ReplenishExamBo;
 import com.zhongzheng.modules.course.vo.CourseVo;
 import com.zhongzheng.modules.course.vo.ExternalQuestionVo;
+import com.zhongzheng.modules.course.vo.ReplenishExamVo;
 import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
 import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
 import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
@@ -91,4 +93,7 @@ public interface GoodsMapper extends BaseMapper<Goods> {
 
     @InterceptorIgnore(tenantLine = "true")
     List<ExternalQuestionVo> getExternalQuestion(ExternalQuestionBo bo);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<ReplenishExamVo> getReplenishExam(ReplenishExamBo bo);
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/IGoodsService.java

@@ -3,8 +3,10 @@ package com.zhongzheng.modules.goods.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.zhongzheng.modules.course.bo.CourseQueryBo;
 import com.zhongzheng.modules.course.bo.ExternalQuestionBo;
+import com.zhongzheng.modules.course.bo.ReplenishExamBo;
 import com.zhongzheng.modules.course.vo.CourseModuleFreeExamVo;
 import com.zhongzheng.modules.course.vo.ExternalQuestionVo;
+import com.zhongzheng.modules.course.vo.ReplenishExamVo;
 import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
 import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
 import com.zhongzheng.modules.goods.bo.*;
@@ -152,4 +154,6 @@ public interface IGoodsService extends IService<Goods> {
 	Map<String,String> checkUserAccount(UserGoodsListBo bo);
 
     List<ExternalQuestionVo> getExternalQuestion(ExternalQuestionBo bo);
+
+	List<ReplenishExamVo> getReplenishExam(ReplenishExamBo bo);
 }

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -5154,6 +5154,11 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
         return questionVos;
     }
 
+    @Override
+    public List<ReplenishExamVo> getReplenishExam(ReplenishExamBo bo) {
+        return baseMapper.getReplenishExam(bo);
+    }
+
     private void updateHandoutsId(Long goodsId, Long tenantId, Long handoutsId) {
         baseMapper.updateHandoutsId(goodsId,tenantId,handoutsId);
     }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/mapper/OrderBusinessConfigGoodsMapper.java

@@ -18,4 +18,6 @@ import java.util.List;
  */
 public interface OrderBusinessConfigGoodsMapper extends BaseMapper<OrderBusinessConfigGoods> {
     List<OrderBusinessConfigGoodsVo> selectList(OrderBusinessConfigGoodsQueryBo bo);
+
+    List<OrderBusinessConfigGoodsVo> selectMergeList(OrderBusinessConfigGoodsQueryBo bo);
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderBusinessConfigGoodsService.java

@@ -51,4 +51,6 @@ public interface IOrderBusinessConfigGoodsService extends IService<OrderBusiness
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
 
 	List<OrderBusinessConfigGoodsVo> selectList(OrderBusinessConfigGoodsQueryBo bo);
+
+	List<OrderBusinessConfigGoodsVo> selectMergeList(OrderBusinessConfigGoodsQueryBo bo);
 }

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderBusinessConfigGoodsServiceImpl.java

@@ -113,4 +113,9 @@ public class OrderBusinessConfigGoodsServiceImpl extends ServiceImpl<OrderBusine
     public List<OrderBusinessConfigGoodsVo> selectList(OrderBusinessConfigGoodsQueryBo bo) {
         return this.baseMapper.selectList(bo);
     }
+
+    @Override
+    public List<OrderBusinessConfigGoodsVo> selectMergeList(OrderBusinessConfigGoodsQueryBo bo) {
+        return this.baseMapper.selectMergeList(bo);
+    }
 }

+ 8 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserImportAddBo.java

@@ -37,6 +37,14 @@ public class UserImportAddBo {
     @ApiModelProperty("科目,多个,拼接")
     private String subjectNames;
 
+    @Excel(name = "性别")
+    @ApiModelProperty("性别")
+    private String sex;
+
+    @Excel(name = "学历")
+    @ApiModelProperty("学历")
+    private String eduLevel;
+
     @Excel(name = "失败原因")
     private String cause;
 

+ 13 - 0
zhongzheng-system/src/main/resources/mapper/modules/goods/GoodsMapper.xml

@@ -817,6 +817,19 @@
           AND g.`status` = 1
     </select>
 
+    <select id="getReplenishExam" parameterType="com.zhongzheng.modules.course.bo.ReplenishExamBo" resultType="com.zhongzheng.modules.course.vo.ReplenishExamVo">
+        SELECT
+            g.goods_id,
+            g.goods_name,
+            g.stand_price AS goodsPrice,
+            g.cover_url
+        FROM
+            goods g
+        WHERE
+            g.`status` = 1
+            and g.unify_sign = 1
+    </select>
+
     <select id="queryGoodsByIdTenant" parameterType="map" resultType="com.zhongzheng.modules.goods.domain.Goods">
         SELECT *
         FROM `goods`

+ 3 - 2
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -1563,8 +1563,9 @@
           AND g.`status` = 1
           AND gu.`status` = 1
           AND gu.change_grade = 0
-          AND IFNULL(gu.period_plush,0) != 1
-          AND gu.period_status = 1
+          AND IFNULL( gu.period_plush, 0 ) != 1
+	AND gu.period_status = 1
+	AND gu.official_status = 1
     </select>
 
     <select id="selectGoodsGradeList" parameterType="Long" resultMap="ClassGradeUserGoodsVoResult">

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

@@ -62,6 +62,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <select id="selectList" parameterType="com.zhongzheng.modules.order.bo.OrderBusinessConfigGoodsQueryBo" resultMap="OrderBusinessConfigGoodsVoResult">
+        SELECT
+        bcg.*,
+        cs.subject_name,
+        obc.config_name
+        FROM
+        order_business_config_goods bcg
+        LEFT JOIN order_business_config obc ON bcg.config_id = obc.id
+        LEFT JOIN course_business cb ON obc.business_id = cb.id
+        LEFT JOIN course_project_type cpt ON cb.project_id = cpt.id
+        LEFT JOIN course_education_type cet ON cet.id = cpt.education_id
+        LEFT JOIN course_subject cs on bcg.subject_id = cs.id
+        WHERE
+        obc.`status` = 1
+        and bcg.`status` = 1
+        <if test="configId != null and configId != ''">
+            and bcg.config_id = #{configId}
+        </if>
+        <if test="gradeType != null and gradeType != ''">
+            and obc.grade_type = #{gradeType}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            and obc.business_id = #{businessId}
+        </if>
+        <if test="projectId != null and projectId != ''">
+            and cpt.id = #{projectId}
+        </if>
+        <if test="educationId != null and educationId != ''">
+            and cet.id = #{educationId}
+        </if>
+        <if test="subjectId != null and subjectId != ''">
+            and bcg.subject_id = #{subjectId}
+        </if>
+        <if test="businessName != null and businessName != ''">
+            and cb.business_name = #{businessName}
+        </if>
+        <if test="projectName != null and projectName != ''">
+            and cpt.project_name = #{projectName}
+        </if>
+        <if test="educationName != null and educationName != ''">
+            and cet.education_name = #{educationName}
+        </if>
+        <if test="subjectName != null and subjectName != ''">
+            and cs.subject_name = #{subjectName}
+        </if>
+    </select>
+
+
+    <select id="selectMergeList" parameterType="com.zhongzheng.modules.order.bo.OrderBusinessConfigGoodsQueryBo" resultMap="OrderBusinessConfigGoodsVoResult">
         SELECT
         bcg.config_id,
         any_value ( obc.config_name ) config_name,
@@ -108,5 +156,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
         GROUP BY bcg.config_id
     </select>
-
 </mapper>