zxhxx 3 роки тому
батько
коміт
ae0ea8c5dc
1 змінених файлів з 3 додано та 1 видалено
  1. 3 1
      app/models/store/Package.php

+ 3 - 1
app/models/store/Package.php

@@ -196,13 +196,15 @@ class Package extends BaseModel
                 $package_income = bcmul($info['price'], bcdiv(sys_config('package_income'), 100, 3), 2);
                 User::where('uid', $info['to_uid'])->dec('gold', $package_income)->update();
                 $to_user = User::where('uid', $info['to_uid'])->find();
+                if ($info['last_id'] > 0) self::edit(['status' => 4], $info['last_id']);
+                self::edit($data, $info['id']);
                 if($to_user['gold']<=0)
                 {
                       User::where('uid', $info['to_uid'])->update(['gold'=>0]);
                       continue;
                 }
                 UserBill::income('扣除收益', $info['to_uid'], 'gold', 'dec', $package_income, $info['id'], $to_user['gold'], '订单未确认收货系统确认,扣除收益' .$package_income );
-                if ($info['last_id'] > 0) self::edit(['status' => 4], $info['last_id']);
+
             }
         } catch (Exception $e) {
             Log::error('收货错误:' . $e->getFile() . '行' . $e->getLine() . "原因:" . $e->getMessage());