alias("s")->field("g.game_name,g.game_appid,s.*")->join("left join tab_game g on g.id = s.game_id")->where($map)->find(); return $data; } public function addSet($game_id){ $data['id'] = $data['game_id'] = $game_id; //游戏密钥 MD5 16位加密4位随机数 $data['game_key'] = substr(md5(uniqid(1)),8,16); //访问密钥 $data['access_key'] = substr(md5(uniqid(2)),8,16); $this->add($data); } }