diff --git a/src/application/admin/controller/shop/ProductController.php b/src/application/admin/controller/shop/ProductController.php index 8200a9ca..4f74e222 100644 --- a/src/application/admin/controller/shop/ProductController.php +++ b/src/application/admin/controller/shop/ProductController.php @@ -460,7 +460,7 @@ public function get_specs($key = '', $ids = '') public function delete($id) { $model = Db::name('product'); - $result = $model->where('id', 'in', idArr($id))->update(['delete_time' => time()]); + $result = $model->where('id', 'in', idArr($id))->update(['delete_time' => time(), 'status' => 0]); if ($result) { user_log($this->mid, 'mark-delete-product', 1, '商品移到回收站 ' . $id, 'manager'); $this->success(lang('Delete success!'), url('shop.product/index')); @@ -477,7 +477,7 @@ public function trash($keyword = '', $cate_id = 0) $keyword = empty($keyword) ? "" : base64url_decode($keyword); $model = Db::view('product', '*') ->view('productCategory', ['name' => 'category_name', 'title' => 'category_title'], 'product.cate_id=productCategory.id', 'LEFT') - ->where('product.delete_time', 0); + ->where('product.delete_time', '>', 0); if (!empty($keyword)) { $model->whereLike('product.title|productCategory.title', "%$keyword%"); diff --git a/src/application/admin/view/shop/product/trash.tpl b/src/application/admin/view/shop/product/trash.tpl index a7533125..3505451f 100644 --- a/src/application/admin/view/shop/product/trash.tpl +++ b/src/application/admin/view/shop/product/trash.tpl @@ -91,11 +91,6 @@ 库存 {$sku.storage} - - - {/foreach} @@ -106,7 +101,7 @@