|
@@ -69,9 +69,6 @@ class BetService extends BaseService
|
|
|
if (isset($search['user_id']) && !empty($search['user_id'])) {
|
|
if (isset($search['user_id']) && !empty($search['user_id'])) {
|
|
|
$where[] = ['user_id', '=', $search['user_id']];
|
|
$where[] = ['user_id', '=', $search['user_id']];
|
|
|
}
|
|
}
|
|
|
- if (isset($search['status']) && !empty($search['status'])) {
|
|
|
|
|
- $where[] = ['status', '=', $search['status']];
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($search['start_time']) && !empty($search['status'])) {
|
|
if (isset($search['start_time']) && !empty($search['status'])) {
|
|
@@ -86,6 +83,10 @@ class BetService extends BaseService
|
|
|
} else {
|
|
} else {
|
|
|
$where[] = ['profit', '<=', 0];
|
|
$where[] = ['profit', '<=', 0];
|
|
|
}
|
|
}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (isset($search['status']) && !empty($search['status'])) {
|
|
|
|
|
+ $where[] = ['status', '=', $search['status']];
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -467,10 +468,10 @@ class BetService extends BaseService
|
|
|
|
|
|
|
|
$keyboard = [];
|
|
$keyboard = [];
|
|
|
|
|
|
|
|
- $total_amount = BalanceLogService::model()::where('member_id',$memberId)->where('change_type','中奖')->sum('amount');
|
|
|
|
|
|
|
+ $total_amount = BalanceLogService::model()::where('member_id', $memberId)->where('change_type', '中奖')->sum('amount');
|
|
|
$total_amount = number_format($total_amount, 2);
|
|
$total_amount = number_format($total_amount, 2);
|
|
|
$text = "历史注单 \n";
|
|
$text = "历史注单 \n";
|
|
|
- $text .="中奖总金额:{$total_amount} \n";
|
|
|
|
|
|
|
+ $text .= "中奖总金额:{$total_amount} \n";
|
|
|
foreach ($list as $k => $v) {
|
|
foreach ($list as $k => $v) {
|
|
|
if ($v->status == self::model()::STATUS_SETTLED) {
|
|
if ($v->status == self::model()::STATUS_SETTLED) {
|
|
|
$phase = $v->profit - $v->amount;
|
|
$phase = $v->profit - $v->amount;
|