|
@@ -75,9 +75,37 @@ class MoneyBuy extends Model {
|
|
|
if (empty($userInfo['identity'])) {
|
|
if (empty($userInfo['identity'])) {
|
|
|
Render([], '2001', lang('Common','Api') -> get('user does login'));
|
|
Render([], '2001', lang('Common','Api') -> get('user does login'));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ //===追加结算状态===
|
|
|
|
|
+ //拼接条件
|
|
|
|
|
+ $moneyBuySpxWhere = [];
|
|
|
|
|
+ // 用户ID
|
|
|
|
|
+ $moneyBuySpxWhere[] = ['account_identity','=',$userInfo['identity']];
|
|
|
|
|
+ // 输赢
|
|
|
|
|
+ if (!empty($_POST['result'])) {
|
|
|
|
|
+ $moneyBuySpxWhere[] = ['game_status','=',$_POST['result']];
|
|
|
|
|
+ }
|
|
|
|
|
+ // 结算状态 默认0 所有 1未结算 2已结算 -1无效
|
|
|
|
|
+ $set_status = $_POST['set_status']?:0;
|
|
|
|
|
+ if($set_status == 1){//未结算注单
|
|
|
|
|
+ $moneyBuySpxWhere[] = ['settle_status','=',1];
|
|
|
|
|
+ $moneyBuySpxWhere[] = ['roll_ratify','>',-1];
|
|
|
|
|
+ $moneyBuySpxWhere[] = ['roll_ratify','<',2];
|
|
|
|
|
+ }
|
|
|
|
|
+ if($set_status == 2){//已结算注单
|
|
|
|
|
+ $moneyBuySpxWhere[] = ['settle_status','>',1];
|
|
|
|
|
+ $moneyBuySpxWhere[] = ['roll_ratify','>',-1];
|
|
|
|
|
+ $moneyBuySpxWhere[] = ['roll_ratify','<',2];
|
|
|
|
|
+ }
|
|
|
|
|
+ if($set_status == -1){//无效注单
|
|
|
|
|
+ $moneyBuySpxWhere[] = ['status','>',1];
|
|
|
|
|
+ $moneyBuySpxWhere[] = ['roll_ratify','=',-1];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //===end===
|
|
|
|
|
|
|
|
// 用户ID
|
|
// 用户ID
|
|
|
- $moneyBuySpxWhere['account_identity'] = $userInfo['identity'];
|
|
|
|
|
|
|
+ // $moneyBuySpxWhere['account_identity'] = $userInfo['identity'];
|
|
|
// 时间区间
|
|
// 时间区间
|
|
|
$startTime = isset($_POST['startTime'])? $_POST['startTime'] : '1900-01-01 00:00:00';
|
|
$startTime = isset($_POST['startTime'])? $_POST['startTime'] : '1900-01-01 00:00:00';
|
|
|
$endTime = isset($_POST['endTime'])? $_POST['endTime'] : '3000-12-12 00:00:00';
|
|
$endTime = isset($_POST['endTime'])? $_POST['endTime'] : '3000-12-12 00:00:00';
|
|
@@ -88,8 +116,8 @@ class MoneyBuy extends Model {
|
|
|
/*
|
|
/*
|
|
|
状态:1 投注 2作废 3撤单
|
|
状态:1 投注 2作废 3撤单
|
|
|
*/
|
|
*/
|
|
|
- $status = $_POST['status']?$_POST['status']:1;
|
|
|
|
|
- $moneyBuySpxWhere['status'] = $status;
|
|
|
|
|
|
|
+ // $status = $_POST['status']?$_POST['status']:1;
|
|
|
|
|
+ // $moneyBuySpxWhere['status'] = $status;
|
|
|
|
|
|
|
|
//===end===
|
|
//===end===
|
|
|
|
|
|
|
@@ -271,12 +299,35 @@ class MoneyBuy extends Model {
|
|
|
if (empty($userInfo['identity'])) {
|
|
if (empty($userInfo['identity'])) {
|
|
|
Render([], '2001', lang('Common','Api') -> get('user does login'));
|
|
Render([], '2001', lang('Common','Api') -> get('user does login'));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ //===追加结算状态===
|
|
|
|
|
+ //拼接条件
|
|
|
|
|
+ $moneyBuyStrWhere = [];
|
|
|
|
|
+ // 用户ID
|
|
|
|
|
+ $moneyBuyStrWhere[] = ['account_identity','=',$userInfo['identity']];
|
|
|
|
|
+ // 输赢
|
|
|
|
|
+ if (!empty($_POST['result'])) {
|
|
|
|
|
+ $moneyBuyStrWhere[] = ['game_status','=',$_POST['result']];
|
|
|
|
|
+ }
|
|
|
|
|
+ // 结算状态 默认0 所有 1未结算 2已结算 -1无效
|
|
|
|
|
+ $set_status = $_POST['set_status']?:0;
|
|
|
|
|
+ if($set_status == 1){//未结算注单
|
|
|
|
|
+ $moneyBuyStrWhere[] = ['settle_status','=',1];
|
|
|
|
|
+ }
|
|
|
|
|
+ if($set_status == 2){//已结算注单
|
|
|
|
|
+ $moneyBuyStrWhere[] = ['settle_status','>',1];
|
|
|
|
|
+ }
|
|
|
|
|
+ if($set_status == -1){//无效注单
|
|
|
|
|
+ $moneyBuyStrWhere[] = ['status','>',1];
|
|
|
|
|
+ }
|
|
|
|
|
+ //===end===
|
|
|
|
|
+
|
|
|
// 用户ID
|
|
// 用户ID
|
|
|
- $moneyBuyStrWhere['account_identity'] = $userInfo['identity'];
|
|
|
|
|
|
|
+ // $moneyBuyStrWhere['account_identity'] = $userInfo['identity'];
|
|
|
// 输赢
|
|
// 输赢
|
|
|
- if (!empty($_POST['result'])) {
|
|
|
|
|
- $moneyBuyStrWhere['game_status'] = $_POST['result'];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (!empty($_POST['result'])) {
|
|
|
|
|
+ // $moneyBuyStrWhere['game_status'] = $_POST['result'];
|
|
|
|
|
+ // }
|
|
|
// 时间区间
|
|
// 时间区间
|
|
|
$startTime = isset($_POST['startTime'])? $_POST['startTime'] : '1900-01-01 00:00:00';
|
|
$startTime = isset($_POST['startTime'])? $_POST['startTime'] : '1900-01-01 00:00:00';
|
|
|
$endTime = isset($_POST['endTime'])? $_POST['endTime'] : '3000-12-12 00:00:00';
|
|
$endTime = isset($_POST['endTime'])? $_POST['endTime'] : '3000-12-12 00:00:00';
|