|
@@ -5,14 +5,14 @@ import com.zhongzheng.common.core.controller.BaseController;
|
|
|
import com.zhongzheng.common.core.domain.AjaxResult;
|
|
import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
import com.zhongzheng.common.core.page.TableDataInfo;
|
|
import com.zhongzheng.common.core.page.TableDataInfo;
|
|
|
import com.zhongzheng.common.enums.BusinessType;
|
|
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.bo.*;
|
|
|
import com.zhongzheng.modules.exam.service.IExamApplyGoodsService;
|
|
import com.zhongzheng.modules.exam.service.IExamApplyGoodsService;
|
|
|
import com.zhongzheng.modules.exam.service.IExamApplyService;
|
|
import com.zhongzheng.modules.exam.service.IExamApplyService;
|
|
|
import com.zhongzheng.modules.exam.service.IExamApplySiteService;
|
|
import com.zhongzheng.modules.exam.service.IExamApplySiteService;
|
|
|
-import com.zhongzheng.modules.exam.vo.ExamApplySiteVo;
|
|
|
|
|
-import com.zhongzheng.modules.exam.vo.ExamApplyVo;
|
|
|
|
|
-import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
|
|
|
|
|
-import com.zhongzheng.modules.exam.vo.ExamUserApplyVo;
|
|
|
|
|
|
|
+import com.zhongzheng.modules.exam.vo.*;
|
|
|
|
|
+import com.zhongzheng.modules.user.entity.ClientLoginUser;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -40,12 +40,16 @@ public class ExamApplyController extends BaseController {
|
|
|
|
|
|
|
|
private final IExamApplyGoodsService iExamApplyGoodsService;
|
|
private final IExamApplyGoodsService iExamApplyGoodsService;
|
|
|
|
|
|
|
|
|
|
+ private final WxTokenService wxTokenService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 获取考试安排详细信息
|
|
* 获取考试安排详细信息
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation("点击预约报考按钮")
|
|
@ApiOperation("点击预约报考按钮")
|
|
|
@GetMapping("/subscribe")
|
|
@GetMapping("/subscribe")
|
|
|
public AjaxResult<ExamUserApplyVo> subscribe(ExamApplyQueryBo bo) {
|
|
public AjaxResult<ExamUserApplyVo> subscribe(ExamApplyQueryBo bo) {
|
|
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
ExamUserApplyVo examUserApplyVo = iExamApplyService.subscribe(bo);
|
|
ExamUserApplyVo examUserApplyVo = iExamApplyService.subscribe(bo);
|
|
|
return AjaxResult.success(examUserApplyVo);
|
|
return AjaxResult.success(examUserApplyVo);
|
|
|
}
|
|
}
|
|
@@ -56,6 +60,8 @@ public class ExamApplyController extends BaseController {
|
|
|
@ApiOperation("预约报考下一步按钮 1 进入有前陪有考试地点得预约考试 2进入无前陪有考试地点预约考试 3无考试次数购买商品")
|
|
@ApiOperation("预约报考下一步按钮 1 进入有前陪有考试地点得预约考试 2进入无前陪有考试地点预约考试 3无考试次数购买商品")
|
|
|
@GetMapping("/subscribeNext")
|
|
@GetMapping("/subscribeNext")
|
|
|
public AjaxResult<Long> subscribeNext(ExamApplyQueryBo bo) {
|
|
public AjaxResult<Long> subscribeNext(ExamApplyQueryBo bo) {
|
|
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
Long count = iExamApplyService.subscribeNext(bo);
|
|
Long count = iExamApplyService.subscribeNext(bo);
|
|
|
return AjaxResult.success(count);
|
|
return AjaxResult.success(count);
|
|
|
}
|
|
}
|
|
@@ -64,12 +70,14 @@ public class ExamApplyController extends BaseController {
|
|
|
/**
|
|
/**
|
|
|
* 获取考试安排详细信息
|
|
* 获取考试安排详细信息
|
|
|
*/
|
|
*/
|
|
|
-/* @ApiOperation("预约报考下一步按钮 1 进入有前陪有考试地点得预约考试 2进入无前陪有考试地点预约考试 3无考试次数购买商品")
|
|
|
|
|
- @GetMapping("/subscribeNext")
|
|
|
|
|
- public AjaxResult<Long> subscribeNext(ExamApplyQueryBo bo) {
|
|
|
|
|
- Long count = iExamApplyService.subscribeNext(bo);
|
|
|
|
|
|
|
+ @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);
|
|
return AjaxResult.success(count);
|
|
|
- }*/
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|