|
@@ -129,12 +129,12 @@ public class AnalysisController {
|
|
*/
|
|
*/
|
|
@PostMapping("/record")
|
|
@PostMapping("/record")
|
|
public JsonResult<Integer> record(@Valid @RequestBody CompanyDTO dto) {
|
|
public JsonResult<Integer> record(@Valid @RequestBody CompanyDTO dto) {
|
|
- String verifySms = stringRedisTemplate.opsForValue().get(dto.getPhone());
|
|
|
|
- AssertUtil.isTrue(!StringUtil.isEmpty(verifySms), "请先获取验证码");
|
|
|
|
- AssertUtil.isTrue(!dto.getVerifyCode().equals(verifySms), "验证码输入错误,请重试");
|
|
|
|
- stringRedisTemplate.delete(dto.getPhone()); //删除验证码
|
|
|
|
int id;
|
|
int id;
|
|
try {
|
|
try {
|
|
|
|
+ String verifySms = stringRedisTemplate.opsForValue().get(dto.getPhone());
|
|
|
|
+ AssertUtil.isTrue(StringUtil.isEmpty(verifySms), "请先获取验证码");
|
|
|
|
+ AssertUtil.isTrue(!dto.getVerifyCode().equals(verifySms), "验证码输入错误,请重试");
|
|
|
|
+ stringRedisTemplate.delete(dto.getPhone()); //删除验证码
|
|
id = analysisModel.record(dto);
|
|
id = analysisModel.record(dto);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error(e.getMessage(),e);
|
|
log.error(e.getMessage(),e);
|