setter
parent
52c7b2e2b5
commit
48c3e9958b
|
@ -395,7 +395,7 @@ class Coupon extends Base
|
|||
$account = AccountRepository::getInstance()->findById($accountId, [], function ($q) {
|
||||
return $q->with(['business', 'parent']);
|
||||
});
|
||||
$time = time();
|
||||
$time = time();
|
||||
if(empty($account)){
|
||||
return $this->json(6001,"无效的用户");
|
||||
}
|
||||
|
@ -552,29 +552,28 @@ class Coupon extends Base
|
|||
$distributionRedpackUser = Account::findOne([["user_code","=",$coupon->distribution_user_code]]);
|
||||
//如果没有分销人 就全是平台 和分销人的
|
||||
if(empty($distributionRedpackUser)){
|
||||
$confirmAdminMoney = $disAdminMoney+$disDistributionMoney;
|
||||
$confirmAdminMoney = $disAdminMoney + $disDistributionMoney;
|
||||
$confirmDistributionMoney = 0;
|
||||
$confirmDistributedMoney = $disDistributedMoney;
|
||||
$confirmAgencyMoney = 0;
|
||||
$confirmAgencyMoney = $disAgencyMoney;
|
||||
}else{//存在分销人 就走分销人
|
||||
$confirmAdminMoney = $disAdminMoney;
|
||||
$confirmDistributionMoney = $disDistributionMoney;
|
||||
$confirmDistributedMoney = $disDistributedMoney;
|
||||
$confirmAgencyMoney = 0;
|
||||
$confirmAgencyMoney = $disAgencyMoney;
|
||||
}
|
||||
|
||||
}else{
|
||||
$confirmAdminMoney = $adminMoney;
|
||||
$confirmDistributionMoney = 0;
|
||||
$confirmDistributedMoney = $consumerMoney;
|
||||
$confirmAgencyMoney = $adminMoney;
|
||||
$confirmAgencyMoney = $agencyMoney;
|
||||
if(isset($business->agency) && $business->agency){
|
||||
$agencyRedpackUser = Account::findOne([
|
||||
["business_code","=",$business->agency->code],
|
||||
["type","=",Account::type_business],
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue