This commit is contained in:
2025-10-21 23:37:01 +08:00
parent 1ae79d2f2f
commit 444607ee64
2 changed files with 282 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ public class PublicOrderController extends BaseController {
* 提交订单
*
* 限流策略:
* - 每个IP分钟最多3次请求
* - 每个IP半小时30分钟最多20次请求
* - 防止恶意刷单和攻击
*
* @param body 请求体包含command字段
@@ -49,8 +49,8 @@ public class PublicOrderController extends BaseController {
@PostMapping("/submit")
@RateLimiter(
key = CacheConstants.RATE_LIMIT_KEY,
time = 60,
count = 3,
time = 1800,
count = 20,
limitType = LimitType.IP
)
public AjaxResult submit(@RequestBody Map<String, String> body, HttpServletRequest request) {