'int', 'app_id' => 'int', // 商户ID 'user_id' => 'int', // 用户ID 'bet_amount' => 'int', // 点控期间 下注总分数 'bet_count' => 'int', // 点控期间 下单总数量 'total_win_amount' => 'int', // 点控期间总输赢 'winning_score' => 'int', 'status' => 'int', // 状态 1 正常,0 取消 'round_status' => 'int', // 轮开始 1 开始, 2 已满足 'round_count' => 'int', 'open_status_time' => 'int', // 每轮开始的时间 'create_time' => 'int', 'update_time' => 'int', 'end_time' => 'int', ]; public static function getUserInfo($app_id, $user_id) { $where = ['app_id' => $app_id, 'user_id' => $user_id]; $info = self::where($where)->find(); if (empty($info)) { self::create($where); $info = self::where($where)->find(); } return $info; } }