From 1cef1bddfae8ffd597e893734002fe420d8b260a Mon Sep 17 00:00:00 2001 From: "home.fengxinyhyl" Date: Sun, 31 Mar 2024 01:21:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/system/HuitongRepository.php | 4 +++- .../system/merchant/FinancialRecordRepository.php | 1 + app/common/repositories/user/UserAssetsLogRepository.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/system/HuitongRepository.php b/app/common/repositories/system/HuitongRepository.php index 785b1fc..fc5f30f 100644 --- a/app/common/repositories/system/HuitongRepository.php +++ b/app/common/repositories/system/HuitongRepository.php @@ -16,6 +16,7 @@ use app\common\dao\system\HuitongDao; use app\common\repositories\BaseRepository; use app\common\repositories\store\order\StoreOrderBaseRepository; use app\common\repositories\user\UserAssetsRepository; +use think\facade\Log; /** @@ -48,10 +49,11 @@ class HuitongRepository extends BaseRepository * @var StoreOrderBaseRepository $orderBase */ $orderBase = app()->make(StoreOrderBaseRepository::class); - $count = $orderBase->getTotalBase(); + $count = $orderBase->getTotalBase(date('Y-m-d', strtotime('-1day'))); if (empty($count)) { return; } + Log::info("+++++++"); $base = round($config['huitong_add'] * $count / 100, 2); if ($base < 0.01) { $base = 0.01; diff --git a/app/common/repositories/system/merchant/FinancialRecordRepository.php b/app/common/repositories/system/merchant/FinancialRecordRepository.php index 55890f7..d3cea48 100644 --- a/app/common/repositories/system/merchant/FinancialRecordRepository.php +++ b/app/common/repositories/system/merchant/FinancialRecordRepository.php @@ -209,6 +209,7 @@ class FinancialRecordRepository extends BaseRepository $extract_minimum_line = systemConfig('extract_minimum_line'); //商户可提现金额 $_line = bcsub($mer_money,$extract_minimum_line,2); + $_line = max($_line, 0); //退款支出金额 $refund_order = $this->dao->search($where)->where('financial_type','refund_order')->sum('number'); diff --git a/app/common/repositories/user/UserAssetsLogRepository.php b/app/common/repositories/user/UserAssetsLogRepository.php index 741255e..0ba7674 100644 --- a/app/common/repositories/user/UserAssetsLogRepository.php +++ b/app/common/repositories/user/UserAssetsLogRepository.php @@ -761,7 +761,7 @@ class UserAssetsLogRepository extends BaseRepository $item['user_nickname'] = $user['nickname']; $item['user_phone'] = $user['phone']; }else{ - $item['user_nickname'] = '未知'; + $item['user_nickname'] = '平台'; $item['user_phone'] = '未知'; } $list[] = $item;