Browse Source

服务商分账时判断从属关系是否存在

master
weigang 5 years ago
parent
commit
91d865bfab
  1. 3
      app/Service/v3/Implementations/SeparateAccountsService.php

3
app/Service/v3/Implementations/SeparateAccountsService.php

@ -173,8 +173,11 @@ class SeparateAccountsService implements SeparateAccountsServiceInterface
// 当前订单(子)对应商户是否有市场经理绑定关系
$store = Store::query()->find($order['store_id']); // 商户
$mmInfo = MmInfo::query()->where(['user_id' => $store->mm_user_id])->first(); // 市场经理
if (empty($mmInfo)) continue;
$market = Market::query()->find($mmInfo->market_id); // 市场
if (empty($market)) continue;
$mpInfo = MpInfo::query()->find($market->mp_id); // 服务商
if (empty($mpInfo)) continue;
$ssdbName = 'mm_'.$mmInfo->id.'_award_'.$store->id;

Loading…
Cancel
Save