WIN-2308041133\Administrator 1 dzień temu
rodzic
commit
0c44de3066
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      app/system/controller/Product.php

+ 3 - 1
app/system/controller/Product.php

@@ -264,6 +264,8 @@ class Product extends BaseController
         try {
         try {
             if ($post['id'] > 0) {
             if ($post['id'] > 0) {
                 // 更新商品
                 // 更新商品
+                $data['update_time'] = time();
+
                 Db::name('store_product')->where('id', $post['id'])->update($data);
                 Db::name('store_product')->where('id', $post['id'])->update($data);
                 $productId = $post['id'];
                 $productId = $post['id'];
 
 
@@ -271,7 +273,7 @@ class Product extends BaseController
                 Db::name('store_product_attr_value')->where('product_id', $productId)->delete();
                 Db::name('store_product_attr_value')->where('product_id', $productId)->delete();
             } else {
             } else {
                 // 新增商品
                 // 新增商品
-                $data['time'] = time();
+                $data['create_time'] = time();
                 $productId = Db::name('store_product')->insertGetId($data);
                 $productId = Db::name('store_product')->insertGetId($data);
             }
             }