1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- 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.common.utils.ServletUtils;
- import com.zhongzheng.framework.web.service.WxTokenService;
- import com.zhongzheng.modules.exam.bo.*;
- import com.zhongzheng.modules.exam.service.IExamApplyGoodsService;
- import com.zhongzheng.modules.exam.service.IExamApplyService;
- import com.zhongzheng.modules.exam.service.IExamApplySiteService;
- import com.zhongzheng.modules.exam.vo.*;
- import com.zhongzheng.modules.user.entity.ClientLoginUser;
- 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("/apply")
- public class ExamApplyController extends BaseController {
- private final IExamApplyService iExamApplyService;
- private final IExamApplySiteService iExamApplySiteService;
- private final IExamApplyGoodsService iExamApplyGoodsService;
- private final WxTokenService wxTokenService;
- /**
- * 获取考试安排详细信息
- */
- @ApiOperation("点击预约报考按钮")
- @GetMapping("/subscribe")
- public AjaxResult<ExamUserApplyVo> subscribe(ExamApplyQueryBo bo) {
- ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
- bo.setUserId(loginUser.getUser().getUserId());
- ExamUserApplyVo examUserApplyVo = iExamApplyService.subscribe(bo);
- return AjaxResult.success(examUserApplyVo);
- }
- /**
- * 获取考试安排详细信息
- */
- @ApiOperation("预约报考下一步按钮 1 进入有考陪有考试地点得预约考试 2进入无考陪有考试地点预约考试 3无考试次数购买商品")
- @GetMapping("/subscribeNext")
- public AjaxResult<Long> subscribeNext(ExamApplyQueryBo bo) {
- ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
- bo.setUserId(loginUser.getUser().getUserId());
- Long count = iExamApplyService.subscribeNext(bo);
- return AjaxResult.success(count);
- }
- /**
- * 获取考试安排详细信息
- */
- @ApiOperation("获得考试的考试地点")
- @GetMapping("/subscribeApplySite")
- public AjaxResult<List<ExamUserApplySiteVo>> subscribeApplySite(ExamApplyQueryBo bo) {
- ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
- bo.setUserId(loginUser.getUser().getUserId());
- List<ExamUserApplySiteVo> count = iExamApplyService.subscribeApplySite(bo);
- return AjaxResult.success(count);
- }
- /**
- * 获取考试安排详细信息
- */
- @ApiOperation("获得考试的考培地点")
- @GetMapping("/subscribeApplySiteTrain")
- public AjaxResult<List<ExamUserApplySiteVo>> subscribeApplySiteTrain(ExamApplyQueryBo bo) {
- ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
- bo.setUserId(loginUser.getUser().getUserId());
- List<ExamUserApplySiteVo> count = iExamApplyService.subscribeApplySiteTrain(bo);
- return AjaxResult.success(count);
- }
- }
|