ip 请求次数限制21
This commit is contained in:
parent
9ef5c4aa8a
commit
e68ff1a9a9
|
|
@ -13,5 +13,5 @@ import java.lang.annotation.Target;
|
|||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Limiting {
|
||||
// 默认每秒放入桶中的token
|
||||
double limitNum() default 4;
|
||||
double limitNum() default 5;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class AppOrdersController extends AbstractController {
|
|||
@Login
|
||||
@GetMapping("/insertCourseOrders")
|
||||
@ApiOperation("生成商品订单")
|
||||
@Debounce(interval = 20000, value = "#userId")
|
||||
@Debounce(value = "#userId")
|
||||
@Limiting
|
||||
public Result insertCourseOrders(Long courseId,Long courseDetailsId, @RequestAttribute("userId") Long 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 = "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) {
|
||||
TaskCenter task = taskCenterService.getById(record.getTaskId());
|
||||
if (Objects.isNull(task)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue