|
|
@@ -336,11 +336,14 @@ class Jd extends BaseController
|
|
336
|
336
|
if (empty($skuId)) {
|
|
337
|
337
|
return app('json')->fail('商品下架不存在', null, 401);
|
|
338
|
338
|
}
|
|
|
339
|
+ if (empty($this->request->uid())) {
|
|
|
340
|
+ return app('json')->fail('请重新登录', null, 401);
|
|
|
341
|
+ }
|
|
339
|
342
|
|
|
340
|
|
- $third_party_goods_detail = Db::name('third_party_goods')->whereLike('json', '%' . $skuId . '%')->find();
|
|
|
343
|
+ $third_party_goods_detail = Db::name('third_party_goods')->where('type', '=', 2)->whereLike('json', '%' . $skuId . '%')->find();
|
|
341
|
344
|
$third_party_goods_json_detail = json_decode($third_party_goods_detail['json'], true);
|
|
342
|
345
|
|
|
343
|
|
- $url = $this->linkChange($third_party_goods_json_detail['materialUrl'], 1592, $third_party_goods_json_detail['coupon_money'][0]['link'] ?? '');
|
|
|
346
|
+ $url = $this->linkChange($third_party_goods_json_detail['materialUrl'], $this->request->uid(), $third_party_goods_json_detail['coupon_money'][0]['link'] ?? '');
|
|
344
|
347
|
|
|
345
|
348
|
return app("json")->success(['url' => $url]);
|
|
346
|
349
|
}
|
|
|
@@ -364,8 +367,8 @@ class Jd extends BaseController
|
|
364
|
367
|
'promotionCodeReq' => [
|
|
365
|
368
|
'materialId' => $url,
|
|
366
|
369
|
'siteId' => $this->appid,
|
|
367
|
|
- 'positionId' => pow(10, 5) + $uid, //自定义,和订单关联
|
|
368
|
|
- 'couponUrl' => $couponUrl,
|
|
|
370
|
+ 'positionId' => $uid, //自定义,和订单关联
|
|
|
371
|
+ // 'couponUrl' => $couponUrl,
|
|
369
|
372
|
'sceneId' => 1
|
|
370
|
373
|
],
|
|
371
|
374
|
];
|
|
|
@@ -596,7 +599,7 @@ class Jd extends BaseController
|
|
596
|
599
|
}
|
|
597
|
600
|
//通过订单关联
|
|
598
|
601
|
$positionId = $order['positionId'];
|
|
599
|
|
- $userId = $positionId - pow(10, 5);
|
|
|
602
|
+ $userId = $positionId;
|
|
600
|
603
|
if ($userId <= 0) {//拉取的订单没有匹配到用户
|
|
601
|
604
|
continue;
|
|
602
|
605
|
}
|