Exemple #1
0
	/**
	 * 获取游戏接口参数
	 * @param rs ResultSet
	 * @return
	 */
	protected static wh.game.model.GameInterfaceParams getModel(ResultSet rs) throws SQLException{
		wh.game.model.GameInterfaceParams m = null;
		if (rs != null)
        {
            m = new wh.game.model.GameInterfaceParams();
			try{
				m.setGameInterfaceParamsId(rs.getInt("GameInterfaceParamsId"));
				wh.game.model.GameInterface gameInterface = new wh.game.model.GameInterface();
				gameInterface.setGameInterfaceId(rs.getInt("GameInterface_GameInterfaceId"));
				gameInterface.setGame(new wh.game.model.Game());
				gameInterface.getGame().setGameId(rs.getInt("GameInterface_GameId"));
				gameInterface.setName(rs.getString("GameInterface_Name"));
				gameInterface.setUrl(rs.getString("GameInterface_Url"));
				gameInterface.setInterfaceType(rs.getByte("GameInterface_InterfaceType"));
				gameInterface.setPayUnitType(rs.getByte("GameInterface_PayUnitType"));
				gameInterface.setCreateDate(rs.getTimestamp("GameInterface_CreateDate"));
				gameInterface.setStatus(rs.getByte("GameInterface_Status"));
				gameInterface.setSignJoinSymbol(rs.getString("GameInterface_SignJoinSymbol"));
				m.setGameInterface(gameInterface);
				
				wh.game.model.Game game = new wh.game.model.Game();
				game.setGameId(rs.getInt("Game_GameId"));
				game.setProvider(new wh.game.model.Provider());
				game.getProvider().setProviderId(rs.getInt("Game_ProviderId"));
				game.setManager(new wh.member.model.Manager());
				game.getManager().setManagerId(rs.getInt("Game_ManagerId"));
				game.setGameCategory(new wh.game.model.GameCategory());
				game.getGameCategory().setGameCategoryId(rs.getInt("Game_GameCategoryId"));
				game.setGameName(rs.getString("Game_GameName"));
				game.setPosterPath(rs.getString("Game_PosterPath"));
				game.setCreateDate(rs.getTimestamp("Game_CreateDate"));
				game.setGameType(rs.getByte("Game_GameType"));
				game.setEnableType(rs.getByte("Game_EnableType"));
				game.setStatus(rs.getByte("Game_Status"));
				game.setGameMoneyType(rs.getByte("Game_GameMoneyType"));
				game.setGameMoneyRate(rs.getInt("Game_GameMoneyRate"));
				game.setContent(rs.getString("Game_Content"));
				game.setRecommendType(rs.getByte("Game_RecommendType"));
				game.setHomeUrl(rs.getString("Game_HomeUrl"));
				game.setCPosterPath(rs.getString("Game_CPosterPath"));
				game.setSPosterPath(rs.getString("Game_SPosterPath"));
				game.setLPosterPath(rs.getString("Game_LPosterPath"));
				m.setGame(game);
				
				m.setParamName(rs.getString("ParamName"));
				m.setParamValue(rs.getString("ParamValue"));
				m.setParamExplain(rs.getString("ParamExplain"));
				m.setSignType(rs.getByte("SignType"));
				m.setSignIndex(rs.getByte("SignIndex"));
				m.setParamType(rs.getByte("ParamType"));
				m.setParamInType(rs.getByte("ParamInType"));
				m.setParamOutType(rs.getByte("ParamOutType"));
				m.setSignFormatValue(rs.getString("SignFormatValue"));
			}catch (SQLException e) {
				throw new SQLException(e.getMessage(),e);
			}
        }
        return m;
	} 
Exemple #2
0
	/**
	 * 获取激活码
	 * @param rs ResultSet
	 * @return
	 */
	protected static wh.game.model.ActiveCode getModel(ResultSet rs) throws SQLException{
		wh.game.model.ActiveCode m = null;
		if (rs != null)
        {
            m = new wh.game.model.ActiveCode();
			try{
				m.setActiveCodeId(rs.getInt("ActiveCodeId"));
				wh.game.model.Game game = new wh.game.model.Game();
				game.setGameId(rs.getInt("Game_GameId"));
				game.setProvider(new wh.game.model.Provider());
				game.getProvider().setProviderId(rs.getInt("Game_ProviderId"));
				game.setManager(new wh.member.model.Manager());
				game.getManager().setManagerId(rs.getInt("Game_ManagerId"));
				game.setGameCategory(new wh.game.model.GameCategory());
				game.getGameCategory().setGameCategoryId(rs.getInt("Game_GameCategoryId"));
				game.setGameName(rs.getString("Game_GameName"));
				game.setPosterPath(rs.getString("Game_PosterPath"));
				game.setCreateDate(rs.getTimestamp("Game_CreateDate"));
				game.setGameType(rs.getByte("Game_GameType"));
				game.setEnableType(rs.getByte("Game_EnableType"));
				game.setStatus(rs.getByte("Game_Status"));
				game.setGameMoneyType(rs.getByte("Game_GameMoneyType"));
				game.setGameMoneyRate(rs.getInt("Game_GameMoneyRate"));
				game.setContent(rs.getString("Game_Content"));
				game.setRecommendType(rs.getByte("Game_RecommendType"));
				game.setHomeUrl(rs.getString("Game_HomeUrl"));
				game.setCPosterPath(rs.getString("Game_CPosterPath"));
				game.setSPosterPath(rs.getString("Game_SPosterPath"));
				game.setLPosterPath(rs.getString("Game_LPosterPath"));
				m.setGame(game);
				
				wh.game.model.Server server = new wh.game.model.Server();
				server.setServerId(rs.getInt("Server_ServerId"));
				server.setGame(new wh.game.model.Game());
				server.getGame().setGameId(rs.getInt("Server_GameId"));
				server.setManager(new wh.member.model.Manager());
				server.getManager().setManagerId(rs.getInt("Server_ManagerId"));
				server.setProvider(new wh.game.model.Provider());
				server.getProvider().setProviderId(rs.getInt("Server_ProviderId"));
				server.setServerName(rs.getString("Server_ServerName"));
				server.setServerCode(rs.getString("Server_ServerCode"));
				server.setSequenceNumber(rs.getInt("Server_SequenceNumber"));
				server.setServerIP(rs.getString("Server_ServerIP"));
				server.setServerDomain(rs.getString("Server_ServerDomain"));
				server.setServerPort(rs.getString("Server_ServerPort"));
				server.setServerUrl(rs.getString("Server_ServerUrl"));
				server.setOpenDate(rs.getTimestamp("Server_OpenDate"));
				server.setCreateDate(rs.getTimestamp("Server_CreateDate"));
				server.setLineType(rs.getByte("Server_LineType"));
				server.setEnableType(rs.getByte("Server_EnableType"));
				server.setRechargeType(rs.getByte("Server_RechargeType"));
				server.setRecommendType(rs.getByte("Server_RecommendType"));
				server.setEnableMessageType(rs.getByte("Server_EnableMessageType"));
				server.setServerType(rs.getByte("Server_ServerType"));
				server.setStatus(rs.getByte("Server_Status"));
				m.setServer(server);
				
				m.setName(rs.getString("Name"));
				m.setCode(rs.getString("Code"));
				m.setActiveCodeType(rs.getByte("ActiveCodeType"));
				m.setCreateDate(rs.getTimestamp("CreateDate"));
				m.setModifyDate(rs.getTimestamp("ModifyDate"));
				m.setStatus(rs.getByte("Status"));
				m.setUsedType(rs.getByte("UsedType"));
			}catch (SQLException e) {
				throw new SQLException(e.getMessage(),e);
			}
        }
        return m;
	}