Browse Source

Merge branch 'hotfix_sendmsg' into master

master
weigang 5 years ago
parent
commit
cffe90aea4
  1. 5
      app/Constants/v3/SmsTemplateCode.php
  2. 4
      app/Service/v3/Implementations/PaymentService.php
  3. 7
      app/Service/v3/Implementations/SmsAliSendService.php
  4. 2
      app/Service/v3/Interfaces/SmsSendServiceInterface.php

5
app/Constants/v3/SmsTemplateCode.php

@ -19,4 +19,9 @@ class SmsTemplateCode extends AbstractConstants
* @Message("社区服务点奖励流水")
*/
const ALI_COMMUNITY_FINANCIAL = 'SMS_200690862';
/**
* @Message("微信打款失败")
*/
const ALI_PAY_FOR_WITHDRAW_FAIL = 'SMS_204751909';
}

4
app/Service/v3/Implementations/PaymentService.php

@ -198,8 +198,8 @@ class PaymentService implements PaymentServiceInterface
if (in_array($result['err_code'], $arr)) {
if (!$redis->exists($refuseReasonForSpecialKey)) { // 当天如果没发过就发
$res = $this->smsAliSendService->doWithdrawFail($result['err_code'], $result['err_code_des']);
if (isset($res['Code']) && $res['Code'] == 'OK') {
$res = $this->smsAliSendService->doWithdrawFail($desc, $money, $result['err_code'], $result['err_code_des']);
if (isset($res['result']['Code']) && $res['result']['Code'] == 'OK') {
$redis->set($refuseReasonForSpecialKey, $result['err_code'].'/'.$result['err_code_des']);
}
}

7
app/Service/v3/Implementations/SmsAliSendService.php

@ -97,10 +97,11 @@ class SmsAliSendService implements SmsSendServiceInterface
return $this->do($csInfo->phone, SmsTemplateCode::ALI_COMMUNITY_FINANCIAL, json_encode($params));
}
public function doWithdrawFail($errorCode, $errorCodeDes)
public function doWithdrawFail($storeName, $money, $errorCode, $errorCodeDes)
{
$params = ['code' => $errorCode];
return $this->do('18611745705', SmsTemplateCode::ALI_VERIFY_CODE, json_encode($params));
// 微信接口提示商户名称:${store_name},提现金额:${money}元,失败原因:${note}。
$params = ['store_name' => $storeName, 'money' => $money, 'note' => '(公司账户)'.$errorCodeDes];
return $this->do('18077798210', SmsTemplateCode::ALI_PAY_FOR_WITHDRAW_FAIL, json_encode($params));
}
}

2
app/Service/v3/Interfaces/SmsSendServiceInterface.php

@ -11,5 +11,5 @@ interface SmsSendServiceInterface
public function checkVerifyCode($tel, $code);
public function undoVerifyCode($tel, $code);
public function doCommunityFinancial($userId, $money);
public function doWithdrawFail($errorCode, $errorCodeDes);
public function doWithdrawFail($storeName, $money, $errorCode, $errorCodeDes);
}
Loading…
Cancel
Save