| 1234567891011121314151617181920212223242526272829 |
- <?php
- /**
- *------Create thems Model------
- *------SCWPHP Version 1.0.0------
- *------Dev Model Jions------
- *------Create Time 2017-06-13 18:45:24------
- */
- namespace App\Models;
- use DB;
- class Comendnotice extends BaseModel {
- protected $table = 'comendnotice';
- public $timestamps = false;
- protected $fillable=['status','pcount','logs','game_code','match_id','result','done_time','start_time','ctime'];
- //添加赛事结束纪录
- function addcomendnotice($match_id,$type){
- $data = $this->where(['match_id'=>$match_id,'game_code'=>$type])->first();
- if(!$data){
- $res=$this->insert(['game_code'=>$type,'pcount'=>1,'match_id'=>$match_id,'ctime'=>date('Y-m-d H:i:s')]);
- if(!$res){
- return -6030001222;
- }
- }
- return 1;
- }
- }
|