From: qiaowei Date: Mon, 11 Nov 2019 09:36:21 +0000 (+0800) Subject: 添加短信发送返回码判断逻辑,明确返回信息 X-Git-Tag: 1.0.9^2~1 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=1e5d9e69dd1ffdacea986d16a45dde767bcbe836;p=epayment%2Ffood_payapi.git 添加短信发送返回码判断逻辑,明确返回信息 --- diff --git a/payapi/src/main/kotlin/com/supwisdom/dlpay/mobile/service/impl/MobileApiServiceImpl.kt b/payapi/src/main/kotlin/com/supwisdom/dlpay/mobile/service/impl/MobileApiServiceImpl.kt index 36c51585..f9c2b1ec 100644 --- a/payapi/src/main/kotlin/com/supwisdom/dlpay/mobile/service/impl/MobileApiServiceImpl.kt +++ b/payapi/src/main/kotlin/com/supwisdom/dlpay/mobile/service/impl/MobileApiServiceImpl.kt @@ -146,6 +146,23 @@ class MobileApiServiceImpl : MobileApiService { resp.retcode = "1" resp.retmsg = "手机号错误" resp + } else if (sendResult == 105) { + //105 需要重新登录 + var ret = client.login(url, account, pwd, ecname) + if (!ret) { + logger.error { "无法登陆短信平台,身份验证失" } + resp.retcode = "1" + resp.retmsg = "无法登陆短信平台" + return resp + } + resp.retcode = "1" + resp.retmsg = "短信发送失败,请稍后再试" + resp + } else if (sendResult == 106 || sendResult == 108 || sendResult == 111) { + logger.error { "106:网关签名为空, 用户需要填写网关签名编号;108:JMS异常,用户侧网络问题。需要检查防火墙配置和网络连通性,看是否能够与云MAS平台正常连接;111:扩展码错误,扩展码只能是15位以内数字或空字符串" } + resp.retcode = "1" + resp.retmsg = "短信发送失败,请稍后再试" + resp } else { resp.retcode = "1" resp.retmsg = "短信发送失败,请稍后再试"