|
@@ -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());
|