From fe92dd3e1f8118075d07110ae535983fcc3b42db Mon Sep 17 00:00:00 2001 From: qiaowei Date: Thu, 11 Jul 2019 11:04:50 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B9=E6=89=8B=E6=9C=BA=E6=8E=A5?= =?utf8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../src/main/kotlin/com/supwisdom/dlpay/mobile/MobileApi.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 2f77261c..6694d817 100644 --- a/payapi/src/main/kotlin/com/supwisdom/dlpay/mobile/MobileApi.kt +++ b/payapi/src/main/kotlin/com/supwisdom/dlpay/mobile/MobileApi.kt @@ -85,6 +85,7 @@ class ApiInit { val temp = redisTemplate.opsForValue().get(phone) if (temp.isNullOrEmpty()) { val code = RandomUtils.randomNumber(6) + System.out.println(code) redisTemplate.opsForValue().set(phone, code, Duration.ofMinutes(5)) } //TODO call send code sdk @@ -239,6 +240,7 @@ class ApiV1 { val temp = redisTemplate.opsForValue().get(user.phone) if (temp.isNullOrEmpty()) { val code = RandomUtils.randomNumber(6) + System.out.println(code) redisTemplate.opsForValue().set(user.phone, code, Duration.ofMinutes(5)) } //TODO call send code sdk @@ -398,10 +400,12 @@ class ApiV1 { ?: return JsonResult.error("用户不存在,请注册") var signed="" if(!user.userid.isNullOrEmpty()){ - var card = mobileApiService.findCardByUserid(user.userid!!) ?: return JsonResult.error("卡片不存在,请重新绑定") + var card = mobileApiService.findCardByUserid(user.userid!!) ?: return JsonResult.error(-1,"卡片不存在,请重新绑定") if(card.signed){ signed = TradeDict.STATUS_YES } + }else{ + return JsonResult.error(-1,"请先绑定银行卡") } return JsonResult.ok("OK").put("page", page.pageContent)?.put("signed",signed)!! } -- 2.17.1