diff --git a/app/Constants/v3/SmsTemplateCode.php b/app/Constants/v3/SmsTemplateCode.php index 34b7bb3..14f3462 100644 --- a/app/Constants/v3/SmsTemplateCode.php +++ b/app/Constants/v3/SmsTemplateCode.php @@ -18,7 +18,7 @@ class SmsTemplateCode extends AbstractConstants /** * @Message("社区服务点奖励流水") */ - const ALI_COMMUNITY_FINANCIAL = 'SMS_200690862'; + const ALI_COMMUNITY_FINANCIAL = 'SMS_205122825'; /** * @Message("微信打款失败") diff --git a/app/Service/v3/Implementations/SeparateAccountsService.php b/app/Service/v3/Implementations/SeparateAccountsService.php index cd78ec7..7070ff4 100644 --- a/app/Service/v3/Implementations/SeparateAccountsService.php +++ b/app/Service/v3/Implementations/SeparateAccountsService.php @@ -146,8 +146,8 @@ class SeparateAccountsService implements SeparateAccountsServiceInterface $award['new_user_reward'] ); // 发送短信 - co(function () use ($communityBind, $award) { - $this->smsAliSendService->doCommunityFinancial($communityBind->source_id, $award['new_user_reward']); + co(function () use ($communityBind, $award, $orderMain) { + $this->smsAliSendService->doCommunityFinancial($communityBind->source_id, $award['new_user_reward'], $orderMain); }); $this->financialRecordService->communityAwardByPlatNewUserFirstOLOrder( $communityBind->source_id, @@ -155,16 +155,16 @@ class SeparateAccountsService implements SeparateAccountsServiceInterface $award['first_reward'] ); // 发送短信 - co(function () use ($communityBind, $award) { - $this->smsAliSendService->doCommunityFinancial($communityBind->source_id, $award['first_reward']); + co(function () use ($communityBind, $award, $orderMain) { + $this->smsAliSendService->doCommunityFinancial($communityBind->source_id, $award['first_reward'], $orderMain); }); } // 账单分成 $money = bcmul($orderMain->money, bcdiv($award['flow_reward'], 100, 6), 2); $this->financialRecordService->communitySeparateAccountsByOrderComp($communityBind->source_id, $orderMain->global_order_id, $money); // 发送短信 - co(function () use ($communityBind, $money) { - $this->smsAliSendService->doCommunityFinancial($communityBind->source_id, $money); + co(function () use ($communityBind, $money, $orderMain) { + $this->smsAliSendService->doCommunityFinancial($communityBind->source_id, $money, $orderMain); }); } diff --git a/app/Service/v3/Implementations/SmsAliSendService.php b/app/Service/v3/Implementations/SmsAliSendService.php index dcf388b..8e0fae3 100644 --- a/app/Service/v3/Implementations/SmsAliSendService.php +++ b/app/Service/v3/Implementations/SmsAliSendService.php @@ -88,12 +88,14 @@ class SmsAliSendService implements SmsSendServiceInterface // TODO: Implement removeVerifyCode() method. } - public function doCommunityFinancial($userId, $money) + public function doCommunityFinancial($csUserAdminId, $money, $orderMain) { - $csInfo = CsInfo::query()->where(['admin_user_id' => $userId])->first(); - $market = Market::query()->where(['id' => $csInfo->market_id])->first(); + $csInfo = CsInfo::query()->where(['admin_user_id' => $csUserAdminId])->first(); + $market = Market::query()->where(['id' => $orderMain->market_id])->first(); - $params = ['user_name' => $csInfo->name, 'market_name' => $market->name, 'money' => $money]; + // $params = ['user_name' => $csInfo->name, 'market_name' => $market->name, 'money' => $money]; + $orderTel = substr_replace($orderMain->tel, '****', 3, 4); + $params = ['store_name' => $csInfo->name, 'market_name' => $market->name, 'tel' => $orderTel, 'money' => $money.'元']; return $this->do($csInfo->phone, SmsTemplateCode::ALI_COMMUNITY_FINANCIAL, json_encode($params)); } diff --git a/app/Service/v3/Interfaces/SmsSendServiceInterface.php b/app/Service/v3/Interfaces/SmsSendServiceInterface.php index c7b7994..937af81 100644 --- a/app/Service/v3/Interfaces/SmsSendServiceInterface.php +++ b/app/Service/v3/Interfaces/SmsSendServiceInterface.php @@ -10,6 +10,6 @@ interface SmsSendServiceInterface public function doVerifyCode($tel, $code); public function checkVerifyCode($tel, $code); public function undoVerifyCode($tel, $code); - public function doCommunityFinancial($userId, $money); + public function doCommunityFinancial($csUserAdminId, $money, $orderMain); public function doWithdrawFail($storeName, $money, $errorCode, $errorCodeDes); } \ No newline at end of file