|
|
@@ -239,7 +239,7 @@ class xhPayToolService
|
|
|
//util::fail('没有客户信息');
|
|
|
}
|
|
|
|
|
|
- $balance = $userAsset['balance'];
|
|
|
+ $balance = $userAsset['balance'] ?? 0;
|
|
|
if ($payWay == $balancePay && $balance < $totalFee) {
|
|
|
Yii::warning('余额不足,capitalType:' . $capitalType . ' orderSn:' . $orderSn);
|
|
|
util::fail('余额不足');
|
|
|
@@ -332,17 +332,17 @@ class xhPayToolService
|
|
|
}
|
|
|
|
|
|
//累计消费
|
|
|
- $userTotalExpend = stringUtil::calcAdd($userAsset['totalExpend'], $totalFee);
|
|
|
+ //$userTotalExpend = stringUtil::calcAdd($userAsset['totalExpend'], $totalFee);
|
|
|
//成长值增加
|
|
|
- $userGrowth = $userAsset['growth'] + floor($totalFee);
|
|
|
- $userTotalBuyNum = $userAsset['totalBuyNum'] + 1;
|
|
|
-
|
|
|
- $remainBalance = $payWay == $balancePay ? stringUtil::calcSub($balance, $totalFee) : $balance;
|
|
|
- $upAssetData = [];
|
|
|
- $upAssetData['balance'] = $remainBalance;
|
|
|
- $upAssetData['growth'] = $userGrowth;
|
|
|
- $upAssetData['totalExpend'] = $userTotalExpend;
|
|
|
- $upAssetData['totalBuyNum'] = $userTotalBuyNum;
|
|
|
+// $userGrowth = $userAsset['growth'] + floor($totalFee);
|
|
|
+// $userTotalBuyNum = $userAsset['totalBuyNum'] + 1;
|
|
|
+//
|
|
|
+// $remainBalance = $payWay == $balancePay ? stringUtil::calcSub($balance, $totalFee) : $balance;
|
|
|
+// $upAssetData = [];
|
|
|
+// $upAssetData['balance'] = $remainBalance;
|
|
|
+// $upAssetData['growth'] = $userGrowth;
|
|
|
+// $upAssetData['totalExpend'] = $userTotalExpend;
|
|
|
+// $upAssetData['totalBuyNum'] = $userTotalBuyNum;
|
|
|
//xhUserAssetService::ioChangeAsset($user, $userAsset, $upAssetData, $merchant, $merchantExtend, $order, $capitalType);//用户资产改变
|
|
|
|
|
|
$growData = [
|
|
|
@@ -350,12 +350,12 @@ class xhPayToolService
|
|
|
'userName' => $userName,
|
|
|
'merchantId' => $merchantId,
|
|
|
'relateId' => $orderId,
|
|
|
- 'growth' => $userGrowth,
|
|
|
+ //'growth' => $userGrowth,
|
|
|
'num' => floor($totalFee),
|
|
|
'io' => 1,
|
|
|
'payWay' => $payWay,
|
|
|
'alipayId' => $alipayId,
|
|
|
- 'event' => $uIntegralEvent,
|
|
|
+ //'event' => $uIntegralEvent,
|
|
|
'operatorId' => $userId,
|
|
|
'createTime' => $date,
|
|
|
'gainType' => 1,
|
|
|
@@ -365,13 +365,13 @@ class xhPayToolService
|
|
|
|
|
|
$userCapitalData = [
|
|
|
'relateId' => $orderId,
|
|
|
- 'balance' => $remainBalance,
|
|
|
- 'totalIncome' => $userAsset['totalIncome'],
|
|
|
+ //'balance' => $remainBalance,
|
|
|
+ 'totalIncome' => $userAsset['totalIncome'] ?? 0,
|
|
|
'totalExpend' => $userTotalExpend,
|
|
|
'amount' => $totalFee,
|
|
|
'io' => 0,
|
|
|
'payWay' => $payWay,
|
|
|
- 'event' => $uCapitalEvent,
|
|
|
+ //'event' => $uCapitalEvent,
|
|
|
'merchantId' => $merchantId,
|
|
|
'userId' => $userId,
|
|
|
'alipayId' => $alipayId,
|
|
|
@@ -389,8 +389,8 @@ class xhPayToolService
|
|
|
if ($payWay == $wxWay && $wxPayType == 1) {
|
|
|
//OrderClass::payToUpdateUnionId($merchant, $merchantExtend, $orderSn, $user);
|
|
|
}
|
|
|
-
|
|
|
- return ['balance' => $remainBalance];
|
|
|
+ return ['balance' => 0];
|
|
|
+ //return ['balance' => $remainBalance];
|
|
|
|
|
|
} catch (Exception $e) {
|
|
|
$transaction->rollBack();
|