|
|
@@ -46,10 +46,10 @@ class xhMerchantAssetService
|
|
|
//计算总交易量
|
|
|
$totalDeal = xhSjCapital::find()->andWhere(['io' => 1, 'sjId' => $sjId])->count('id');
|
|
|
$data = ['totalDeal' => $totalDeal, 'totalVisit' => $totalVisit, 'totalFans' => $totalFans, 'totalIncome' => $totalIncome];
|
|
|
- self::updateByMerchantId($sjId, $data);
|
|
|
+ self::updateBySjId($sjId, $data);
|
|
|
}
|
|
|
|
|
|
- public static function updateByMerchantId($sjId, $data)
|
|
|
+ public static function updateBySjId($sjId, $data)
|
|
|
{
|
|
|
xhMerchantAsset::updateByCondition(['sjId' => $sjId], $data);
|
|
|
return self::refreshByMerchantId($sjId);
|
|
|
@@ -93,7 +93,7 @@ class xhMerchantAssetService
|
|
|
break;
|
|
|
default:
|
|
|
}
|
|
|
- self::updateByMerchantId($sjId, $updateData);
|
|
|
+ self::updateBySjId($sjId, $updateData);
|
|
|
|
|
|
if ($isRecharge == false) {
|
|
|
//数据统计,以下一定要排后面,否则数据不准确
|
|
|
@@ -139,7 +139,7 @@ class xhMerchantAssetService
|
|
|
$cashData = ['id' => $id, 'amount' => $amount, 'sjId' => $sjId, 'balance' => $mBalance, 'addTime' => time(), 'createTime' => $date];
|
|
|
$order = xhDrawCashService::add($cashData);
|
|
|
$orderId = $order['id'];
|
|
|
- xhMerchantAssetService::updateByMerchantId($sjId, ['balance' => $mBalance, 'freezeBalance' => $newFreezeBalance]);
|
|
|
+ xhMerchantAssetService::updateBySjId($sjId, ['balance' => $mBalance, 'freezeBalance' => $newFreezeBalance]);
|
|
|
|
|
|
$now = time();
|
|
|
$capitalTypeArray = dict::getDict('capitalType', 'xhDrawCash');
|
|
|
@@ -244,7 +244,7 @@ class xhMerchantAssetService
|
|
|
if (!empty($resultCode) && $resultCode == 10000) {
|
|
|
xhDrawCashService::updateById($id, ['thirdSerialNumber' => $returnOrderId, 'status' => 1]);
|
|
|
$remainAmount = stringUtil::calcSub($asset['freezeBalance'], $drawAmount);
|
|
|
- xhMerchantAssetService::updateByMerchantId($sjId, ['freezeBalance' => $remainAmount]);
|
|
|
+ xhMerchantAssetService::updateBySjId($sjId, ['freezeBalance' => $remainAmount]);
|
|
|
$transaction->commit();
|
|
|
/*
|
|
|
$openId = $admin['openId'];
|