From 5315d8ddbc569b1365bd5f51971af690c07748a8 Mon Sep 17 00:00:00 2001 From: duLingLing Date: Tue, 5 Nov 2019 14:31:07 +0800 Subject: [PATCH] =?UTF-8?q?Upd:=E4=BF=AE=E6=94=B9=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9F=AD=E4=BF=A1=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../payment/manage/appclient/core/RetailAppService.java | 2 +- .../manage/appclient/core/impls/RetailAppServiceImp.java | 7 ++++--- .../payment/manage/appclient/web/RetailAppController.java | 5 ++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 8911eba45..052c04bab 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 manage - 1.2.58 + 1.2.59 UTF-8 diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java index 90eac6ea6..782c9d590 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java @@ -189,7 +189,7 @@ public interface RetailAppService { void updateAccountEmail(JSONObject device, JSONObject codekey); - void bindAccountPhone(JSONObject device, JSONObject phone); + void bindAccountPhone(JSONObject device); JSONObject updateAccountPhone(JSONObject device,JSONObject codekey); diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java index bec9140bc..e162f3ce1 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java @@ -2133,15 +2133,16 @@ public class RetailAppServiceImp implements RetailAppService { } @Override - public void bindAccountPhone(JSONObject device, JSONObject phone) { + public void bindAccountPhone(JSONObject device) { String codeKey = device.getString("account_id"); String codeKeyValueRedis = stringRedisTemplate.boundValueOps(getUpdateAccountPhoneKey(codeKey)).get(); if (StringUtils.isNotEmpty(codeKeyValueRedis)) { throw new BadRequestException("Captcha has been sent.Please check your phone or try again in 1 minutes."); } + JSONObject client = clientAccountMapper.findById(device.getString("account_id")); String codeKeyValue = RandomStringUtils.random(6, false, true); - String nationCode = phone.getString("nation_code").contains("+")?phone.getString("nation_code").substring(1):phone.getString("nation_code"); - String phoneNumber = phone.getString("contact_phone"); + String nationCode = client.getString("nation_code").contains("+")?client.getString("nation_code").substring(1):client.getString("nation_code"); + String phoneNumber = client.getString("contact_phone"); ArrayList param = new ArrayList<>(); param.add("绑定手机号"); param.add(codeKeyValue); diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java index d6d812bcc..ee109dccd 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java @@ -724,12 +724,11 @@ public class RetailAppController { * 接收关联手机的验证码 * * @param device - * @param phone contact_phone * @throws Exception */ @PutMapping("/account/phone") - public JSONObject bindAccountPhone(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestBody JSONObject phone) throws Exception { - retailAppService.bindAccountPhone(device, phone); + public JSONObject bindAccountPhone(@ModelAttribute(RETAIL_DEVICE) JSONObject device) throws Exception { + retailAppService.bindAccountPhone(device); return new JSONObject(); }