diff --git a/app/admin/lists/store_product_group_price/StoreProductGroupPriceLists.php b/app/admin/lists/store_product_group_price/StoreProductGroupPriceLists.php index 7fbbb9103..9bd49c77f 100644 --- a/app/admin/lists/store_product_group_price/StoreProductGroupPriceLists.php +++ b/app/admin/lists/store_product_group_price/StoreProductGroupPriceLists.php @@ -44,11 +44,11 @@ class StoreProductGroupPriceLists extends BaseAdminDataLists implements ListsSea public function lists(): array { $query = StoreProduct::field('id,store_name,purchase,cost,vip_price,price,unit'); - if ($this->params['product_id']) { - $query->where('id|store_name', $this->params['product_id']); + $store_name=$this->request->get('store_name',''); + if ($store_name!='') { + $query->where('store_name', 'like', '%'.$store_name.'%'); } return $query->limit($this->limitOffset, $this->limitLength) - ->field('id,store_name,purchase,cost,vip_price,price,unit') ->order(['id' => 'desc']) ->select()->each(function ($item) { $item['lists'] =StoreProductGroupPrice::where('product_id',$item['id'])->field('id,group_id,price') @@ -75,8 +75,9 @@ class StoreProductGroupPriceLists extends BaseAdminDataLists implements ListsSea public function count(): int { $query = StoreProduct::field('id,store_name,purchase,cost,vip_price,price,unit'); - if ($this->params['product_id']) { - $query->where('id|store_name', $this->params['product_id']); + $store_name=$this->request->get('store_name',''); + if ($store_name!='') { + $query->where('store_name', 'like', '%'.$store_name.'%'); } return $query->count(); } diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index 2aa3f0e1c..1cded3f70 100644 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -9,11 +9,13 @@ use app\admin\logic\store_product\StoreProductLogic; use app\admin\validate\tools\GenerateTableValidate; use app\admin\logic\tools\GeneratorLogic; use app\api\lists\purchase_product_offer\PurchaseProductOfferListsTwo; +use app\api\logic\DemoLogic; use app\api\logic\order\OrderLogic as OrderOrderLogic; use app\common\cache\ExportCache; use app\common\logic\ChangeLogLogic; use app\common\logic\PayNotifyLogic; use app\common\logic\store_order\StoreOrderLogic; +use app\common\model\beforehand_order_cart_info\BeforehandOrderCartInfo; use app\common\model\beforehand_order_record\BeforehandOrderRecord; use app\common\model\Config as ModelConfig; use app\common\model\purchase_product_offer\PurchaseProductOffer; @@ -59,6 +61,14 @@ class IndexController extends BaseApiController public function index() { + // $arr=BeforehandOrderCartInfo::where('bhoid',1284)->select(); + // foreach ($arr as $k=>$v){ + // $product_id=StoreBranchProduct::where('id',$v['product_id'])->value('product_id'); + // BeforehandOrderCartInfo::where('id',$v['id'])->update(['product_id'=>$product_id]); + // } + // $a=StoreOrderCartInfo::where('store_id',2)->whereBetweenTime('create_time','2025-01-01','2025-01-8')->select()->toArray(); + // d($a); + // DemoLogic::test(); d(1); $arr = Db::name('ceshi_copy')->select(); foreach ($arr as $k => $v) {