Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
fb67788183
@ -4,6 +4,7 @@ namespace app\common\model\store_branch_product_attr_value;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\model\store_branch_product\StoreBranchProduct;
|
||||
use app\common\model\store_product_attr_value\StoreProductAttrValue;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
@ -21,7 +22,7 @@ class StoreBranchProductAttrValue extends BaseModel
|
||||
|
||||
public function attr()
|
||||
{
|
||||
return $this->hasOne(StoreProductAttrValue::class, 'unique', 'unique')->bind(['image']);
|
||||
return $this->hasOne(StoreBranchProduct::class, 'product_id', 'product_id')->bind(['image']);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa
|
||||
{
|
||||
return StoreBranchProduct::where($this->searchWhere)
|
||||
->where('store_id', $this->adminInfo['store_id'])
|
||||
->field(['id', 'image', 'store_name', 'cate_id', 'price', 'sales', 'stock', 'is_show', 'unit', 'cost','rose','purchase'])
|
||||
->field(['id', 'image', 'store_name', 'cate_id', 'price', 'sales', 'stock', 'is_show', 'unit', 'cost','rose','purchase', 'vip_price'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function ($item) {
|
||||
|
@ -43,7 +43,8 @@ class StoreProductAttrValueLists extends BaseAdminDataLists implements ListsSear
|
||||
public function lists(): array
|
||||
{
|
||||
return StoreBranchProductAttrValue::with('attr')->where($this->searchWhere)
|
||||
->field(['id', 'product_id', 'stock', 'unique', 'sales', 'bar_code'])
|
||||
->field(['id', 'product_id', 'stock', 'unique', 'sales', 'bar_code'
|
||||
])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
|
Loading…
x
Reference in New Issue
Block a user