|
@@ -21,6 +21,14 @@ class SportsBaseController extends Controller {
|
|
|
$request['recommend'] = isset($req->recommend) ? trim($req->recommend) : '';
|
|
$request['recommend'] = isset($req->recommend) ? trim($req->recommend) : '';
|
|
|
$request['status'] = isset($req->status) ? trim($req->status) : '-1';
|
|
$request['status'] = isset($req->status) ? trim($req->status) : '-1';
|
|
|
$request['sureblurs'] = isset($req->sureblurs) ? $req->sureblurs : 'on';
|
|
$request['sureblurs'] = isset($req->sureblurs) ? $req->sureblurs : 'on';
|
|
|
|
|
+
|
|
|
|
|
+// $source = \App\Models\Setinfo::where('id','1000')->first();
|
|
|
|
|
+// if($source->infocontent != '混合数据'){
|
|
|
|
|
+// $data = \App\Models\BaseLeague::join('st_bq_local_league','st_bq_league.id','=','st_bq_local_league.lg_id')->select('st_bq_league.id','st_bq_league.name_chinese')->where('st_bq_local_league.source',$source->infocontent)->get();
|
|
|
|
|
+// }else{
|
|
|
|
|
+// $data = \App\Models\BaseLeague::select('id','name_chinese')->get();
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
$data = \App\Models\BaseLeague::select('id','lg_id','name_chinese')->get();
|
|
$data = \App\Models\BaseLeague::select('id','lg_id','name_chinese')->get();
|
|
|
$request['league'] = $data;
|
|
$request['league'] = $data;
|
|
|
$dt = \App\Lib\DataTable\DataTable::init();
|
|
$dt = \App\Lib\DataTable\DataTable::init();
|
|
@@ -30,14 +38,11 @@ class SportsBaseController extends Controller {
|
|
|
$dt->addColsFields('lg_id', array('templet' => '#userdetail', 'sort' => true, 'width' => 80));
|
|
$dt->addColsFields('lg_id', array('templet' => '#userdetail', 'sort' => true, 'width' => 80));
|
|
|
$dt->addColsFields('name_chinese', array('templet' => '#userdetail', 'sort' => false, 'width' => 200));
|
|
$dt->addColsFields('name_chinese', array('templet' => '#userdetail', 'sort' => false, 'width' => 200));
|
|
|
$dt->addColsFields('home_guest', array('templet' => '#userdetail', 'sort' => false, 'width' => 260));
|
|
$dt->addColsFields('home_guest', array('templet' => '#userdetail', 'sort' => false, 'width' => 260));
|
|
|
-// $dt->addColsFields('home_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 130));
|
|
|
|
|
-// $dt->addColsFields('guest_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 130));
|
|
|
|
|
$dt->addColsFields('match_date', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
|
|
$dt->addColsFields('match_date', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
|
|
|
$dt->addColsFields('match_time', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
|
|
$dt->addColsFields('match_time', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
|
|
|
$dt->addColsFields('recommend', array('templet' => '#recommend', 'sort' => false, 'width' => 120,'align' => 'center'));
|
|
$dt->addColsFields('recommend', array('templet' => '#recommend', 'sort' => false, 'width' => 120,'align' => 'center'));
|
|
|
$dt->addColsFields('status', array('templet' => '#userdetail', 'sort' => false, 'width' => 100));
|
|
$dt->addColsFields('status', array('templet' => '#userdetail', 'sort' => false, 'width' => 100));
|
|
|
$dt->addColsFields('result', array( 'sort' => false, 'width' => 100));
|
|
$dt->addColsFields('result', array( 'sort' => false, 'width' => 100));
|
|
|
- //$arr[] = 'view';
|
|
|
|
|
if (checkRriv('/admin/SportsBase/edit')) {
|
|
if (checkRriv('/admin/SportsBase/edit')) {
|
|
|
$arr[] = 'edit';
|
|
$arr[] = 'edit';
|
|
|
}
|
|
}
|
|
@@ -76,7 +81,6 @@ class SportsBaseController extends Controller {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (!empty($match_date)) {
|
|
if (!empty($match_date)) {
|
|
|
-// $where[] = array('st_bq_competition.match_date', '=', '2019-04-13');
|
|
|
|
|
$where[] = array('st_bq_competition.match_date', '=', $match_date);
|
|
$where[] = array('st_bq_competition.match_date', '=', $match_date);
|
|
|
}
|
|
}
|
|
|
if ($status != -1) {
|
|
if ($status != -1) {
|
|
@@ -106,6 +110,14 @@ class SportsBaseController extends Controller {
|
|
|
*获取所有足球联赛信息
|
|
*获取所有足球联赛信息
|
|
|
*/
|
|
*/
|
|
|
function getParent() {
|
|
function getParent() {
|
|
|
|
|
+
|
|
|
|
|
+// $source = \App\Models\Setinfo::where('id','1000')->first();
|
|
|
|
|
+// if($source->infocontent != '混合数据'){
|
|
|
|
|
+// $data = \App\Models\BaseLeague::join('st_bq_local_league','st_bq_league.id','=','st_bq_local_league.lg_id')->select('st_bq_league.id','st_bq_league.name_chinese')->where('st_bq_local_league.source',$source->infocontent)->get();
|
|
|
|
|
+// }else{
|
|
|
|
|
+// $data = \App\Models\BaseLeague::select('id','name_chinese')->get();
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
$data = \App\Models\BaseLeague::select('id','lg_id','name_chinese')->get();
|
|
$data = \App\Models\BaseLeague::select('id','lg_id','name_chinese')->get();
|
|
|
if (!$data) {
|
|
if (!$data) {
|
|
|
return;
|
|
return;
|
|
@@ -298,7 +310,10 @@ class SportsBaseController extends Controller {
|
|
|
$match_id = $newapp->match_id;
|
|
$match_id = $newapp->match_id;
|
|
|
}
|
|
}
|
|
|
$request['match_id'] = isset($match_id) ? trim($match_id) : null;
|
|
$request['match_id'] = isset($match_id) ? trim($match_id) : null;
|
|
|
- $data = \App\Models\Matchcode::where('p_id','0')->where('game_type','bq')->get();
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $data = \App\Models\Matchcode::where('p_id','0')->get();
|
|
|
|
|
+
|
|
|
|
|
+ //$data = \App\Models\Matchcode::where('p_id','0')->where('game_type','bq')->get();
|
|
|
$request['pcode'] = $data;
|
|
$request['pcode'] = $data;
|
|
|
$dt = \App\Lib\DataTable\DataTable::init();
|
|
$dt = \App\Lib\DataTable\DataTable::init();
|
|
|
$dt->setDataSource('/admin/SportsBase/oddsinfo?match_id='.$match_id.'');
|
|
$dt->setDataSource('/admin/SportsBase/oddsinfo?match_id='.$match_id.'');
|
|
@@ -368,7 +383,10 @@ class SportsBaseController extends Controller {
|
|
|
*添加赔率
|
|
*添加赔率
|
|
|
*/
|
|
*/
|
|
|
function addodds(Req $req) {
|
|
function addodds(Req $req) {
|
|
|
- $pcodedata = \App\Models\Matchcode::where('p_id','0')->where('game_type','bq')->get();
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $pcodedata = \App\Models\Matchcode::where('p_id','0')->get();
|
|
|
|
|
+
|
|
|
|
|
+ //$pcodedata = \App\Models\Matchcode::where('p_id','0')->where('game_type','bq')->get();
|
|
|
for($i=0;$i<count($pcodedata);$i++){
|
|
for($i=0;$i<count($pcodedata);$i++){
|
|
|
$pcodedata[$i]->p_code = $pcodedata[$i]->odds_code;
|
|
$pcodedata[$i]->p_code = $pcodedata[$i]->odds_code;
|
|
|
}
|
|
}
|
|
@@ -440,7 +458,10 @@ class SportsBaseController extends Controller {
|
|
|
*修改赔率
|
|
*修改赔率
|
|
|
*/
|
|
*/
|
|
|
function oddsedit(Req $req) {
|
|
function oddsedit(Req $req) {
|
|
|
- $pcodedata = \App\Models\Matchcode::where('p_id','0')->where('game_type','bq')->get();
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $pcodedata = \App\Models\Matchcode::where('p_id','0')->get();
|
|
|
|
|
+
|
|
|
|
|
+ //$pcodedata = \App\Models\Matchcode::where('p_id','0')->where('game_type','bq')->get();
|
|
|
for($i=0;$i<count($pcodedata);$i++){
|
|
for($i=0;$i<count($pcodedata);$i++){
|
|
|
$pcodedata[$i]->p_code = $pcodedata[$i]->odds_code;
|
|
$pcodedata[$i]->p_code = $pcodedata[$i]->odds_code;
|
|
|
}
|
|
}
|
|
@@ -454,8 +475,13 @@ class SportsBaseController extends Controller {
|
|
|
if (!$data) {
|
|
if (!$data) {
|
|
|
return -2;
|
|
return -2;
|
|
|
}
|
|
}
|
|
|
- $res = \App\Models\Matchcode::where('odds_code', $data->odds_code)->where('game_type','bq')->first();
|
|
|
|
|
- $data->odds_name = $res->odds_name;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $res = \App\Models\Matchcode::where('odds_code', $data->odds_code)->first();
|
|
|
|
|
+
|
|
|
|
|
+ //$res = \App\Models\Matchcode::where('odds_code', $data->odds_code)->where('game_type','bq')->first();
|
|
|
|
|
+ if(!empty($res)){
|
|
|
|
|
+ $data->odds_name = $res->odds_name;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
$expire_time = $data->expire_time; //2019-04-15 21:10:00
|
|
$expire_time = $data->expire_time; //2019-04-15 21:10:00
|
|
|
$str1 = str_replace(" ","T",$expire_time);
|
|
$str1 = str_replace(" ","T",$expire_time);
|