change 3 éve
szülő
commit
0b99a1d486

+ 19 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/grade/SaticScheduleTask.java

@@ -0,0 +1,19 @@
+package com.zhongzheng.controller.grade;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+
+import java.time.LocalDateTime;
+
+@Configuration      //1.主要用于标记配置类,兼备Component的效果。
+@EnableScheduling   // 2.开启定时任务
+public class SaticScheduleTask {
+    //3.添加定时任务
+    //@Scheduled(cron = "0/2 * * * * ?")
+    //或直接指定时间间隔,例如:5秒
+    //@Scheduled(fixedRate=5000)
+    private void configureTasks() {
+        System.err.println("执行静态定时任务时间: " + LocalDateTime.now());
+    }
+}

+ 48 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/exam/ExamBeforeController.java

@@ -0,0 +1,48 @@
+package com.zhongzheng.controller.exam;
+
+import com.zhongzheng.common.annotation.Log;
+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.enums.BusinessType;
+import com.zhongzheng.modules.exam.bo.*;
+import com.zhongzheng.modules.exam.service.IExamBeforeGoodsService;
+import com.zhongzheng.modules.exam.service.IExamBeforeService;
+import com.zhongzheng.modules.exam.service.IExamBeforeUrlService;
+import com.zhongzheng.modules.exam.vo.ExamBeforeUrlVo;
+import com.zhongzheng.modules.exam.vo.ExamBeforeVo;
+import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 前培安排Controller
+ * 
+ * @author ruoyi
+ * @date 2021-12-07
+ */
+@Api(value = "前培安排控制器", tags = {"前培安排管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/app/before")
+public class ExamBeforeController extends BaseController {
+
+    private final IExamBeforeService iExamBeforeService;
+    private final IExamBeforeUrlService iExamBeforeUrlService;
+    private final IExamBeforeGoodsService iExamBeforeGoodsService;
+
+    /**
+     * 获取前培安排详细信息
+     */
+    @ApiOperation("获得刷题地址")
+    @GetMapping("/address")
+    public AjaxResult<ExamBeforeVo> getAddressInfo(ExamBeforeQueryBo examBeforeQueryBo) {
+        return AjaxResult.success(iExamBeforeService.getAddressInfo(examBeforeQueryBo));
+    }
+}

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamBeforeQueryBo.java

@@ -40,6 +40,9 @@ public class ExamBeforeQueryBo extends BaseEntity {
 	/** 前陪ID */
 	@ApiModelProperty("前陪ID")
 	private Long beforeId;
+	/** 商品ID */
+	@ApiModelProperty("商品ID")
+	private Long goodsId;
 	/** 编码 */
 	@ApiModelProperty("编码")
 	private String code;

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/mapper/ExamBeforeMapper.java

@@ -28,4 +28,6 @@ public interface ExamBeforeMapper extends BaseMapper<ExamBefore> {
     Integer countBeforeGoods(Long beforeId);
 
     Integer beforeGoods(Long beforeId);
+
+    Long verifyInfo(Long goodsId);
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/IExamBeforeService.java

@@ -52,4 +52,6 @@ public interface IExamBeforeService extends IService<ExamBefore> {
     List<ExamNumberGoodsVo> listGoods(ExamNumberGoodsQueryBo bo);
 
     ExamBeforeVo getGoodsInfo(ExamBeforeQueryBo bo);
+
+	ExamBeforeVo getAddressInfo(ExamBeforeQueryBo examBeforeQueryBo);
 }

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamBeforeServiceImpl.java

@@ -144,4 +144,10 @@ public class ExamBeforeServiceImpl extends ServiceImpl<ExamBeforeMapper, ExamBef
         examBeforeVo.setGoodsId(array);
         return examBeforeVo;
     }
+
+    @Override
+    public ExamBeforeVo getAddressInfo(ExamBeforeQueryBo examBeforeQueryBo) {
+        Long verLong = baseMapper.verifyInfo(examBeforeQueryBo.getGoodsId());
+        return null;
+    }
 }

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

@@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             (SELECT u.id_card FROM `user` u where us.user_id = u.user_id) as id_card,
             (SELECT ea.apply_name FROM exam_apply ea where ea.apply_id = us.apply_id) as apply_name,
             (SELECT ea.apply_start_time FROM exam_apply ea where ea.apply_id = us.apply_id) as apply_start_time,
-            (SELECT ea.applyEndTime FROM exam_apply ea where ea.apply_id = us.apply_id) as apply_end_time,
+            (SELECT ea.apply_end_time FROM exam_apply ea where ea.apply_id = us.apply_id) as apply_end_time,
             (SELECT eb.before_name FROM exam_before eb where eb.before_id = us.before_id) as before_name
         FROM
             user_subscribe us