|
@@ -634,6 +634,20 @@ class GoodsService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ $data['express_json'] = [];
|
|
|
+ if(!empty($data['goods_express_json'])){
|
|
|
+ $goodsExpressJson = json_decode($data['goods_express_json'],true);
|
|
|
+ if(isset($goodsExpressJson['express']) && $goodsExpressJson['express'] == 'Y'){
|
|
|
+ $data['express_json'][] = 'express';
|
|
|
+ }
|
|
|
+ if(isset($goodsExpressJson['self']) && $goodsExpressJson['self'] == 'Y'){
|
|
|
+ $data['express_json'][] = 'self';
|
|
|
+ }
|
|
|
+ if(isset($goodsExpressJson['arrival']) && $goodsExpressJson['arrival'] == 'Y'){
|
|
|
+ $data['express_json'][] = 'arrival';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$data['appointment_times'] = [];
|
|
|
if ($data['is_support_appointment'] == 'Y' && isset($extendJson['dates'])) {
|
|
|
$data['dates'] = $extendJson['dates'] ?? [];
|
|
@@ -1233,6 +1247,27 @@ class GoodsService
|
|
|
$model->creator_user_id = JwtToken::getCurrentId();
|
|
|
$model->goods_addtimes = time();
|
|
|
$model->goods_updatetimes = time();
|
|
|
+ // {"express":"Y","self":"Y","arrival":"Y"}
|
|
|
+ $expressJson = [];
|
|
|
+ if (!empty($params['express_json'])){
|
|
|
+ if(in_array('express',$params['express_json'])){
|
|
|
+ $expressJson['express'] = 'Y';
|
|
|
+ }else{
|
|
|
+ $expressJson['express'] = 'N';
|
|
|
+ }
|
|
|
+ if (in_array('self',$params['express_json'])){
|
|
|
+ $expressJson['self'] = 'Y';
|
|
|
+ }else{
|
|
|
+ $expressJson['self'] = 'N';
|
|
|
+ }
|
|
|
+ if (in_array('arrival',$params['express_json'])){
|
|
|
+ $expressJson['arrival'] = 'Y';
|
|
|
+ }else{
|
|
|
+ $expressJson['arrival'] = 'N';
|
|
|
+ }
|
|
|
+
|
|
|
+ $model->goods_express_json = json_encode($expressJson);
|
|
|
+ }
|
|
|
|
|
|
if (!empty($params['is_support_appointment']) && $params['is_support_appointment'] == 'Y' && !empty($params['appointment_times']) && $params['goods_category'] != 'TRAVEL') {
|
|
|
$times = [];
|
|
@@ -1692,6 +1727,27 @@ class GoodsService
|
|
|
$redis->sadd($newKey, $data['goods_id']);
|
|
|
}
|
|
|
|
|
|
+ $expressJson = [];
|
|
|
+ if (!empty($params['express_json'])){
|
|
|
+ if(in_array('express',$params['express_json'])){
|
|
|
+ $expressJson['express'] = 'Y';
|
|
|
+ }else{
|
|
|
+ $expressJson['express'] = 'N';
|
|
|
+ }
|
|
|
+ if (in_array('self',$params['express_json'])){
|
|
|
+ $expressJson['self'] = 'Y';
|
|
|
+ }else{
|
|
|
+ $expressJson['self'] = 'N';
|
|
|
+ }
|
|
|
+ if (in_array('arrival',$params['express_json'])){
|
|
|
+ $expressJson['arrival'] = 'Y';
|
|
|
+ }else{
|
|
|
+ $expressJson['arrival'] = 'N';
|
|
|
+ }
|
|
|
+
|
|
|
+ $data['goods_express_json'] = json_encode($expressJson);
|
|
|
+ }
|
|
|
+
|
|
|
if (!empty($params['is_support_appointment']) && $params['is_support_appointment'] == 'Y' && !empty($params['appointment_times']) && $params['goods_category'] != 'TRAVEL') {
|
|
|
$attributeJson = [];
|
|
|
if (!empty($row->goods_attribute_json)) {
|
|
@@ -1798,6 +1854,7 @@ class GoodsService
|
|
|
} elseif (empty($data['goods_attribute_json'])) {
|
|
|
$data['goods_attribute_json'] = [];
|
|
|
}
|
|
|
+ dump($data['goods_attribute_json']);
|
|
|
$data['goods_attribute_json']['premisses'] = $params['goods_premisses'];
|
|
|
$data['goods_attribute_json'] = json_encode($data['goods_attribute_json']);
|
|
|
}
|