|
|
@@ -196,16 +196,16 @@ class AuctionOrder extends BaseModel
|
|
|
// $spread->save();
|
|
|
// \app\models\user\UserBill::income('直推奖励', $spread['uid'], 'anticipate', 'add_anticipate', $s_price, 0, $spread['integral'], '奖励趣豆');
|
|
|
// }
|
|
|
-// $user['anticipate'] = $user['anticipate']-$price*($product['deduct']/100); // 扣除当前卖出价格百分比的预约卷
|
|
|
+// $user['anticipate'] = $user['anticipate']-$price*($product['deduct']/100); // 扣除当前卖出价格百分比的广告值
|
|
|
// $user->save();
|
|
|
-// UserBill::expend('预约卷扣除', $user['uid'], 'anticipate','reduce_anticipate', $price*($product['deduct']/100), 0, $user['anticipate'] ,'卖出扣除预约卷');
|
|
|
+// UserBill::expend('广告值扣除', $user['uid'], 'anticipate','reduce_anticipate', $price*($product['deduct']/100), 0, $user['anticipate'] ,'卖出扣除广告值');
|
|
|
AuctionTime::where([['product_id', '=', $product['id']], ['uid', '=', $id]])->delete();
|
|
|
$productModel->where('id', $product['id'])->save(['is_show' => 0]); //下架等待挂售
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 购买成功退预约卷
|
|
|
+ * 购买成功退广告值
|
|
|
* @param $id
|
|
|
* @return void
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
@@ -248,21 +248,21 @@ class AuctionOrder extends BaseModel
|
|
|
if ($fz){
|
|
|
$fz['status'] = 0;
|
|
|
$anticipate = $fz['anticipate'] - $fz['deduction'];
|
|
|
- $user['anticipate'] = $user['anticipate'] + $anticipate;// 退还预约卷
|
|
|
+ $user['anticipate'] = $user['anticipate'] + $anticipate;// 退还广告值
|
|
|
|
|
|
$user->save();
|
|
|
$fz->save();
|
|
|
- UserBill::income('艺金券退还',$user['uid'], 'anticipate', 'th_anticipate', $anticipate, $user['spread_uid'], $user['anticipate'], '退还订单'.$data['order_id'].'艺金券,扣除' . $fz['deduction']);
|
|
|
+ UserBill::income('广告值退还',$user['uid'], 'anticipate', 'th_anticipate', $anticipate, $user['spread_uid'], $user['anticipate'], '退还订单'.$data['order_id'].'广告值,扣除' . $fz['deduction']);
|
|
|
|
|
|
}else{
|
|
|
if ($booking['status'] > 0) {
|
|
|
$booking['status'] = 0;
|
|
|
$anticipate = $booking['anticipate'] - $booking['deduction'];
|
|
|
- $user['anticipate'] = $user['anticipate'] + $anticipate;// 退还预约卷
|
|
|
+ $user['anticipate'] = $user['anticipate'] + $anticipate;// 退还广告值
|
|
|
|
|
|
$user->save();
|
|
|
$booking->save();
|
|
|
- UserBill::income('艺金券退还',$user['uid'], 'anticipate', 'th_anticipate', $anticipate, $user['spread_uid'], $user['anticipate'], '退还预约艺金券扣除' . $booking['deduction']);
|
|
|
+ UserBill::income('广告值退还',$user['uid'], 'anticipate', 'th_anticipate', $anticipate, $user['spread_uid'], $user['anticipate'], '退还预约广告值扣除' . $booking['deduction']);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -293,10 +293,10 @@ class AuctionOrder extends BaseModel
|
|
|
// 订单在一个小时到一个半小时内
|
|
|
if ($fz['deduction'] == 0) {
|
|
|
$user = \app\models\user\User::where('uid', $v['collection_id'])->find();
|
|
|
- $user['anticipate'] = $user['anticipate'] + $fz['anticipate'] / 2; // 卖家增加预约卷
|
|
|
+ $user['anticipate'] = $user['anticipate'] + $fz['anticipate'] / 2; // 卖家增加广告值
|
|
|
$fz['deduction'] = $fz['anticipate'] / 2;
|
|
|
- UserBill::income('超时增加', $v['collection_id'], 'anticipate', 'ad_anticipate', $fz['anticipate'] / 2, $v['uid'], $user['anticipate'], '(' . $userl['nickname'] . '-' . $userl['uid'] . ')超时付款,增加艺金券');
|
|
|
- UserBill::expend('超时扣除', $v['uid'], 'anticipate', 'dec_anticipate', $fz['anticipate'] / 2, $v['uid'], $fz['anticipate'] / 2, '超时付款,扣除订单'.$v['order_id'].'冻结'. ($fz['anticipate'] / 2) . '艺金券');
|
|
|
+ UserBill::income('超时增加', $v['collection_id'], 'anticipate', 'ad_anticipate', $fz['anticipate'] / 2, $v['uid'], $user['anticipate'], '(' . $userl['nickname'] . '-' . $userl['uid'] . ')超时付款,增加广告值');
|
|
|
+ UserBill::expend('超时扣除', $v['uid'], 'anticipate', 'dec_anticipate', $fz['anticipate'] / 2, $v['uid'], $fz['anticipate'] / 2, '超时付款,扣除订单'.$v['order_id'].'冻结'. ($fz['anticipate'] / 2) . '广告值');
|
|
|
$fz->save();
|
|
|
$user->save();
|
|
|
}
|
|
|
@@ -304,14 +304,14 @@ class AuctionOrder extends BaseModel
|
|
|
|
|
|
$user = \app\models\user\User::where('uid', $v['collection_id'])->find(); //卖家
|
|
|
$dedu = $fz['anticipate'] - $fz['deduction'];
|
|
|
- $user['anticipate'] += $dedu; // 卖家增加预约卷
|
|
|
+ $user['anticipate'] += $dedu; // 卖家增加广告值
|
|
|
$fz['deduction'] = $fz['anticipate'];
|
|
|
$fz['status'] = 2;
|
|
|
|
|
|
$user->save();
|
|
|
\app\models\user\User::where('uid', $v['uid'])->update(['status' => 0, 'freeze_time' => strtotime('+1 day')]); // 冻结用户
|
|
|
- UserBill::income('超时增加', $v['collection_id'], 'anticipate', 'ad_anticipate', $dedu, $v['uid'], $user['anticipate'], '(' . $userl['nickname'] . '-' . $userl['uid'] . ')超时付款,增加艺金券');
|
|
|
- UserBill::expend('超时扣除', $v['uid'], 'anticipate', 'dec_anticipate', $dedu, $v['uid'], 0, '超时付款,扣除订单'.$v['order_id'].'冻结' . $dedu . '艺金券');
|
|
|
+ UserBill::income('超时增加', $v['collection_id'], 'anticipate', 'ad_anticipate', $dedu, $v['uid'], $user['anticipate'], '(' . $userl['nickname'] . '-' . $userl['uid'] . ')超时付款,增加广告值');
|
|
|
+ UserBill::expend('超时扣除', $v['uid'], 'anticipate', 'dec_anticipate', $dedu, $v['uid'], 0, '超时付款,扣除订单'.$v['order_id'].'冻结' . $dedu . '广告值');
|
|
|
$fz->save();
|
|
|
|
|
|
AuctionOrder::where('create_time', '<', $hour)->where('status', '=', 1)->update(['status' => 0]); // 修改为已过期订单
|
|
|
@@ -323,10 +323,10 @@ class AuctionOrder extends BaseModel
|
|
|
if ($booking) {
|
|
|
if ($booking['deduction'] == 0) {
|
|
|
$user = \app\models\user\User::where('uid', $v['collection_id'])->find();
|
|
|
- $user['anticipate'] = $user['anticipate'] + $booking['anticipate'] / 2; // 卖家增加预约卷
|
|
|
+ $user['anticipate'] = $user['anticipate'] + $booking['anticipate'] / 2; // 卖家增加广告值
|
|
|
$booking['deduction'] = $booking['anticipate'] / 2;
|
|
|
- UserBill::income('超时增加', $v['collection_id'], 'anticipate', 'ad_anticipate', $booking['anticipate'] / 2, $v['uid'], $user['anticipate'], '(' . $userl['nickname'] . '-' . $userl['uid'] . ')超时付款,增加艺金券');
|
|
|
- UserBill::expend('超时扣除', $v['uid'], 'anticipate', 'dec_anticipate', $booking['anticipate'] / 2, $v['uid'], $booking['anticipate'] / 2, '超时付款,扣除预约冻结' . ($booking['anticipate'] / 2) . '艺金券');
|
|
|
+ UserBill::income('超时增加', $v['collection_id'], 'anticipate', 'ad_anticipate', $booking['anticipate'] / 2, $v['uid'], $user['anticipate'], '(' . $userl['nickname'] . '-' . $userl['uid'] . ')超时付款,增加广告值');
|
|
|
+ UserBill::expend('超时扣除', $v['uid'], 'anticipate', 'dec_anticipate', $booking['anticipate'] / 2, $v['uid'], $booking['anticipate'] / 2, '超时付款,扣除预约冻结' . ($booking['anticipate'] / 2) . '广告值');
|
|
|
$booking->save();
|
|
|
$user->save();
|
|
|
}
|
|
|
@@ -335,14 +335,14 @@ class AuctionOrder extends BaseModel
|
|
|
if ($booking) {
|
|
|
$user = \app\models\user\User::where('uid', $v['collection_id'])->find(); //卖家
|
|
|
$dedu = $booking['anticipate'] - $booking['deduction'];
|
|
|
- $user['anticipate'] += $dedu; // 卖家增加预约卷
|
|
|
+ $user['anticipate'] += $dedu; // 卖家增加广告值
|
|
|
$booking['deduction'] = $booking['anticipate'];
|
|
|
$booking['status'] = 2;
|
|
|
|
|
|
$user->save();
|
|
|
\app\models\user\User::where('uid', $v['uid'])->update(['status' => 0, 'freeze_time' => strtotime('+1 day')]); // 冻结用户
|
|
|
- UserBill::income('超时增加', $v['collection_id'], 'anticipate', 'ad_anticipate', $dedu, $v['uid'], $user['anticipate'], '(' . $userl['nickname'] . '-' . $userl['uid'] . ')超时付款,增加艺金券');
|
|
|
- UserBill::expend('超时扣除', $v['uid'], 'anticipate', 'dec_anticipate', $dedu, $v['uid'], 0, '超时付款,扣除预约冻结' . $dedu . '艺金券');
|
|
|
+ UserBill::income('超时增加', $v['collection_id'], 'anticipate', 'ad_anticipate', $dedu, $v['uid'], $user['anticipate'], '(' . $userl['nickname'] . '-' . $userl['uid'] . ')超时付款,增加广告值');
|
|
|
+ UserBill::expend('超时扣除', $v['uid'], 'anticipate', 'dec_anticipate', $dedu, $v['uid'], 0, '超时付款,扣除预约冻结' . $dedu . '广告值');
|
|
|
$booking->save();
|
|
|
|
|
|
AuctionOrder::where('create_time', '<', $hour)->where('status', '=', 1)->update(['status' => 0]); // 修改为已过期订单
|
|
|
@@ -355,7 +355,7 @@ class AuctionOrder extends BaseModel
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 退回预约卷
|
|
|
+ * 退回广告值
|
|
|
* @return void
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
* @throws \think\db\exception\DbException
|
|
|
@@ -381,7 +381,7 @@ class AuctionOrder extends BaseModel
|
|
|
|
|
|
$user->save();
|
|
|
$find->save();
|
|
|
- UserBill::income('退回艺金券', $user['uid'], 'anticipate', 'add_anticipate', $value['anticipate'], 0, $user['anticipate'], '艺金券' . $value['anticipate'] . '退回');
|
|
|
+ UserBill::income('退回广告值', $user['uid'], 'anticipate', 'add_anticipate', $value['anticipate'], 0, $user['anticipate'], '广告值' . $value['anticipate'] . '退回');
|
|
|
}
|
|
|
}
|
|
|
}
|