|
@@ -2335,6 +2335,10 @@ class GoodsService
|
|
|
}
|
|
|
|
|
|
if (!empty($params['couponContentList'])) {
|
|
|
+ $attributeJson = [];
|
|
|
+ if (!empty($row->goods_attribute_json)) {
|
|
|
+ $attributeJson = json_decode($row->goods_attribute_json, true);
|
|
|
+ }
|
|
|
$couponList = [];
|
|
|
foreach ($params['couponContentList'] as $coupon) {
|
|
|
$couponList[$coupon['coupon_id']] = [
|
|
@@ -2343,7 +2347,7 @@ class GoodsService
|
|
|
];
|
|
|
}
|
|
|
$attributeJson['coupon'] = $couponList;
|
|
|
- $model->goods_attribute_json = json_encode($attributeJson, JSON_UNESCAPED_UNICODE);
|
|
|
+ $data['goods_attribute_json'] = json_encode($attributeJson, JSON_UNESCAPED_UNICODE);
|
|
|
}
|
|
|
|
|
|
if (!empty($params['coupon_id']) && !empty($params['coupon_nbr'])) {
|