| | |
| | | return ResultMessage.ok(); |
| | | } |
| | | |
| | | /** |
| | | * @Description: 获取验证码是否开启 |
| | | * @Param: [] |
| | | * @return: com.moral.constant.ResultMessage |
| | | * @Author: 陈凯裕 |
| | | * @Date: 2021/3/18 |
| | | */ |
| | | |
| | | @ApiOperation(value = "获取验证码是否开启", notes = "获取验证码是否开启") |
| | | @RequestMapping(value = "verificationCode/config", method = RequestMethod.GET) |
| | | public void verifyConfig(HttpServletResponse response) { |
| | | public ResultMessage verifyConfig(HttpServletResponse response) { |
| | | QueryWrapper<SysConfig> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("type", Constants.VERIFICATION_TYPE); |
| | | queryWrapper.eq(Constants.FRONT_VERIFICATIONCODE_COLUMN, Constants.FRONT_ERIFICATIONCODE_VALUE); |
| | | SysConfig sysConfig = sysConfigService.getOne(queryWrapper); |
| | | String code = sysConfig.getCode(); |
| | | if (Constants.VERFICATIONCODE_OPEN.equals(code)) { |
| | | try { |
| | | response.sendRedirect("/verificationCode/get"); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if (Constants.VERFICATIONCODE_OPEN.equals(sysConfig.getCode())) { |
| | | return new ResultMessage(ResponseCodeEnum.VERIFICATION_OPEN,null); |
| | | } |
| | | return new ResultMessage(ResponseCodeEnum.VERIFICATION_CLOSE,null); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取验证码", notes = "获取验证码") |