From: qiaowei Date: Thu, 11 Jul 2019 03:04:50 +0000 (+0800) Subject: 修改手机接口 X-Git-Tag: 1.0.0^2~70 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=fe92dd3e1f8118075d07110ae535983fcc3b42db;p=epayment%2Ffood_payapi.git 修改手机接口 --- 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)!! }