采用阿里代码规约,对代码进行优化

This commit is contained in:
lifenlong
2021-07-09 01:56:24 +08:00
parent 9e240f22b6
commit 3e73257922
343 changed files with 2626 additions and 1476 deletions

View File

@@ -81,6 +81,7 @@ public class FileController {
if (file.getUserEnums().equals(authUser.getRole().name())) {
break;
}
default:
throw new ServiceException(ResultCode.USER_AUTHORITY_ERROR);
}
fileService.updateById(file);

View File

@@ -28,10 +28,9 @@ public class SliderImageController {
@Autowired
private VerificationService verificationService;
//一分钟同一个ip请求10次
@LimitPoint(name = "slider_image", key = "verification")
@GetMapping("/{verificationEnums}")
@ApiOperation(value = "获取校验接口")
@ApiOperation(value = "获取校验接口,一分钟同一个ip请求10次")
public ResultMessage getSliderImage(@RequestHeader String uuid, @PathVariable VerificationEnums verificationEnums) {
try {
return ResultUtil.data(verificationService.createVerification(verificationEnums, uuid));

View File

@@ -31,14 +31,13 @@ public class SmsController {
@Autowired
private VerificationService verificationService;
//一分钟同一个ip请求1次
@LimitPoint(name = "sms_send", key = "sms")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path", dataType = "String", name = "mobile", value = "手机号"),
@ApiImplicitParam(paramType = "header", dataType = "String", name = "uuid", value = "uuid"),
})
@GetMapping("/{verificationEnums}/{mobile}")
@ApiOperation(value = "发送短信验证码")
@ApiOperation(value = "发送短信验证码,一分钟同一个ip请求1次")
public ResultMessage getSmsCode(
@RequestHeader String uuid,
@PathVariable String mobile,