|
@@ -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);
|
|
|
}
|
|
}
|
|
|
|
|
|