mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改订单升级
This commit is contained in:
parent
a8ad0d32c2
commit
f643cac03f
@ -137,6 +137,7 @@ class Order extends Auth
|
|||||||
'vip_code' => $this->user['vip_code'],
|
'vip_code' => $this->user['vip_code'],
|
||||||
// 是否入会礼包
|
// 是否入会礼包
|
||||||
'vip_entry' => $goodsInfo['vip_entry'],
|
'vip_entry' => $goodsInfo['vip_entry'],
|
||||||
|
'vip_upgrade' => $goodsInfo['vip_upgrade'],
|
||||||
// 是否参与返利
|
// 是否参与返利
|
||||||
'rebate_type' => $goodsInfo['rebate_type'],
|
'rebate_type' => $goodsInfo['rebate_type'],
|
||||||
'rebate_amount' => $goodsInfo['rebate_type'] > 0 ? $goodsItem['price_selling'] * $count : 0,
|
'rebate_amount' => $goodsInfo['rebate_type'] > 0 ? $goodsItem['price_selling'] * $count : 0,
|
||||||
|
@ -64,7 +64,7 @@ class UserUpgradeService extends Service
|
|||||||
}
|
}
|
||||||
// 购买商品升级
|
// 购买商品升级
|
||||||
$query = $this->app->db->name('ShopOrderItem')->alias('b')->join('shop_order a', 'b.order_no=a.order_no');
|
$query = $this->app->db->name('ShopOrderItem')->alias('b')->join('shop_order a', 'b.order_no=a.order_no');
|
||||||
$tmpNumber = $query->whereRaw("a.uid={$uid} and a.payment_status=1 and a.status>=4 and b.vip_entry=1")->max('b.vip_code');
|
$tmpNumber = $query->whereRaw("a.uid={$uid} and a.payment_status=1 and a.status>=4 and b.vip_entry=1")->max('b.vip_upgrade');
|
||||||
if ($tmpNumber > $vipCode) {
|
if ($tmpNumber > $vipCode) {
|
||||||
$map = ['status' => 1, 'number' => $tmpNumber];
|
$map = ['status' => 1, 'number' => $tmpNumber];
|
||||||
$upgrade = $this->app->db->name('DataUserUpgrade')->where($map)->find();
|
$upgrade = $this->app->db->name('DataUserUpgrade')->where($map)->find();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user