diff --git a/backend/modules/goods/controllers/GoodsController.php b/backend/modules/goods/controllers/GoodsController.php index 5430eee..f132a10 100755 --- a/backend/modules/goods/controllers/GoodsController.php +++ b/backend/modules/goods/controllers/GoodsController.php @@ -102,6 +102,7 @@ class GoodsController extends Controller $model->is_taking = Goods::IS_TAKING_NO; $model->is_express = Goods::IS_EXPRESS_YES; $model->express_type = Goods::EXPRESS_TYPE_EXPRESS_TEMPLATE; + $model->limit_count = 0; if ($model->load(Yii::$app->request->post()) && $model->validate()) { //商品封面图和商品详情图上传保存处理 $res = GoodsManager::updateGoods(Yii::$app->request->post(), $model); diff --git a/backend/modules/goods/migrations/m191211_060934_update_column_limit_count_in_table_atg_goods.php b/backend/modules/goods/migrations/m191211_060934_update_column_limit_count_in_table_atg_goods.php new file mode 100644 index 0000000..b49fa9c --- /dev/null +++ b/backend/modules/goods/migrations/m191211_060934_update_column_limit_count_in_table_atg_goods.php @@ -0,0 +1,22 @@ +dropColumn('atg_goods', 'limit_count'); + $this->addColumn('atg_goods', 'limit_count', $this->integer(11)->defaultValue("0")->comment("限购数量")); + } + + public function down() + { + $this->dropColumn('atg_goods', 'limit_count'); + $this->addColumn('atg_goods', 'limit_count', $this->integer(11)->defaultValue(null)->comment("限购数量")); + return true; + } +}