|
@@ -15,12 +15,20 @@ use Request;
|
|
|
class SportsBasketController extends Controller {
|
|
class SportsBasketController extends Controller {
|
|
|
|
|
|
|
|
public function score(Req $req) {
|
|
public function score(Req $req) {
|
|
|
- $request['name_chinese'] = isset($req->name_chinese) ? trim($req->name_chinese) : '-1';
|
|
|
|
|
|
|
+ //$request['name_chinese'] = isset($req->name_chinese) ? trim($req->name_chinese) : '-1';
|
|
|
|
|
+ $request['name_chinese'] = isset($req->name_chinese) ? trim($req->name_chinese) : '';
|
|
|
$request['home_team'] = isset($req->home_team) ? trim($req->home_team) : null;
|
|
$request['home_team'] = isset($req->home_team) ? trim($req->home_team) : null;
|
|
|
$request['match_date'] = isset($req->match_date) ? trim($req->match_date) : null;
|
|
$request['match_date'] = isset($req->match_date) ? trim($req->match_date) : null;
|
|
|
$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';
|
|
|
|
|
+ $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['is_rollball'] = isset($req->is_rollball) ? trim($req->is_rollball) : '0';
|
|
|
|
|
+ $request['is_today'] = isset($req->is_today) ? trim($req->is_today) : '0';
|
|
|
|
|
+ $request['is_morningplate'] = isset($req->is_morningplate) ? trim($req->is_morningplate) : '0';
|
|
|
|
|
+ $request['is_stringscene'] = isset($req->is_stringscene) ? trim($req->is_stringscene) : '0';
|
|
|
|
|
|
|
|
// $source = \App\Models\Setinfo::where('id','1000')->first();
|
|
// $source = \App\Models\Setinfo::where('id','1000')->first();
|
|
|
// if($source->infocontent != '混合数据'){
|
|
// if($source->infocontent != '混合数据'){
|
|
@@ -61,6 +69,8 @@ class SportsBasketController extends Controller {
|
|
|
$name_chinese = Request::has('name_chinese') ? Request::get('name_chinese') : '';
|
|
$name_chinese = Request::has('name_chinese') ? Request::get('name_chinese') : '';
|
|
|
$home_team = Request::has('home_team') ? Request::get('home_team') : '';
|
|
$home_team = Request::has('home_team') ? Request::get('home_team') : '';
|
|
|
$match_date = Request::has('match_date') ? Request::get('match_date') : '';
|
|
$match_date = Request::has('match_date') ? Request::get('match_date') : '';
|
|
|
|
|
+ $star_time = Request::get('star_time') ? Request::get('star_time') : '';
|
|
|
|
|
+ $end_time = Request::get('end_time') ? Request::get('end_time') : '';
|
|
|
//$match_date = $req->input('match_date');
|
|
//$match_date = $req->input('match_date');
|
|
|
// if(!empty($match_date)){
|
|
// if(!empty($match_date)){
|
|
|
// return 2;
|
|
// return 2;
|
|
@@ -69,9 +79,17 @@ class SportsBasketController extends Controller {
|
|
|
$sureblur = Request::has('sureblurs') ? Request::get('sureblurs') : 'off';
|
|
$sureblur = Request::has('sureblurs') ? Request::get('sureblurs') : 'off';
|
|
|
$where = array();
|
|
$where = array();
|
|
|
$orwhere = array();
|
|
$orwhere = array();
|
|
|
- if (!empty($name_chinese) && $name_chinese!=-1) {
|
|
|
|
|
- $where[] = array('st_lq_league.name_chinese', '=', $name_chinese);
|
|
|
|
|
|
|
+// if (!empty($name_chinese) && $name_chinese!=-1) {
|
|
|
|
|
+// $where[] = array('st_lq_league.name_chinese', '=', $name_chinese);
|
|
|
|
|
+// }
|
|
|
|
|
+ if (!empty($name_chinese)) {
|
|
|
|
|
+ if (empty($sureblur) || $sureblur == 'off') {
|
|
|
|
|
+ $where[] = array('st_lq_league.name_chinese', 'like', '%' . $name_chinese . '%');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $where[] = array('st_lq_league.name_chinese', '=', $name_chinese);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
if (!empty($home_team)) {
|
|
if (!empty($home_team)) {
|
|
|
if (empty($sureblur) || $sureblur == 'off') {
|
|
if (empty($sureblur) || $sureblur == 'off') {
|
|
|
$where[] = array('st_lq_competition.home_team', 'like', '%' . $home_team . '%');
|
|
$where[] = array('st_lq_competition.home_team', 'like', '%' . $home_team . '%');
|
|
@@ -81,9 +99,24 @@ class SportsBasketController extends Controller {
|
|
|
$orwhere[] = array('st_lq_competition.guest_team', '=', $home_team);
|
|
$orwhere[] = array('st_lq_competition.guest_team', '=', $home_team);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (!empty($match_date)) {
|
|
|
|
|
- $where[] = array('st_lq_competition.match_date', '=', $match_date);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (!empty($star_time)) {
|
|
|
|
|
+ if (!empty($end_time)){
|
|
|
|
|
+ $where[] = array('st_lq_competition.match_date', '>=', $star_time);
|
|
|
|
|
+ $where[] = array('st_lq_competition.match_date', '<=', $end_time);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $where[] = array('st_lq_competition.match_date', '>=', $star_time);
|
|
|
|
|
+ }
|
|
|
|
|
+ }else if(empty($star_time)){
|
|
|
|
|
+ if (!empty($end_time)){
|
|
|
|
|
+
|
|
|
|
|
+ $where[] = array('st_lq_competition.match_date', '<=', $end_time);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+// if (!empty($match_date)) {
|
|
|
|
|
+// $where[] = array('st_lq_competition.match_date', '=', $match_date);
|
|
|
|
|
+// }
|
|
|
if ($status != -1) {
|
|
if ($status != -1) {
|
|
|
$where[] = array('st_lq_competition.status', '=', $status);
|
|
$where[] = array('st_lq_competition.status', '=', $status);
|
|
|
}
|
|
}
|
|
@@ -178,6 +211,26 @@ class SportsBasketController extends Controller {
|
|
|
$model->match_date = $req->input('match_date');
|
|
$model->match_date = $req->input('match_date');
|
|
|
$model->match_time = $req->input('match_time');
|
|
$model->match_time = $req->input('match_time');
|
|
|
$model->status = $req->input('status');
|
|
$model->status = $req->input('status');
|
|
|
|
|
+ if($req->input('is_rollball') == true){
|
|
|
|
|
+ $model->is_rollball = 1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $model->is_rollball = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ if($req->input('is_today') == true){
|
|
|
|
|
+ $model->is_today = 1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $model->is_today = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ if($req->input('is_morningplate') == true){
|
|
|
|
|
+ $model->is_morningplate = 1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $model->is_morningplate = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ if($req->input('is_stringscene') == true){
|
|
|
|
|
+ $model->is_stringscene = 1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $model->is_stringscene = 0;
|
|
|
|
|
+ }
|
|
|
$model->match_id = time() ;
|
|
$model->match_id = time() ;
|
|
|
$model->ctime = date('Y-m-d H:i:s',time());
|
|
$model->ctime = date('Y-m-d H:i:s',time());
|
|
|
$model->utime = date('Y-m-d H:i:s',time());
|
|
$model->utime = date('Y-m-d H:i:s',time());
|
|
@@ -283,6 +336,26 @@ class SportsBasketController extends Controller {
|
|
|
$model->match_date = $req->input('match_date');
|
|
$model->match_date = $req->input('match_date');
|
|
|
$model->match_time = $req->input('match_time');
|
|
$model->match_time = $req->input('match_time');
|
|
|
$model->status = $req->input('status');
|
|
$model->status = $req->input('status');
|
|
|
|
|
+ if($req->input('is_rollball') == true){
|
|
|
|
|
+ $model->is_rollball = 1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $model->is_rollball = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ if($req->input('is_today') == true){
|
|
|
|
|
+ $model->is_today = 1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $model->is_today = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ if($req->input('is_morningplate') == true){
|
|
|
|
|
+ $model->is_morningplate = 1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $model->is_morningplate = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ if($req->input('is_stringscene') == true){
|
|
|
|
|
+ $model->is_stringscene = 1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $model->is_stringscene = 0;
|
|
|
|
|
+ }
|
|
|
$model->ctime = date('Y-m-d H:i:s',time());
|
|
$model->ctime = date('Y-m-d H:i:s',time());
|
|
|
$model->utime = date('Y-m-d H:i:s',time());
|
|
$model->utime = date('Y-m-d H:i:s',time());
|
|
|
$model->save();
|
|
$model->save();
|
|
@@ -377,6 +450,7 @@ class SportsBasketController extends Controller {
|
|
|
$dt->addColsFields('min', array('templet' => '#userdetail', 'sort' => false, 'width' => 100));
|
|
$dt->addColsFields('min', array('templet' => '#userdetail', 'sort' => false, 'width' => 100));
|
|
|
$dt->addColsFields('status', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
$dt->addColsFields('status', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
|
|
|
$dt->addColsFields('expire_time', array('templet' => '#userdetail', 'sort' => false, 'width' => 100));
|
|
$dt->addColsFields('expire_time', array('templet' => '#userdetail', 'sort' => false, 'width' => 100));
|
|
|
|
|
+ $dt->addColsFields('source', array('templet' => '#userdetail', 'sort' => false, 'width' => 100));
|
|
|
if (checkRriv('/admin/SportsBasket/oddsedit?id='.$cp_id.'')) {
|
|
if (checkRriv('/admin/SportsBasket/oddsedit?id='.$cp_id.'')) {
|
|
|
$arr[] = 'oddsedit';
|
|
$arr[] = 'oddsedit';
|
|
|
}
|
|
}
|