Commit 150db88f authored by 万继龙's avatar 万继龙

Merge branch 'develop' into 'test'

add: 修复微信手续费小于1分的处理

See merge request bp/pay!22
parents d0b7b5f8 ff1d4bd5
...@@ -70,11 +70,17 @@ class CallbackController extends Base ...@@ -70,11 +70,17 @@ class CallbackController extends Base
$params = $this->params; $params = $this->params;
$date = $params['date'] ?? date('Y-m-d'); $date = $params['date'] ?? date('Y-m-d');
$all = $params['all'] ?? 0;
$timestamp = strtotime($date); $timestamp = strtotime($date);
$start = date('Y-m-d', $timestamp); $start = date('Y-m-d', $timestamp);
$end = date('Y-m-d', $timestamp + 86400); $end = date('Y-m-d', $timestamp + 86400);
if($all != 1) {
$where['notify_account_status'] = 0;
}
$where['can_notify_account'] = 1; $where['can_notify_account'] = 1;
$where['notify_account_times[<]'] = 10; $where['notify_account_times[<]'] = 10;
$where['can_notify_account_time[<>]'] = [$start, $end]; $where['can_notify_account_time[<>]'] = [$start, $end];
......
...@@ -412,7 +412,12 @@ class PayService ...@@ -412,7 +412,12 @@ class PayService
$wx_rate = config('pay','pay.wechat_rate') ?? 60; //微信利率 60 / 10000 $wx_rate = config('pay','pay.wechat_rate') ?? 60; //微信利率 60 / 10000
$wx_account_id = config('pay','pay.wechat_account_id') ?? '1111'; $wx_account_id = config('pay','pay.wechat_account_id') ?? '1111';
$total_tip = round($wx_rate * $this->order_info['payment'] / 10000); $float_tip = $wx_rate * $this->order_info['payment'] / 10000;
if($float_tip >= 1 ) {
$total_tip = round($float_tip);
} else {
$total_tip = 0;
}
if (empty($total_tip)) { if (empty($total_tip)) {
return 0; return 0;
} }
......
...@@ -13,12 +13,12 @@ class Wallet implements DaemonServiceInterface ...@@ -13,12 +13,12 @@ class Wallet implements DaemonServiceInterface
*/ */
public function run() public function run()
{ {
$where['notify_account_status'] = 0;
$where['can_notify_account'] = 1; $where['can_notify_account'] = 1;
$where['notify_account_times[<]'] = 10; $where['notify_account_times[<]'] = 10;
$start = date('Y-m-d', time() - 2 * 86400); $start = date('Y-m-d H:i:s', time() - 2 * 86400);
$end = date('Y-m-d', time()); $end = date('Y-m-d H:i:s', time());
$where['can_notify_account_time[<>]'] = [$start, $end]; $where['can_notify_account_time[<>]'] = [$start, $end];
//$where['can_notify_account_time[>]'] = date('Y-m-d', time() - 3 * 86400);
$where['ORDER'] = ['can_notify_account_time'=>'ASC']; $where['ORDER'] = ['can_notify_account_time'=>'ASC'];
$where['LIMIT'] = [0, 50]; $where['LIMIT'] = [0, 50];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment