|
@@ -25,13 +25,13 @@ class Money_buy_match extends Model {
|
|
|
* @param mixed $orderBy 排序字段
|
|
* @param mixed $orderBy 排序字段
|
|
|
* @return array JsonString
|
|
* @return array JsonString
|
|
|
*/
|
|
*/
|
|
|
|
|
+
|
|
|
public function moneyBuyMatch($select, $where = '', $orWhere = '', $begin = '', $pageSize = '', $orderBy = ['batch_id' => 'desc']) {
|
|
public function moneyBuyMatch($select, $where = '', $orWhere = '', $begin = '', $pageSize = '', $orderBy = ['batch_id' => 'desc']) {
|
|
|
// 查询字段
|
|
// 查询字段
|
|
|
$result = $this -> select($select)
|
|
$result = $this -> select($select)
|
|
|
->join('st_odds_code', function ($join) {
|
|
->join('st_odds_code', function ($join) {
|
|
|
$join->on('money_buy_match.odds_code', '=','st_odds_code.odds_code')->on('money_buy_match.game_code', '=','st_odds_code.game_code');
|
|
$join->on('money_buy_match.odds_code', '=','st_odds_code.odds_code')->on('money_buy_match.game_code', '=','st_odds_code.game_code');
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
// 查询条件
|
|
// 查询条件
|
|
|
if (!empty($where)) {
|
|
if (!empty($where)) {
|
|
|
$result = $result -> where($where);
|
|
$result = $result -> where($where);
|
|
@@ -51,6 +51,7 @@ class Money_buy_match extends Model {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 查询起始
|
|
// 查询起始
|
|
|
if (strlen($begin)) {
|
|
if (strlen($begin)) {
|
|
|
$result = $result -> offset($begin);
|
|
$result = $result -> offset($begin);
|
|
@@ -64,9 +65,9 @@ class Money_buy_match extends Model {
|
|
|
foreach ($orderBy as $key => $value) {
|
|
foreach ($orderBy as $key => $value) {
|
|
|
$result = $result -> orderBy($key, $value);
|
|
$result = $result -> orderBy($key, $value);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 获取数据
|
|
// 获取数据
|
|
|
$result = $result -> get();
|
|
$result = $result -> get();
|
|
|
-
|
|
|
|
|
return $result;
|
|
return $result;
|
|
|
}
|
|
}
|
|
|
|
|
|