|
|
|
@ -20,6 +20,7 @@ use App\Service\v3\Interfaces\FinancialRecordServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\MiniprogramServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\OrderOnlineServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\SeparateAccountsServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\SmsSendServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\UserServiceInterface; |
|
|
|
use App\TaskWorker\SSDBTask; |
|
|
|
use Hyperf\DbConnection\Db; |
|
|
|
@ -58,6 +59,12 @@ class SeparateAccountsService implements SeparateAccountsServiceInterface |
|
|
|
*/ |
|
|
|
protected $orderOnlineService; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Inject |
|
|
|
* @var SmsSendServiceInterface |
|
|
|
*/ |
|
|
|
protected $smsAliSendService; |
|
|
|
|
|
|
|
/** |
|
|
|
* @inheritDoc |
|
|
|
*/ |
|
|
|
@ -137,15 +144,27 @@ class SeparateAccountsService implements SeparateAccountsServiceInterface |
|
|
|
$orderMain->global_order_id, |
|
|
|
$award['new_user_reward'] |
|
|
|
); |
|
|
|
// 发送短信
|
|
|
|
co(function () use ($orderMain, $award) { |
|
|
|
$this->smsAliSendService->doCommunityFinancial($orderMain->user_id, $award['new_user_reward']); |
|
|
|
}); |
|
|
|
$this->financialRecordService->communityAwardByPlatNewUserFirstOLOrder( |
|
|
|
$communityBind->source_id, |
|
|
|
$orderMain->global_order_id, |
|
|
|
$award['first_reward'] |
|
|
|
); |
|
|
|
// 发送短信
|
|
|
|
co(function () use ($orderMain, $award) { |
|
|
|
$this->smsAliSendService->doCommunityFinancial($orderMain->user_id, $award['first_reward']); |
|
|
|
}); |
|
|
|
} |
|
|
|
// 账单分成
|
|
|
|
$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 ($orderMain, $money) { |
|
|
|
$this->smsAliSendService->doCommunityFinancial($orderMain->user_id, $money); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
// =======社区服务点分账 / End=======
|
|
|
|
|