feat(ProductLists): 添加商品属性值查询逻辑
This commit is contained in:
parent
916a767e0a
commit
e965ec0711
@ -9,6 +9,7 @@ use app\common\lists\ListsSortInterface;
|
|||||||
use app\common\model\store_product\StoreProduct;
|
use app\common\model\store_product\StoreProduct;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\lists\ListsSearchInterface;
|
||||||
use app\common\model\Config;
|
use app\common\model\Config;
|
||||||
|
use app\common\model\store_product_attr_value\StoreProductAttrValue;
|
||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
//use app\common\model\goods\GoodsLabel;
|
//use app\common\model\goods\GoodsLabel;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
@ -116,6 +117,7 @@ class ProductLists extends BaseApiDataLists implements ListsSearchInterface, Lis
|
|||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order($order)
|
->order($order)
|
||||||
->select()->each(function ($item) use ($tag, $off_activity, $user_ship) {
|
->select()->each(function ($item) use ($tag, $off_activity, $user_ship) {
|
||||||
|
$item['attr_value']=StoreProductAttrValue::where('product_id', $item['product_id'])->limit(6)->select();
|
||||||
if ($off_activity == 0 && $user_ship == 5 && $item['top_cate_id'] == 15189) {
|
if ($off_activity == 0 && $user_ship == 5 && $item['top_cate_id'] == 15189) {
|
||||||
$item['price'] = $item['cost'];
|
$item['price'] = $item['cost'];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user