From 4f6409f0070e7f70bc563ece4900837dcd25d863 Mon Sep 17 00:00:00 2001 From: qiaowei Date: Tue, 24 Sep 2019 17:33:23 +0800 Subject: [PATCH] =?utf8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95=E4=BB=A3?= =?utf8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../src/main/kotlin/com/supwisdom/dlpay/mobile/MobileApi.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/payapi/src/main/kotlin/com/supwisdom/dlpay/mobile/MobileApi.kt b/payapi/src/main/kotlin/com/supwisdom/dlpay/mobile/MobileApi.kt index 4f38c76a..6e2de3cb 100644 --- a/payapi/src/main/kotlin/com/supwisdom/dlpay/mobile/MobileApi.kt +++ b/payapi/src/main/kotlin/com/supwisdom/dlpay/mobile/MobileApi.kt @@ -99,6 +99,7 @@ class ApiInit { val code = RandomUtils.randomNumber(6) logger.error { code } //TODO 先发送成功,再放入redis + redisTemplate.opsForValue().set(phone, code, Duration.ofMinutes(5)) val rs = mobileApiService.sendSms(phone, code) if ("0" != rs.retcode) { return JsonResult.error(rs.retmsg) @@ -330,6 +331,9 @@ class ApiV1 { val temp = redisTemplate.opsForValue().get(user.phone!!) if (temp.isNullOrEmpty()) { val code = RandomUtils.randomNumber(6) + logger.error { code } + //TODO delete it in product + redisTemplate.opsForValue().set(user.loginid, code, Duration.ofMinutes(5)) val rs = mobileApiService.sendSms(user.phone!!, code) if ("0" != rs.retcode) { return JsonResult.error(rs.retmsg) -- 2.17.1