|
@@ -2917,7 +2917,8 @@ class Goodup extends Base
|
|
|
|
|
|
$rs = Db::name('platform_youzan')
|
|
|
->field('id,spuCode,skuCode,exam_status,platform_id')
|
|
|
- ->where(['spuCode' => $param['spuCode'], 'is_del' => PlatformYouzan::$del_normal, 'exam_status' => PlatformYouzan::$exam_status_6])
|
|
|
+ ->where(['spuCode' => $param['spuCode'], 'is_del' => PlatformYouzan::$del_normal])
|
|
|
+ ->whereNotIn('exam_status', [PlatformYouzan::$exam_status_7, PlatformYouzan::$exam_status_8])
|
|
|
->select()
|
|
|
->toArray();
|
|
|
|
|
@@ -2935,12 +2936,14 @@ class Goodup extends Base
|
|
|
|
|
|
//已上线的要调用有赞接口下线
|
|
|
//调有赞项目的接口,从有赞平台下线该商品
|
|
|
- $host = config('app.yz_domain');
|
|
|
- $response = curl_request($host . 'api/yz_goodup_offline', $curl_data);
|
|
|
+ if($value['exam_status'] == PlatformYouzan::$exam_status_6){
|
|
|
+ $host = config('app.yz_domain');
|
|
|
+ $response = curl_request($host . 'api/yz_goodup_offline', $curl_data);
|
|
|
|
|
|
- $response = json_decode($response, true);
|
|
|
+ $response = json_decode($response, true);
|
|
|
|
|
|
- if ($response['code'] != 0) throw new Exception($response['message']);
|
|
|
+ if ($response['code'] != 0) throw new Exception($response['message']);
|
|
|
+ }
|
|
|
|
|
|
$insert_good_offline_log_youzan_data[] = [
|
|
|
'spuCode' => $value['spuCode'],
|
|
@@ -2956,7 +2959,8 @@ class Goodup extends Base
|
|
|
}
|
|
|
|
|
|
Db::name('platform_youzan')
|
|
|
- ->where(['spuCode' => $param['spuCode'], 'is_del' => PlatformYouzan::$del_normal, 'exam_status' => PlatformYouzan::$exam_status_6])
|
|
|
+ ->where(['spuCode' => $param['spuCode'], 'is_del' => PlatformYouzan::$del_normal])
|
|
|
+ ->whereNotIn('exam_status', [PlatformYouzan::$exam_status_7, PlatformYouzan::$exam_status_8])
|
|
|
->update([
|
|
|
'exam_status' => PlatformYouzan::$exam_status_8,
|
|
|
'offline_reason_id' => $param['offline_reason'],
|