|
|
@@ -13,6 +13,7 @@ use bizGhs\order\classes\CheckOrderClass;
|
|
|
use bizGhs\product\classes\ProductClass;
|
|
|
use bizGhs\stock\classes\StockRecordClass;
|
|
|
use bizHd\custom\classes\CustomClass;
|
|
|
+use bizHd\custom\classes\HdClass;
|
|
|
use bizHd\hb\classes\HbClass;
|
|
|
use bizHd\item\classes\ItemClass;
|
|
|
use bizHd\merchant\classes\SjClass;
|
|
|
@@ -454,8 +455,17 @@ class OrderClass extends BaseClass
|
|
|
if ($order->forward == 0) {
|
|
|
$myCustom->recentExpend = date("Y-m-d H:i:s");
|
|
|
$myCustom->visitTime = date("Y-m-d H:i:s");
|
|
|
+ $myCustom->buyAmount = bcadd($myCustom->buyAmount, $order->realPrice, 2);
|
|
|
$myCustom->save();
|
|
|
}
|
|
|
+
|
|
|
+ $hdId = $myCustom->hdId;
|
|
|
+ $hd = HdClass::getLockById($hdId);
|
|
|
+ //$hd = HdClass::getByCondition(['shopId'=>$order->shopId, 'userId'=>$order->userId], true, false, 'id,customId,expendAmount');
|
|
|
+ if (!empty($hd)) {
|
|
|
+ $hd->expendAmount = bcadd($hd->expendAmount, $order->realPrice, 2);
|
|
|
+ $hd->save();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
$realPrice = $order->realPrice ?? 0;
|