| | |
| | | package cc.mrbird.febs.mall.controller; |
| | | |
| | | import cc.mrbird.febs.common.annotation.ControllerEndpoint; |
| | | import cc.mrbird.febs.common.annotation.Limit; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.exception.FebsException; |
| | | import cc.mrbird.febs.common.utils.*; |
| | |
| | | |
| | | @ApiOperation(value = "获取验证码接口", notes = "获取验证码通用接口") |
| | | @GetMapping(value = "/verifyCode") |
| | | @Limit(key = "verifyCode", period = 60, count = 2, name = "验证码接口", prefix = "limit") |
| | | public FebsResponse verifyCode(@ApiParam(name = "account", value = "手机号", required = true) @RequestParam(value = "account") String account, |
| | | @ApiParam(name = "type", value = "类型1-手机号", required = true) @RequestParam("type") String type) { |
| | | log.info("#账号:{}, 类型:{}#", account, type); |
| | |
| | | |
| | | @ApiOperation(value = "验证验证码接口") |
| | | @PostMapping(value = "/checkCode") |
| | | @Limit(key = "verifyCode", period = 60, count = 2, name = "验证码接口", prefix = "limit") |
| | | public FebsResponse checkCode(@RequestBody AccountAndCodeDto accountAndCodeDto) { |
| | | |
| | | boolean flag = commonService.verifyCode(accountAndCodeDto.getAccount(), accountAndCodeDto.getCode()); |