|
|
@@ -4,6 +4,7 @@ namespace bizHd\custom\classes;
|
|
|
|
|
|
use biz\wx\classes\WxMessageClass;
|
|
|
use bizGhs\shop\classes\TotalDebtChangeClass;
|
|
|
+use bizHd\balance\classes\BalanceChangeClass;
|
|
|
use bizHd\member\classes\MemberChangeClass;
|
|
|
use bizHd\member\classes\MemberWealClass;
|
|
|
use bizHd\shop\classes\MainClass;
|
|
|
@@ -35,6 +36,7 @@ class CustomClass extends BaseClass
|
|
|
$remain = bcsub($balance, $actPrice, 2);
|
|
|
$hd->balance = $remain;
|
|
|
$hd->save();
|
|
|
+ $hdName = $hd->name;
|
|
|
|
|
|
$customId = $order->customId ?? 0;
|
|
|
$custom = self::getLockById($customId);
|
|
|
@@ -45,20 +47,33 @@ class CustomClass extends BaseClass
|
|
|
$remain = bcsub($balance, $actPrice, 2);
|
|
|
$custom->balance = $remain;
|
|
|
$custom->save();
|
|
|
+ $customName = $custom->name;
|
|
|
|
|
|
if ($custom->balance != $hd->balance) {
|
|
|
util::fail('余额有问题哦');
|
|
|
}
|
|
|
-
|
|
|
+ $relateId = $order->id ?? 0;
|
|
|
+ //0 花店操作 1 客户操作
|
|
|
+ $payWay = $order->payWay;
|
|
|
+ $side = 1;
|
|
|
+ $shopId = $order->shopId;
|
|
|
+ $mainId = $order->mainId;
|
|
|
+ $staffId = $order->shopAdminId;
|
|
|
+ $staffName = $order->shopAdminName;
|
|
|
+ $orderSn = $order->orderSn;
|
|
|
+ $event = '下单余额付款,单号:' . $orderSn;
|
|
|
+ $capitalType = dict::getDict('capitalType', 'xhOrder', 'id');
|
|
|
$change = [
|
|
|
+ 'hdId' => $hdId,
|
|
|
+ 'hdName' => $hdName,
|
|
|
'customId' => $customId,
|
|
|
'customName' => $customName,
|
|
|
'relateId' => $relateId,
|
|
|
- 'onlinePay' => $onlinePay,
|
|
|
+ 'onlinePay' => 1,
|
|
|
'capitalType' => $capitalType,
|
|
|
- 'amount' => $totalAmount,
|
|
|
+ 'amount' => $actPrice,
|
|
|
'balance' => $hd->balance,
|
|
|
- 'io' => 1,
|
|
|
+ 'io' => 0,
|
|
|
'side' => $side,
|
|
|
'payWay' => $payWay,
|
|
|
'event' => $event,
|
|
|
@@ -68,7 +83,7 @@ class CustomClass extends BaseClass
|
|
|
'mainId' => $mainId,
|
|
|
'remark' => '',
|
|
|
];
|
|
|
- $returnChange = BalanceChangeClass::add($change, true);
|
|
|
+ return BalanceChangeClass::add($change, true);
|
|
|
}
|
|
|
|
|
|
//会员等级变化,包括手动修改、自动降会员和充值升会员等 ssh 20250324
|