|
@@ -44,7 +44,7 @@ public class StudentApplyController extends BaseController {
|
|
|
public void save(@ApiParam("考点ID") @RequestParam Long examSiteId,
|
|
|
@ApiParam("预约时段ID") @RequestParam Long timePeriodId) {
|
|
|
RateLimitRule limitRule = RateLimitRule.parse(Constants.API_LIMIT_EXPRESSION);
|
|
|
- if (!rateLimitService.getRateLimiter("apply", null, limitRule).acquire()) {
|
|
|
+ if (!rateLimitService.getRateLimiter("apply_save", null, limitRule).acquire()) {
|
|
|
throw DefaultExceptionEnum.RATE_LIMITED.exception(Constants.SYSTEM_BUSY);
|
|
|
}
|
|
|
|
|
@@ -56,7 +56,7 @@ public class StudentApplyController extends BaseController {
|
|
|
public void cancel(@ApiParam("考点ID") @RequestParam Long examSiteId,
|
|
|
@ApiParam("预约时段ID") @RequestParam Long timePeriodId) {
|
|
|
RateLimitRule limitRule = RateLimitRule.parse(Constants.API_LIMIT_EXPRESSION);
|
|
|
- if (!rateLimitService.getRateLimiter("cancelApply", null, limitRule).acquire()) {
|
|
|
+ if (!rateLimitService.getRateLimiter("apply_cancel", null, limitRule).acquire()) {
|
|
|
throw DefaultExceptionEnum.RATE_LIMITED.exception(Constants.SYSTEM_BUSY);
|
|
|
}
|
|
|
|
|
@@ -72,6 +72,11 @@ public class StudentApplyController extends BaseController {
|
|
|
@ApiOperation(value = "获取考生当前进行中的预约列表(首页)")
|
|
|
@PostMapping(value = "/apply/list/for/current")
|
|
|
public List<ApplyVO> listForCurrent() {
|
|
|
+ RateLimitRule limitRule = RateLimitRule.parse(Constants.API_LIMIT_EXPRESSION);
|
|
|
+ if (!rateLimitService.getRateLimiter("apply_list", null, limitRule).acquire()) {
|
|
|
+ throw DefaultExceptionEnum.RATE_LIMITED.exception(Constants.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
return examReserveService.getStudentApplyListForCurrent(curLoginStudent());
|
|
|
}
|
|
|
|
|
@@ -108,4 +113,3 @@ public class StudentApplyController extends BaseController {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|