ip 请求次数限制21
This commit is contained in:
parent
9ef5c4aa8a
commit
e68ff1a9a9
|
|
@ -13,5 +13,5 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface Limiting {
|
public @interface Limiting {
|
||||||
// 默认每秒放入桶中的token
|
// 默认每秒放入桶中的token
|
||||||
double limitNum() default 4;
|
double limitNum() default 5;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class AppOrdersController extends AbstractController {
|
||||||
@Login
|
@Login
|
||||||
@GetMapping("/insertCourseOrders")
|
@GetMapping("/insertCourseOrders")
|
||||||
@ApiOperation("生成商品订单")
|
@ApiOperation("生成商品订单")
|
||||||
@Debounce(interval = 20000, value = "#userId")
|
@Debounce(value = "#userId")
|
||||||
@Limiting
|
@Limiting
|
||||||
public Result insertCourseOrders(Long courseId,Long courseDetailsId, @RequestAttribute("userId") Long userId) {
|
public Result insertCourseOrders(Long courseId,Long courseDetailsId, @RequestAttribute("userId") Long userId) {
|
||||||
return ordersService.insertCourseOrders(courseId, courseDetailsId,userId);
|
return ordersService.insertCourseOrders(courseId, courseDetailsId,userId);
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ public class TaskCenterController {
|
||||||
@ApiImplicitParam(name = "taskId", value = "任务id", dataTypeClass = Long.class, paramType = "body"),
|
@ApiImplicitParam(name = "taskId", value = "任务id", dataTypeClass = Long.class, paramType = "body"),
|
||||||
@ApiImplicitParam(name = "sourceId", value = "实物(物品Id)", dataTypeClass = Long.class, paramType = "body")
|
@ApiImplicitParam(name = "sourceId", value = "实物(物品Id)", dataTypeClass = Long.class, paramType = "body")
|
||||||
})
|
})
|
||||||
@Debounce(interval = 600000, value = "#userId,#record.taskId")
|
@Debounce(value = "#userId,#record.taskId")
|
||||||
public Result receiveGoods(@ApiIgnore @RequestAttribute("userId") Long userId,@ApiIgnore @RequestBody TaskCenterRecord record) {
|
public Result receiveGoods(@ApiIgnore @RequestAttribute("userId") Long userId,@ApiIgnore @RequestBody TaskCenterRecord record) {
|
||||||
TaskCenter task = taskCenterService.getById(record.getTaskId());
|
TaskCenter task = taskCenterService.getById(record.getTaskId());
|
||||||
if (Objects.isNull(task)) {
|
if (Objects.isNull(task)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue