shish hai 6 meses
pai
achega
45f68ccaed
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  1. 6 4
      biz-ghs/order/classes/OrderClass.php

+ 6 - 4
biz-ghs/order/classes/OrderClass.php

@@ -2963,7 +2963,7 @@ XL;
         $shortRemark = stringUtil::subStringUtf8($remark, 8);
 
         $wlName = $custom->wlName ?? '';
-        if(empty($wlName)){
+        if (empty($wlName)) {
             $wlName = $shortRemark;
         }
 
@@ -3024,14 +3024,16 @@ XL;
     // 更新同天内的所有订单的 sameTimeIds
     public static function updateSameTimeIds($order, $date)
     {
-        $id = $order->id??0;
-        $customId = $order->customId??0;
-        $oldSameTimeIds = $order->sameTimeIds??'';
+        $id = $order->id ?? 0;
+        $customId = $order->customId ?? 0;
+        $mainId = $order->mainId ?? 0;
+        $oldSameTimeIds = $order->sameTimeIds ?? '';
 
         //找到当前订单客户的账单日期为 $date 的所有订单,然后更新同天内的所有订单的 sameTimeIds(加此次要改变的订单的订单号$id)
         $startTime = $date . ' 00:00:00';
         $endTime = $date . ' 23:59:59';
         $dayOrders = self::getAllByCondition([
+            'mainId' => $mainId,
             'customId' => $customId,
             'payTime' => ['between', [$startTime, $endTime]]
         ], 'id ASC', 'id, sameTimeIds');