| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | |
| | | String code = new CreateVerifyCode().randomStr(4); |
| | | // 缓存验证码 |
| | | redisTemplate.set(captchaId, code, 2L, TimeUnit.MINUTES); |
| | | return ResultUtil.data(captchaId); |
| | | Map<String,String> map = new HashMap<String,String>(); |
| | | map.put("captchaId",captchaId); |
| | | map.put("code",code); |
| | | return ResultUtil.data(map); |
| | | } |
| | | |
| | | @RequestMapping(value = "/draw/{captchaId}", method = RequestMethod.GET) |