| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | |
| | | code = captcha.getCode(); |
| | | } |
| | | redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES); |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | Map<String,Object> ajax = new HashMap<>(); |
| | | ajax.put("uuid", uuid); |
| | | ajax.put("img", captcha.getImageBase64()); |
| | | return ajax; |
| | | return AjaxResult.success(ajax); |
| | | } |
| | | |
| | | private String getCodeResult(String capStr) { |