Commit 6f560271 authored by alex yao's avatar alex yao

feat: collectOrCancelAgentInPerson 限流

parent 264eecad
......@@ -7,6 +7,7 @@ import cn.com.poc.agent_application.entity.*;
import cn.com.poc.agent_application.query.AgentApplicationInfoQueryCondition;
import cn.com.poc.agent_application.rest.AgentApplicationInfoRest;
import cn.com.poc.agent_application.service.*;
import cn.com.poc.common.annotation.RedisLimit;
import cn.com.poc.common.constant.CommonConstant;
import cn.com.poc.common.service.RedisService;
import cn.com.poc.common.utils.BlContext;
......@@ -347,6 +348,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
}
@Override
@RedisLimit(key = "collect:agent_person", currentUser = true, count = 1, timeout = 1, exceptionInfo = "exception/too.many.requests")
public void collectOrCancelAgentInPerson(String agentId) throws Exception {
Assert.notNull(agentId);
agentApplicationInfoService.collectOrCancelAgentInPerson(agentId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment