幂等注解 Idempotent 增加 sessionId(是否为会话级别的幂等验证)和 cacheName(可以自定义缓存名)参数

This commit is contained in:
thinkgem
2025-09-24 22:06:55 +08:00
parent 5cc48c44e5
commit 3995397ef9

View File

@@ -178,7 +178,7 @@ public class EmpUserController extends BaseController {
@RequiresPermissions(value={"sys:empUser:edit","sys:empUser:authRole"}, logical=Logical.OR)
@PostMapping(value = "save")
@ResponseBody
//@Idempotent // 幂等示例,默认规则:10秒内,相同的会话和相同的提交内容,会提示“请不要频繁操作”
//@Idempotent // 幂等示例,默认规则:5秒内,相同的会话和相同的提交内容,会提示“请不要频繁操作”
public String save(@Validated EmpUser empUser, @Parameter(description = "操作类型") String op, HttpServletRequest request) {
if (!EmpUser.USER_TYPE_EMPLOYEE.equals(empUser.getUserType())){
return renderResult(Global.FALSE, "非法操作,不能够操作此用户!");