|
@@ -27,152 +27,123 @@ class SoccerStringNoteListController extends Controller
|
|
|
$request['star_time'] = isset($req->star_time) ? trim($req->star_time) :null ;
|
|
$request['star_time'] = isset($req->star_time) ? trim($req->star_time) :null ;
|
|
|
$request['end_time'] = isset($req->end_time) ? trim($req->end_time) :null ;
|
|
$request['end_time'] = isset($req->end_time) ? trim($req->end_time) :null ;
|
|
|
$request['order_id'] = isset($req->order_id) ? trim($req->order_id) :null ;
|
|
$request['order_id'] = isset($req->order_id) ? trim($req->order_id) :null ;
|
|
|
- $request['match_id'] = isset($req->match_id) ? trim($req->match_id) :null ;
|
|
|
|
|
$dt = \App\Lib\DataTable\DataTable::init();
|
|
$dt = \App\Lib\DataTable\DataTable::init();
|
|
|
$dt->setDataSource('/admin/SoccerStringNoteList/info');
|
|
$dt->setDataSource('/admin/SoccerStringNoteList/info');
|
|
|
$dt->setLang('sportsnotelist');
|
|
$dt->setLang('sportsnotelist');
|
|
|
//$dt->addColsFields('id', array('templet' => '#userdetail', 'sort' => true, 'width' => 80));
|
|
//$dt->addColsFields('id', array('templet' => '#userdetail', 'sort' => true, 'width' => 80));
|
|
|
$dt->addColsFields('order_id', array('templet' => '#userdetail', 'sort' => true, 'width' => 200));
|
|
$dt->addColsFields('order_id', array('templet' => '#userdetail', 'sort' => true, 'width' => 200));
|
|
|
- $dt->addColsFields('model', array('templet' => '#userdetail', 'sort' => false, 'width' => 100));
|
|
|
|
|
- $dt->addColsFields('detail_content', array('templet' => '#userdetail', 'sort' => false, 'width' => 150));
|
|
|
|
|
|
|
+ $dt->addColsFields('game_name', array('templet' => '#userdetail', 'sort' => false, 'width' => 100));
|
|
|
|
|
+ $dt->addColsFields('detail_content', array('sort' => false, 'width' => 150));
|
|
|
$dt->addColsFields('money', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
$dt->addColsFields('money', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
|
- $dt->addColsFields('water_status', array('templet' => '#userdetail', 'sort' => false, 'width' => 70));
|
|
|
|
|
|
|
+ $dt->addColsFields('water_status', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
|
$dt->addColsFields('prize_money', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
$dt->addColsFields('prize_money', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
|
- //$dt->addColsFields('settle_status', array('templet' => '#userdetail', 'sort' => false, 'width' => 70));
|
|
|
|
|
|
|
+ $dt->addColsFields('result', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
|
$dt->addColsFields('money_match_time', array('templet' => '#userdetail', 'sort' => false, 'width' => 200));
|
|
$dt->addColsFields('money_match_time', array('templet' => '#userdetail', 'sort' => false, 'width' => 200));
|
|
|
- $dt->addColsFields('account', array('templet' => '#userdetail', 'sort' => false, 'width' => 120));
|
|
|
|
|
|
|
+ $dt->addColsFields('account', array('templet' => '#userdetail', 'sort' => false, 'width' => 240));
|
|
|
//$dt->addColsFields('member_type', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
//$dt->addColsFields('member_type', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
|
- $dt->addColsFields('game_status', array('templet' => '#userdetail', 'sort' => false, 'width' => 70));
|
|
|
|
|
|
|
+ $dt->addColsFields('settle_status', array('sort' => false, 'width' => 100));
|
|
|
//$arr[] = 'view';
|
|
//$arr[] = 'view';
|
|
|
-// if (checkRriv('/admin/SoccerNoteList/edit')) {
|
|
|
|
|
-// $arr[] = 'edit';
|
|
|
|
|
|
|
+// if (checkRriv('/admin/SoccerStringNoteList/edit')) {
|
|
|
|
|
+// $arr[] ='edit';
|
|
|
// }
|
|
// }
|
|
|
-// $dt->setToolBar($arr, array('width' => 70));
|
|
|
|
|
|
|
+// $dt->setToolBar($arr, array('width' => 100));
|
|
|
$dt->enableCheckBox();
|
|
$dt->enableCheckBox();
|
|
|
return view('sports/sports_stringnotelist', $dt->render($request));
|
|
return view('sports/sports_stringnotelist', $dt->render($request));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function info()
|
|
function info()
|
|
|
{
|
|
{
|
|
|
- $type = '2';//串关注单
|
|
|
|
|
$page = Request::has('page') ? Request::get('page') : '';
|
|
$page = Request::has('page') ? Request::get('page') : '';
|
|
|
$list = Request::has('limit') ? Request::get('limit') : 10;
|
|
$list = Request::has('limit') ? Request::get('limit') : 10;
|
|
|
$account = Request::get('account') ? Request::get('account') : '';
|
|
$account = Request::get('account') ? Request::get('account') : '';
|
|
|
$star_time = Request::get('star_time') ? Request::get('star_time').' 00:00:00' : '';
|
|
$star_time = Request::get('star_time') ? Request::get('star_time').' 00:00:00' : '';
|
|
|
$end_time = Request::get('end_time') ? Request::get('end_time').' 23:59:59' : '';
|
|
$end_time = Request::get('end_time') ? Request::get('end_time').' 23:59:59' : '';
|
|
|
$order_id = Request::get('order_id') ? Request::get('order_id') : '';
|
|
$order_id = Request::get('order_id') ? Request::get('order_id') : '';
|
|
|
- $match_id = Request::get('match_id') ? Request::get('match_id') : '';
|
|
|
|
|
$sureblur = Request::has('sureblurs') ? Request::get('sureblurs') : 'off';
|
|
$sureblur = Request::has('sureblurs') ? Request::get('sureblurs') : 'off';
|
|
|
$where = array();
|
|
$where = array();
|
|
|
if (!empty($account)) {
|
|
if (!empty($account)) {
|
|
|
if (empty($sureblur) || $sureblur == 'off') {
|
|
if (empty($sureblur) || $sureblur == 'off') {
|
|
|
- $where[] = array('st_zq_bet.account_name', 'like', '%' . $account . '%');
|
|
|
|
|
|
|
+ $where[] = array('money_buy_str.account_name', 'like', '%' . $account . '%');
|
|
|
} else {
|
|
} else {
|
|
|
- $where[] = array('st_zq_bet.account_name', '=', $account);
|
|
|
|
|
|
|
+ $where[] = array('money_buy_str.account_name', '=', $account);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (!empty($star_time)) {
|
|
if (!empty($star_time)) {
|
|
|
if (!empty($end_time)){
|
|
if (!empty($end_time)){
|
|
|
- $where[] = array('st_zq_bet.money_time', '>', $star_time);
|
|
|
|
|
- $where[] = array('st_zq_bet.money_time', '<', $end_time);
|
|
|
|
|
|
|
+ $where[] = array('money_buy_str.money_time', '>', $star_time);
|
|
|
|
|
+ $where[] = array('money_buy_str.money_time', '<', $end_time);
|
|
|
}else{
|
|
}else{
|
|
|
- $where[] = array('st_zq_bet.money_time', '>', $star_time);
|
|
|
|
|
|
|
+ $where[] = array('money_buy_str.money_time', '>', $star_time);
|
|
|
}
|
|
}
|
|
|
}else if(empty($star_time)){
|
|
}else if(empty($star_time)){
|
|
|
if (!empty($end_time)){
|
|
if (!empty($end_time)){
|
|
|
|
|
|
|
|
- $where[] = array('st_zq_bet.money_time', '<', $end_time);
|
|
|
|
|
|
|
+ $where[] = array('money_buy_str.money_time', '<', $end_time);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (!empty($order_id)){
|
|
if (!empty($order_id)){
|
|
|
- $where[] = array('st_zq_bet.order_id', $order_id);
|
|
|
|
|
- }
|
|
|
|
|
- if (!empty($match_id)){
|
|
|
|
|
- $where[] = array('st_zq_bet.match_id', $match_id);
|
|
|
|
|
|
|
+ $where[] = array('money_buy_str.order_id', $order_id);
|
|
|
}
|
|
}
|
|
|
- $newapp = new \App\Models\SportsNoteList();
|
|
|
|
|
- $data = $newapp->getinfo($list, $page, $where,$type);
|
|
|
|
|
|
|
+ $newapp = new \App\Models\MoneyBuyStr();
|
|
|
|
|
+ $data = $newapp->getinfo($list, $page, $where);
|
|
|
|
|
|
|
|
return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total'], 0, $where);
|
|
return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total'], 0, $where);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- *修改订单
|
|
|
|
|
|
|
+ *串关注单详情
|
|
|
*/
|
|
*/
|
|
|
- function edit(Req $req) {
|
|
|
|
|
|
|
+ function detail(Req $req) {
|
|
|
|
|
+ $id = $req->id;
|
|
|
|
|
+ $request['name_chinese'] = isset($req->name_chinese) ? trim($req->name_chinese) : null;
|
|
|
|
|
+ $request['sureblurs'] = isset($req->sureblurs) ? $req->sureblurs : 'on';
|
|
|
|
|
+ $request['account'] = isset($req->account) ? trim($req->account) :null ;
|
|
|
|
|
+ $request['match_id'] = isset($req->match_id) ? trim($req->match_id) :null ;
|
|
|
|
|
+ $dt = \App\Lib\DataTable\DataTable::init();
|
|
|
|
|
+ $dt->setDataSource('/admin/SoccerStringNoteList/detailinfo?id='.$id.'');
|
|
|
|
|
+ $dt->setLang('sportsnotelist');
|
|
|
|
|
+ $dt->addColsFields('match_id', array('templet' => '#userdetail', 'sort' => true, 'width' => 80));
|
|
|
|
|
+ $dt->addColsFields('home_guest', array('templet' => '#userdetail', 'sort' => false, 'width' => 200));
|
|
|
|
|
+ $dt->addColsFields('game_type', array('templet' => '#userdetail', 'sort' => false, 'width' => 90));
|
|
|
|
|
+ $dt->addColsFields('odds_code', array('templet' => '#userdetail', 'sort' => false, 'width' => 120));
|
|
|
|
|
+ $dt->addColsFields('condition', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
|
|
|
+ $dt->addColsFields('odds', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
|
|
|
+ $dt->enableCheckBox();
|
|
|
|
|
+ return view('sports/sports_notelistdetail', $dt->render($request));
|
|
|
|
|
+ }
|
|
|
|
|
+ function detailinfo(Req $req) {
|
|
|
$id = $req->id;
|
|
$id = $req->id;
|
|
|
- if (intval($id) < 1) {
|
|
|
|
|
- return -1;
|
|
|
|
|
- }
|
|
|
|
|
- $lange = trans('sportssoccer');
|
|
|
|
|
- $data = \App\Models\SportsNoteList::where('id',$id)->first();
|
|
|
|
|
- $data->order_time = $data->order_id.' '.$data->money_time;
|
|
|
|
|
- //for($i=0;$i<count($data);$i++){
|
|
|
|
|
- $codes = json_decode($data->codes, true);
|
|
|
|
|
- $data->content = '';
|
|
|
|
|
- for($j=0;$j<count($codes);$j++){
|
|
|
|
|
- $odds_only = $data->odds_only;
|
|
|
|
|
- $res = DB::table('st_zq_odds_record')->where('odds_only',$odds_only)->first();
|
|
|
|
|
- $result = DB::table('st_odds_code')->where('odds_code',$res['odds_code'])->first();
|
|
|
|
|
- //$result = \App\Models\Matchcode::where('odds_code',$res->odds_code)->first();
|
|
|
|
|
- $game = DB::table('st_game_type')->where('game_code',$data->game_name)->first();
|
|
|
|
|
- $data->content = $data->content.$result['odds_name']. '¥'.$codes[$j]['bet_amount'];
|
|
|
|
|
- $data->game = $game->game_name;
|
|
|
|
|
- }
|
|
|
|
|
- //}
|
|
|
|
|
|
|
|
|
|
- if (!$req->isMethod('post')) {
|
|
|
|
|
|
|
+ //$match_id = Request::get('match_id') ? Request::get('match_id') : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
- $data = $data->toArray();
|
|
|
|
|
|
|
+ $newapp = new \App\Models\MoneyBuyStr();
|
|
|
|
|
+ $data = $newapp->getdetailinfo($id);
|
|
|
|
|
+ //$data = $data->toArray();
|
|
|
|
|
|
|
|
- return view('sports/sports_notelist_form', $data);
|
|
|
|
|
- } else {
|
|
|
|
|
- $model = new \App\Models\SportsNoteList();
|
|
|
|
|
- $model->id = $req->input('id');
|
|
|
|
|
- $model = $model::find($model->id);
|
|
|
|
|
- $model->water_status = $req->input('water_status');
|
|
|
|
|
- $model->settle_status = $req->input('settle_status');
|
|
|
|
|
- $model->game_status = $req->input('game_status');
|
|
|
|
|
- //$model->utime = date('Y-m-d H:i:s',time());
|
|
|
|
|
|
|
+ //return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total']);
|
|
|
|
|
+ return \App\Lib\DataTable\DataTable::init()->toJson($data);
|
|
|
|
|
+
|
|
|
|
|
+ //return view('sports/sports_notelistdetail', $data);
|
|
|
|
|
|
|
|
- $model->save();
|
|
|
|
|
- return responseToJson(1);
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- *订单审核
|
|
|
|
|
|
|
+ *串关注单重新结算
|
|
|
*/
|
|
*/
|
|
|
- public function orderstatus(Req $req) {
|
|
|
|
|
- $id = $req->input('id');
|
|
|
|
|
- if (empty($id)) {
|
|
|
|
|
- return responseToJson(-2001); //id������
|
|
|
|
|
- }
|
|
|
|
|
- $ids = explode(',', $id);
|
|
|
|
|
- if (!is_array($ids) && intval($ids) < 0) {
|
|
|
|
|
- return responseToJson(-2002); //id����
|
|
|
|
|
- }
|
|
|
|
|
- if (is_array($ids) && count($ids) > 0) {
|
|
|
|
|
- foreach ($ids as $k => $v) {
|
|
|
|
|
- if (intval($v) < 1) {
|
|
|
|
|
- unset($ids[$k]);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ public function resettlement(Req $req) {
|
|
|
|
|
+ $id = $req->id;
|
|
|
|
|
+ if (intval($id) < 1) {
|
|
|
|
|
+ return -1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $rows = \App\Models\SportsNoteList::whereIn('id', $ids)->delete();
|
|
|
|
|
- if (!$rows) {
|
|
|
|
|
- return responseToJson(-2003); //id����
|
|
|
|
|
- }
|
|
|
|
|
- return responseToJson(1, trans('menu.delete_success')); //id����
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- *删除订单
|
|
|
|
|
|
|
+ *删除串关注单
|
|
|
*/
|
|
*/
|
|
|
public function delete(Req $req) {
|
|
public function delete(Req $req) {
|
|
|
$id = $req->input('id');
|
|
$id = $req->input('id');
|
|
@@ -191,7 +162,7 @@ class SoccerStringNoteListController extends Controller
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $rows = \App\Models\SportsNoteList::whereIn('id', $ids)->delete();
|
|
|
|
|
|
|
+ $rows = \App\Models\MoneyBuyStr::whereIn('id', $ids)->delete();
|
|
|
if (!$rows) {
|
|
if (!$rows) {
|
|
|
return responseToJson(-2003); //id����
|
|
return responseToJson(-2003); //id����
|
|
|
}
|
|
}
|
|
@@ -204,11 +175,10 @@ class SoccerStringNoteListController extends Controller
|
|
|
*/
|
|
*/
|
|
|
function moneycount()
|
|
function moneycount()
|
|
|
{
|
|
{
|
|
|
- $type = '2';//串关注单
|
|
|
|
|
$where = Request::has('where') ? Request::get('where') : '';
|
|
$where = Request::has('where') ? Request::get('where') : '';
|
|
|
- $db = new \App\Models\SportsNoteList;
|
|
|
|
|
|
|
+ $db = new \App\Models\MoneyBuyStr;
|
|
|
|
|
|
|
|
- $data = $db->MoneyCount($where,$type);
|
|
|
|
|
|
|
+ $data = $db->MoneyCount($where);
|
|
|
return responseToJson($data);
|
|
return responseToJson($data);
|
|
|
}
|
|
}
|
|
|
|
|
|