| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- /**
- *------Create thems Model------
- *------SCWPHP Version 1.0.0------
- *------Dev Model Jions------
- *------Create Time 2017-06-13 18:45:24------
- */
- namespace App\Commons\Model;
- use \System\Model;
- class Money_buy_match extends Model {
- protected $table = 'money_buy_match';
- public function getByDetail($Detailid){
- $ret = $this->where('money_buy_detail_id' ,$Detailid)->find();
- return $ret;
- }
- public function getByTypeMatch($type,$matchId){
- $rets = $this->where(['game_code'=>$type,'match_id'=>$matchId])->find();
- return $rets;
- }
- //查找某个订单下是否还有未处理完的订单情况
- public function FindByTypeOrderResult($type,$OrderId,$result=0){
- if (is_string($result)){
- $ret = $this->where(['game_code'=>$type,'order_id'=>$OrderId,'result'=>$result])->find();
- }else{
- $ret = $this->where(['game_code'=>$type,'order_id'=>$OrderId])->whereIn('result',$result)->find();
- }
- return $ret;
- }
- public function getByBatchId($batch_id){
- $ret = $this->where('batch_id',$batch_id)->find();
- return $ret;
- }
- }
|