diff --git a/backend/modules/goods/controllers/GoodsController.php b/backend/modules/goods/controllers/GoodsController.php index ee91963..91d07c6 100755 --- a/backend/modules/goods/controllers/GoodsController.php +++ b/backend/modules/goods/controllers/GoodsController.php @@ -101,9 +101,6 @@ class GoodsController extends Controller $model->is_express = Goods::IS_EXPRESS_YES; $model->express_type = Goods::EXPRESS_TYPE_EXPRESS_TEMPLATE; if ($model->load(Yii::$app->request->post()) && $model->validate()) { - if ($model->uniform_postage) { - $model->uniform_postage *= 100; - } //商品封面图和商品详情图上传保存处理 $res = GoodsManager::updateGoods(Yii::$app->request->post(), $model); if ($res['status']) { @@ -133,9 +130,6 @@ class GoodsController extends Controller $cover_image_old_id_str = $model->image; $detail_image_old_id_str = $model->detailImageId; if ($model->load(Yii::$app->request->post()) && $model->validate()) { - if ($model->uniform_postage) { - $model->uniform_postage *= 100; - } //商品封面图和商品详情图上传保存处理 $res = GoodsManager::updateGoods(Yii::$app->request->post(), $model, $cover_image_old_id_str, $detail_image_old_id_str); if ($res['status']) { @@ -143,6 +137,8 @@ class GoodsController extends Controller } } $model->uniform_postage /= 100; + $model->market_price /= 100; + $model->price /= 100; $attributeModel = GoodsManager::getAttribute($id); $checkAttr = GoodsManager::getSkuInfo($id); $filterAttributeModel = GoodsManager::getFilterAttribute($id); diff --git a/backend/modules/goods/logic/goods/GoodsManager.php b/backend/modules/goods/logic/goods/GoodsManager.php index eb0de2f..e5f7e8c 100755 --- a/backend/modules/goods/logic/goods/GoodsManager.php +++ b/backend/modules/goods/logic/goods/GoodsManager.php @@ -73,6 +73,9 @@ class GoodsManager { $attribute = $data['attribute']; $filterAttribute = $data['filterattribute']; + $model->uniform_postage *= 100; + $model->market_price *= 100; + $model->price *= 100; $tra = Yii::$app->db->beginTransaction(); try { if (!$model->save()) {