refactor(admin): 优化商品列表逻辑
- 移除了不必要的条件判断 $is_true == false - 删除了多余的空行,提高了代码可读性
This commit is contained in:
parent
38da3cf56f
commit
198e5e2a78
@ -148,7 +148,7 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa
|
|||||||
} else {
|
} else {
|
||||||
$item['status_msg'] = '下架|不常用|是否有替换';
|
$item['status_msg'] = '下架|不常用|是否有替换';
|
||||||
}
|
}
|
||||||
if ($order_type == 2 && $is_true == false) {
|
if ($order_type == 2) {
|
||||||
$price = StoreProductGroupPrice::where('group_id', 42)->where('product_id', $item['product_id'])->value('price');
|
$price = StoreProductGroupPrice::where('group_id', 42)->where('product_id', $item['product_id'])->value('price');
|
||||||
if ($price > 0) {
|
if ($price > 0) {
|
||||||
$item['price'] = $price;
|
$item['price'] = $price;
|
||||||
@ -158,8 +158,6 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa
|
|||||||
$item['price'] = $item['vip_price'];
|
$item['price'] = $item['vip_price'];
|
||||||
$item['store_name'] = $item['store_name'] . '|会员价';
|
$item['store_name'] = $item['store_name'] . '|会员价';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $item;
|
return $item;
|
||||||
})?->toArray();
|
})?->toArray();
|
||||||
// if ($userShip > 0 && $userShip != 4) {
|
// if ($userShip > 0 && $userShip != 4) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user