setter
parent
f5f332e442
commit
3f767a3596
|
@ -315,6 +315,11 @@ class Coupon extends Base
|
||||||
return $this->json(4001, "商家已禁用");
|
return $this->json(4001, "商家已禁用");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//如果商家指派了渠道商 分销人重新定义为空
|
||||||
|
if ($couponMain->business->is_agency == BusinessModel::COMMON_ON){
|
||||||
|
$distributionUserCode = "";
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//检查优惠券状态
|
//检查优惠券状态
|
||||||
CouponRepository::getInstance()->checkCouponMainReceiveStatus($couponMain);
|
CouponRepository::getInstance()->checkCouponMainReceiveStatus($couponMain);
|
||||||
|
@ -573,9 +578,9 @@ class Coupon extends Base
|
||||||
|
|
||||||
//开启了分销 覆盖 平台应得金额 和消费者应得金额 并且取消 渠道商打款
|
//开启了分销 覆盖 平台应得金额 和消费者应得金额 并且取消 渠道商打款
|
||||||
if(
|
if(
|
||||||
$coupon->couponMain->is_distribution == CouponMain::COMMON_ON
|
|
||||||
&&
|
|
||||||
$business->is_assign == BusinessModel::COMMON_OFF
|
$business->is_assign == BusinessModel::COMMON_OFF
|
||||||
|
||
|
||||||
|
(!empty($coupon->distribution_user_code)&&$business->is_assign == BusinessModel::COMMON_ON)
|
||||||
){
|
){
|
||||||
$disAdminMoney = (($deductionMoney/100) * $coupon->couponMain->commission_dis_admin);
|
$disAdminMoney = (($deductionMoney/100) * $coupon->couponMain->commission_dis_admin);
|
||||||
//$disDistributionMoney = (($deductionMoney/100) * $coupon->couponMain->commission_dis_distribution);
|
//$disDistributionMoney = (($deductionMoney/100) * $coupon->couponMain->commission_dis_distribution);
|
||||||
|
@ -650,8 +655,8 @@ class Coupon extends Base
|
||||||
|
|
||||||
$payment = WechatPay::getInstance();
|
$payment = WechatPay::getInstance();
|
||||||
|
|
||||||
//5. 渠道商加钱 【关闭了分销 渠道商才能加钱 红包方式直接打款 成功失败不管】
|
//5. 渠道商加钱 【只要指派了渠道商 并且没有分销人 渠道商才能加钱 红包方式直接打款 成功失败不管】
|
||||||
if($coupon->couponMain->is_is_distribution == CouponMain::COMMON_OFF){
|
if($business->is_assign == BusinessModel::COMMON_ON && (empty($coupon->distribution_user_code))){
|
||||||
if(isset($business->agency) && $business->agency){
|
if(isset($business->agency) && $business->agency){
|
||||||
//$business->agency->inc("balance",$agencyMoney)->update();
|
//$business->agency->inc("balance",$agencyMoney)->update();
|
||||||
//6. 用户提现到零钱 写入红包记录
|
//6. 用户提现到零钱 写入红包记录
|
||||||
|
|
Loading…
Reference in New Issue