SettlementMiddleDetail.php 580 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Models;
  3. class SettlementMiddleDetail extends BaseModel
  4. {
  5. protected $table = "settlement_middle_detail";
  6. public $timestamps = false;
  7. public function getSettledatas($gametype, $matchid, $bettype)
  8. {
  9. $ret = [];
  10. $his = $this->where([
  11. 'game_code' => $gametype,
  12. 'match_id' => $matchid,
  13. 'bet_type' => $bettype
  14. ])->get();
  15. if (count($his) > 0) {
  16. foreach ($his as $val) {
  17. $ret[$val->order_id] = $val;
  18. }
  19. }
  20. return $ret;
  21. }
  22. }