|
@@ -10,6 +10,7 @@
|
|
|
|
|
|
namespace fecshop\services\product;
|
|
|
|
|
|
+use fecshop\models\mysqldb\Product;
|
|
|
use fecshop\services\Service;
|
|
|
use yii\db\Query;
|
|
|
use Yii;
|
|
@@ -431,6 +432,21 @@ class ProductMysqldb extends Service implements ProductInterface
|
|
|
|
|
|
if ($primaryVal) {
|
|
|
$model = $this->_productModel->findOne($primaryVal);
|
|
|
+
|
|
|
+ if($one['plbj'] == 'ok'){
|
|
|
+ $updata = [
|
|
|
+ 'name' => serialize($one['name']),
|
|
|
+ 'status' => $one['status'],
|
|
|
+ 'meta_title' => serialize($one['meta_title']),
|
|
|
+ 'meta_keywords' => serialize($one['meta_keywords']),
|
|
|
+ 'meta_description' => serialize($one['meta_description']),
|
|
|
+ 'short_description' => serialize($one['short_description']),
|
|
|
+ 'description' => serialize($one['description']),
|
|
|
+ ];
|
|
|
+ Product::updateAll($updata,['spu'=>$one['spu']]);
|
|
|
+ return $model;
|
|
|
+ }
|
|
|
+
|
|
|
if (!$model) {
|
|
|
Yii::$service->helper->errors->add('Product {primaryKey} is not exist', ['primaryKey'=>$this->getPrimaryKey()]);
|
|
|
|