|
1
|
package com.begete.web.controller.tool;
|
1
|
package com.begete.web.controller.tool;
|
|
2
|
|
2
|
|
|
3
|
-import java.util.ArrayList;
|
|
|
|
4
|
-import java.util.LinkedHashMap;
|
|
|
|
5
|
-import java.util.List;
|
|
|
|
6
|
-import java.util.Map;
|
|
|
|
7
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
8
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
9
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
10
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
11
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
12
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
13
|
-import org.springframework.web.bind.annotation.RestController;
|
3
|
+import java.util.*;
|
|
|
|
4
|
+
|
|
|
|
5
|
+import com.begete.common.annotation.RepeatSubmit;
|
|
|
|
6
|
+import org.springframework.web.bind.annotation.*;
|
|
14
|
import com.begete.common.core.controller.BaseController;
|
7
|
import com.begete.common.core.controller.BaseController;
|
|
15
|
import com.begete.common.core.domain.AjaxResult;
|
8
|
import com.begete.common.core.domain.AjaxResult;
|
|
16
|
import com.begete.common.utils.StringUtils;
|
9
|
import com.begete.common.utils.StringUtils;
|
|
@@ -36,6 +29,15 @@ public class TestController extends BaseController |
|
@@ -36,6 +29,15 @@ public class TestController extends BaseController |
|
36
|
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
|
29
|
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
|
|
37
|
}
|
30
|
}
|
|
38
|
|
31
|
|
|
|
|
32
|
+
|
|
|
|
33
|
+ @ApiOperation("测试重复提交")
|
|
|
|
34
|
+ @RepeatSubmit
|
|
|
|
35
|
+ @PostMapping("/testRepeat")
|
|
|
|
36
|
+ public AjaxResult testRepeat(@RequestBody HashMap map) throws InterruptedException {
|
|
|
|
37
|
+ Thread.sleep(2000);
|
|
|
|
38
|
+ return AjaxResult.success(map);
|
|
|
|
39
|
+ }
|
|
|
|
40
|
+
|
|
39
|
@ApiOperation("获取用户列表")
|
41
|
@ApiOperation("获取用户列表")
|
|
40
|
@GetMapping("/list")
|
42
|
@GetMapping("/list")
|
|
41
|
public AjaxResult userList()
|
43
|
public AjaxResult userList()
|