mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update RebateService.php
This commit is contained in:
parent
a920490f0b
commit
83de9c0b85
@ -264,7 +264,7 @@ class RebateService extends Service
|
||||
$users = $this->app->db->name('DataUser')->whereIn('vip_code', $vips)->whereIn('id', $puids)->orderField('id', $puids)->select()->toArray();
|
||||
// 查询需要计算奖励的商品
|
||||
$map = [['order_no', '=', $this->order['order_no']], ['discount_rate', '<', 100]];
|
||||
foreach ($this->app->db->name('StoreOrderItem')->where($map)->cursor() as $item) {
|
||||
foreach ($this->app->db->name('ShopOrderItem')->where($map)->cursor() as $item) {
|
||||
$itemJson = $this->app->db->name('DataUserDiscount')->where(['status' => 1, 'deleted' => 0])->value('items');
|
||||
if (!empty($itemJson) && is_array($rules = json_decode($itemJson, true))) {
|
||||
[$tVip, $tRate] = [$item['vip_code'], $item['discount_rate']];
|
||||
|
Loading…
x
Reference in New Issue
Block a user