lqmac 7 months ago
parent 49b402b823
commit 1e7fae2ccd
  1. 16
      app/api/controller/Square.php
  2. 10
      app/api/service/Notify.php
  3. 5
      app/api/service/identity/PaySuccess.php

@ -111,11 +111,17 @@ class Square extends Controller
$list['data'][$kr]['avatar_url'] = $files ?: null;
}
if ($r['goods_id']) {
$modelgoods = new GoodsModel;
$goods = $modelgoods->getDetails2($r['goods_id'])->toArray();
//print_r($goods);die;
$list['data'][$kr]['goodsInfo'] = $goods;
try {
$modelgoods = new GoodsModel;
$goods = $modelgoods->getBasic($r['goods_id'])->toArray();
//print_r($goods);die;
$list['data'][$kr]['goodsInfo'] = $goods;
} catch (\Exception $e) {
//print_r($goods);die;
$list['data'][$kr]['goodsInfo'] = [];
}
}
}
return $this->renderSuccess($list);

@ -165,7 +165,15 @@ class Notify
->handle();
}
// 订单支付成功业务处理 (开通会员、分销商)
if ($tradeInfo['order_type'] == OrderTypeEnum::MEMBER || $tradeInfo['order_type'] == OrderTypeEnum::DEALER) {
if ($tradeInfo['order_type'] == OrderTypeEnum::MEMBER) {
$service = new identity\PaySuccess();
$service->setOrderNo($tradeInfo['order_no'])
->setMethod($tradeInfo['pay_method'])
->setTradeId($tradeInfo['trade_id'])
->setPaymentData($paymentData)
->handle();
}
if ($tradeInfo['order_type'] == OrderTypeEnum::DEALER) {
$service = new identity\PaySuccess();
$service->setOrderNo($tradeInfo['order_no'])
->setMethod($tradeInfo['pay_method'])

@ -338,7 +338,7 @@ class PaySuccess extends BaseService
private function lockUp()
{
$orderInfo = $this->getOrderInfo();
Lock::lockUp("OrderPaySuccess_{$orderInfo['order_id']}");
Lock::lockUp("IdentityOrderPaySuccess_{$orderInfo['order_id']}");
}
/**
@ -348,7 +348,7 @@ class PaySuccess extends BaseService
private function unLock()
{
$orderInfo = $this->getOrderInfo();
Lock::unLock("OrderPaySuccess_{$orderInfo['order_id']}");
Lock::unLock("IdentityOrderPaySuccess_{$orderInfo['order_id']}");
}
/**
@ -396,6 +396,7 @@ class PaySuccess extends BaseService
User::add($userInfo['user_id'], [
'real_name' => $mobile,
'mobile' => $mobile,
'store_id' => $userInfo['store_id'] ?? 0,
]);
} else {
//更新分销用户

Loading…
Cancel
Save