|
@@ -22,11 +22,17 @@ class OrderTransformer
|
|
$app_id = $item->user && $item->user->force_subscribe_user ? $item->user->force_subscribe_user->appid : '';
|
|
$app_id = $item->user && $item->user->force_subscribe_user ? $item->user->force_subscribe_user->appid : '';
|
|
$opend_id = $item->user && $item->user->force_subscribe_user ? $item->user->force_subscribe_user->openid : '';
|
|
$opend_id = $item->user && $item->user->force_subscribe_user ? $item->user->force_subscribe_user->openid : '';
|
|
if ($opend_id == ''){
|
|
if ($opend_id == ''){
|
|
- $res = $service->getOpenId($uid, $app_id);
|
|
|
|
|
|
+ $res = $service->getOpenId($uid);
|
|
if ($res){
|
|
if ($res){
|
|
$opend_id = $res['openid'];
|
|
$opend_id = $res['openid'];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if ($app_id == '') {
|
|
|
|
+ $res = $service->getAppId($uid);
|
|
|
|
+ if ($res){
|
|
|
|
+ $app_id = $res['appid'];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return [
|
|
return [
|
|
'uid' => $uid,
|
|
'uid' => $uid,
|
|
'price' => (float) $item->price,
|
|
'price' => (float) $item->price,
|