feat: 添加'开通时间'字段到用户列表,修改线下分润、支付通知等逻辑

This commit is contained in:
mkm 2024-07-27 11:52:31 +08:00
parent eae37a1142
commit 99dc835cb1
3 changed files with 72 additions and 69 deletions

View File

@ -150,7 +150,8 @@ class UserLists extends BaseAdminDataLists implements ListsExcelInterface,ListsS
'store_name' => '门店',
'total_recharge_amount' => '累计消费',
'purchase_funds' => '采购款',
'format_address'=>'地址'
'format_address'=>'地址',
'vip_time'=>'开通时间'
];
}
}

View File

@ -64,14 +64,21 @@ class CommissionLogic extends BaseLogic
}
/**
* 走线下分润
* 零售分润
*/
public static function setStore($order, $transaction_id = 0)
public static function setStore($order, $village_uid = 0, $brigade_uid = 0, $transaction_id = 0)
{
if($order['spread_uid']<=0){
$uid=$order['uid'];
}else{
$uid=$order['spread_uid'];
}
self::user($order, 0, $transaction_id, $uid, 12); //会员、厨师
self::user($order, 5, $transaction_id, $uid, 12); //会员、厨师
self::user($order, 3, $transaction_id, $village_uid, 14); //村长
self::user($order, 4, $transaction_id, $brigade_uid, 15); //队长
self::platform($order, 2, $transaction_id); //平台
self::store($order, 1, $transaction_id, 0); //门店
// $attrition = self::attrition($order, 0.01, $transaction_id, 16); //损耗
// $moeny = bcadd($platform, $store, 2);
self::suppliter($order, $transaction_id);
}

View File

@ -576,7 +576,6 @@ class PayNotifyLogic extends BaseLogic
//用户下单该用户等级为1得时候才处理冻结金额
$user = User::where('id', $order['uid'])->find();
$user_ship = $user['user_ship'];
}
//积分写入
if (isset($user) && $user['user_ship'] == 0) {
@ -597,7 +596,6 @@ class PayNotifyLogic extends BaseLogic
// if ($user_ship>0 && $order['pay_type'] != PayEnum::CASH_PAY && $off_activity !=1) {
// $order['dealVipAmount']= self::dealVipAmount($order, $order['pay_type']);
// }
if ($order['spread_uid'] > 0 || $user_ship > 0) {
if ($order['spread_uid'] > 0 && $user_ship == 0) {
$user_ship = User::where('id', $order['spread_uid'])->value('user_ship');
if ($user_ship == 2) {
@ -666,12 +664,9 @@ class PayNotifyLogic extends BaseLogic
CommissionLogic::setBrigade($order, $village_uid, $brigade_uid, $transaction_id);
break;
default:
CommissionLogic::setStore($order, $transaction_id);
CommissionLogic::setStore($order,$village_uid, $brigade_uid, $transaction_id);
break;
}
} else {
CommissionLogic::setStore($order, $transaction_id);
}
}
/**