|
|
@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
@Api(tags = "系统用户相关API")
|
|
|
@RestController
|
|
|
@@ -127,6 +128,28 @@ public class SysUserController extends ApiBaseController {
|
|
|
return AjaxResult.success().putKV("sysUser",user);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "测试接口访问超时",
|
|
|
+ notes = "参数:{" +
|
|
|
+ "waitingTime:int秒}")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "params" , paramType = "body")
|
|
|
+ })
|
|
|
+ @PostMapping("testAccessTimeout")
|
|
|
+ public Object testAccessTimeout() throws Exception{
|
|
|
+ ParameterObject obj = getParameterObject();
|
|
|
+ obj.checkParameterNotNull("waitingTime");
|
|
|
+ String waitingTime =obj.getString("waitingTime");
|
|
|
+ int i = Integer.parseInt(waitingTime);
|
|
|
+ if (a<3) {
|
|
|
+ TimeUnit.SECONDS.sleep(i);//秒
|
|
|
+ }
|
|
|
+ a=a++;
|
|
|
+ System.out.println("访问次数");
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ private int a=0;
|
|
|
+
|
|
|
@ApiOperation(value = "获取销售员列表",
|
|
|
notes = "参数:{" +
|
|
|
"bossEmployeeId:xxxxxx}")
|