SfsixlotteryBuy.php 584 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Models;
  3. use DB;
  4. class SfsixlotteryBuy extends BaseModel {
  5. protected $table = "game_sfsixlottery_buy";
  6. public $timestamps = false;
  7. //获取注单信息
  8. function getBetInfo($where) {
  9. $data = $this->select('codes')->where($where)->get();
  10. if (!$data) {
  11. return -503000102; //没有订单数据
  12. }
  13. return $data->toArray();
  14. }
  15. //更新购买状态
  16. protected function updateDatas($no){
  17. $res=$this->where('no',$no)->where('status',0)->update(['status'=>2]);
  18. if(!$res){
  19. return -503123102;
  20. }
  21. return 1;
  22. }
  23. }