From 6196e08f81cb87f635958027497d89ad7665d1d4 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Wed, 10 Jul 2024 11:17:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E5=95=86=E5=93=81=E6=8F=90=E8=B4=A7=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserProductStorageLogLists.php | 6 +++- .../UserProductStorageLogController.php | 30 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 app/api/controller/user_product_storage_log/UserProductStorageLogController.php diff --git a/app/admin/lists/user_product_storage_log/UserProductStorageLogLists.php b/app/admin/lists/user_product_storage_log/UserProductStorageLogLists.php index 25b9c9d08..67f106758 100644 --- a/app/admin/lists/user_product_storage_log/UserProductStorageLogLists.php +++ b/app/admin/lists/user_product_storage_log/UserProductStorageLogLists.php @@ -28,6 +28,7 @@ class UserProductStorageLogLists extends BaseAdminDataLists implements ListsSear public function setSearch(): array { return [ + '=' => ['uid', 'oid', 'product_id','status'], 'between_time' => ['create_time'], ]; } @@ -45,7 +46,7 @@ class UserProductStorageLogLists extends BaseAdminDataLists implements ListsSear public function lists(): array { return UserProductStorageLog::where($this->searchWhere) - ->field(['id', 'oid', 'uid', 'product_id', 'store_id', 'financial_pm', 'nums']) + ->field(['id', 'oid', 'uid', 'product_id', 'store_id', 'financial_pm', 'nums','times','update_time']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function($item){ @@ -58,6 +59,9 @@ class UserProductStorageLogLists extends BaseAdminDataLists implements ListsSear }else{ $item['financial_pm']='减少'; } + if($item['times']){ + $item['times']=date('Y-m-d H:i:s',$item['times']); + } return $item; }) ->toArray(); diff --git a/app/api/controller/user_product_storage_log/UserProductStorageLogController.php b/app/api/controller/user_product_storage_log/UserProductStorageLogController.php new file mode 100644 index 000000000..573abcbad --- /dev/null +++ b/app/api/controller/user_product_storage_log/UserProductStorageLogController.php @@ -0,0 +1,30 @@ +dataLists(new UserProductStorageLogLists()); + } + +} \ No newline at end of file