JAVA JDBC工具類

欅坂46

前言

有時(shí)候要需要寫(xiě)個(gè)小程序之類的络拌,懶得去搭什么框架。直接用jdbc多好回溺。
更具不同的業(yè)務(wù)需求春贸,具體操作不同混萝。

方案一、jdbc基本連接與數(shù)據(jù)請(qǐng)求

一般不涉及多線程萍恕,高并發(fā)時(shí)逸嘀,次工具類基本夠用了

package com.security.common.util;

import java.sql.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * JDBC工具類
 * Created by Administrator on 2017/1/10.
 */
public class JdbcUtil {

    // 定義數(shù)據(jù)庫(kù)的鏈接
    private Connection conn;
    // 定義sql語(yǔ)句的執(zhí)行對(duì)象
    private PreparedStatement pstmt;
    // 定義查詢返回的結(jié)果集合
    private ResultSet rs;

    // 初始化
    public JdbcUtil(String driver, String url, String username, String password) {
        try {
            Class.forName(driver);
            conn = DriverManager.getConnection(url, username, password);
            System.out.println("數(shù)據(jù)庫(kù)連接成功");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    // 更新/刪除數(shù)據(jù)
        /**
        * @parm params List<String> 類型 
        **/
    public boolean updateByParams(String sql, List params) throws SQLException {
        // 影響行數(shù)
        int result = -1;
        pstmt = conn.prepareStatement(sql);
        int index = 1;
        // 填充sql語(yǔ)句中的占位符
        if (null != params && !params.isEmpty()) {
            for (int i = 0; i < params.size(); i ++) {
                pstmt.setObject(index ++, params.get(i));
            }
        }
        result = pstmt.executeUpdate();
        return result > 0 ? true : false;
    }

    // 查詢多條記錄
    public List<Map> selectByParams(String sql, List params) throws SQLException {
        List<Map> list = new ArrayList<> ();
        int index = 1;
        pstmt = conn.prepareStatement(sql);
        if (null != params && !params.isEmpty()) {
            for (int i = 0; i < params.size(); i ++) {
                pstmt.setObject(index++, params.get(i));
            }
        }
        rs = pstmt.executeQuery();
        ResultSetMetaData metaData = rs.getMetaData();
        int cols_len = metaData.getColumnCount();
        while (rs.next()) {
            Map map = new HashMap();
            for (int i = 0; i < cols_len; i ++) {
                String cols_name = metaData.getColumnName(i + 1);
                Object cols_value = rs.getObject(cols_name);
                if (null == cols_value) {
                    cols_value = "";
                }
                map.put(cols_name, cols_value);
            }
            list.add(map);
        }
        return list;
    }

    // 釋放連接
    public void release() {
        try {
            if (null != rs) rs.close();
            if (null != pstmt) pstmt.close();
            if (null != conn) conn.close();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        System.out.println("釋放數(shù)據(jù)庫(kù)連接");
    }

}


方案二、將工具類封裝處理

稍微多了點(diǎn)內(nèi)容允粤,但是也沒(méi)有復(fù)雜的數(shù)據(jù)處理

數(shù)據(jù)庫(kù)配置文件讀取方法

package com.iflytek.jdbcdemo;
 
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
 
/**
 * 數(shù)據(jù)庫(kù)配置文件讀取方法
 * @author administrator
 *
 */
public class DbConfig {
     
    private String driver;
    private String url;
    private String userName;
    private String password;
     
    public DbConfig() {
        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("com/iflytek/jdbcdemo/dbConfig.properties");
        Properties p=new Properties();
        try {
            p.load(inputStream);
            this.driver=p.getProperty("driver");
            this.url=p.getProperty("url");
            this.userName=p.getProperty("username");
            this.password=p.getProperty("passwrod");
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
         
    }
     
    public String getDriver() {
        return driver;
    }
    public String getUrl() {
        return url;
    }
    public String getUserName() {
        return userName;
    }
    public String getPassword() {
        return password;
    }
     
}

**jdbc工具類 **

package com.iflytek.jdbcdemo;
 
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
 
/**
 * jdbc工具類
 * 
 * @author administrator
 * 
 */
public final class JdbcUnits {
 
    /**
     * 數(shù)據(jù)庫(kù)連接地址
     */
    private static String url ;
    /**
     * 用戶名
     */
    private static String userName ;
    /**
     * 密碼
     */
    private static String password;
     
    private static String driver;
 
    /**
     * 裝載驅(qū)動(dòng)
     */
    static {
         
        DbConfig config=new DbConfig();
        url=config.getUrl();
        userName=config.getUserName();
        password=config.getPassword();
        driver=config.getDriver();
         
        try {
            Class.forName(driver);
        } catch (ClassNotFoundException e) {
            throw new ExceptionInInitializerError(e);
        }
    }
 
    /**
     * 建立數(shù)據(jù)庫(kù)連接
     * 
     * @return
     * @throws SQLException
     */
    public static Connection getConnection() throws SQLException {
        Connection conn = null;
        conn = DriverManager.getConnection(url, userName, password);
        return conn;
    }
 
    /**
     * 釋放連接
     * @param conn
     */
    private static void freeConnection(Connection conn) {
        try {
            conn.close();
        } catch (SQLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
 
    /**
     * 釋放statement
     * @param statement
     */
    private static void freeStatement(Statement statement) {
        try {
            statement.close();
        } catch (SQLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
 
    /**
     * 釋放resultset
     * @param rs
     */
    private static void freeResultSet(ResultSet rs) {
        try {
            rs.close();
        } catch (SQLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
 
    /**
     * 釋放資源
     * 
     * @param conn
     * @param statement
     * @param rs
     */
    public static void free(Connection conn, Statement statement, ResultSet rs) {
        if (rs != null) {
            freeResultSet(rs);
        }
        if (statement != null) {
            freeStatement(statement);
        }
        if (conn != null) {
            freeConnection(conn);
        }
    }
 
}

**數(shù)據(jù)庫(kù)訪問(wèn)幫助類 **

package com.iflytek.jdbcdemo;
 
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
/**
 * 數(shù)據(jù)庫(kù)訪問(wèn)幫助類
 * 
 * @author administrator
 * 
 */
public class JdbcHelper {
 
    private static Connection conn = null;
    private static PreparedStatement preparedStatement = null;
    private static CallableStatement callableStatement = null;
 
    /**
     * 用于查詢厘熟,返回結(jié)果集
     * 
     * @param sql
     *            sql語(yǔ)句
     * @return 結(jié)果集
     * @throws SQLException
     */
    @SuppressWarnings("rawtypes")
    public static List query(String sql) throws SQLException {
 
        ResultSet rs = null;
        try {
            getPreparedStatement(sql);
            rs = preparedStatement.executeQuery();
 
            return ResultToListMap(rs);
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free(rs);
        }
 
    }
 
    /**
     * 用于帶參數(shù)的查詢,返回結(jié)果集
     * 
     * @param sql
     *            sql語(yǔ)句
     * @param paramters
     *            參數(shù)集合
     * @return 結(jié)果集
     * @throws SQLException
     */
    @SuppressWarnings("rawtypes")
    public static List query(String sql, Object... paramters)
            throws SQLException {
 
        ResultSet rs = null;
        try {
            getPreparedStatement(sql);
 
            for (int i = 0; i < paramters.length; i++) {
                preparedStatement.setObject(i + 1, paramters[i]);
            }
            rs = preparedStatement.executeQuery();
            return ResultToListMap(rs);
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free(rs);
        }
    }
 
    /**
     * 返回單個(gè)結(jié)果的值维哈,如count\min\max等等
     * 
     * @param sql
     *            sql語(yǔ)句
     * @return 結(jié)果集
     * @throws SQLException
     */
    public static Object getSingle(String sql) throws SQLException {
        Object result = null;
        ResultSet rs = null;
        try {
            getPreparedStatement(sql);
            rs = preparedStatement.executeQuery();
            if (rs.next()) {
                result = rs.getObject(1);
            }
            return result;
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free(rs);
        }
 
    }
 
    /**
     * 返回單個(gè)結(jié)果值绳姨,如count\min\max等
     * 
     * @param sql
     *            sql語(yǔ)句
     * @param paramters
     *            參數(shù)列表
     * @return 結(jié)果
     * @throws SQLException
     */
    public static Object getSingle(String sql, Object... paramters)
            throws SQLException {
        Object result = null;
        ResultSet rs = null;
        try {
            getPreparedStatement(sql);
 
            for (int i = 0; i < paramters.length; i++) {
                preparedStatement.setObject(i + 1, paramters[i]);
            }
            rs = preparedStatement.executeQuery();
            if (rs.next()) {
                result = rs.getObject(1);
            }
            return result;
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free(rs);
        }
    }
 
    /**
     * 用于增刪改
     * 
     * @param sql
     *            sql語(yǔ)句
     * @return 影響行數(shù)
     * @throws SQLException
     */
    public static int update(String sql) throws SQLException {
 
        try {
            getPreparedStatement(sql);
 
            return preparedStatement.executeUpdate();
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free();
        }
    }
 
    /**
     * 用于增刪改(帶參數(shù))
     * 
     * @param sql
     *            sql語(yǔ)句
     * @param paramters
     *            sql語(yǔ)句
     * @return 影響行數(shù)
     * @throws SQLException
     */
    public static int update(String sql, Object... paramters)
            throws SQLException {
        try {
            getPreparedStatement(sql);
 
            for (int i = 0; i < paramters.length; i++) {
                preparedStatement.setObject(i + 1, paramters[i]);
            }
            return preparedStatement.executeUpdate();
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free();
        }
    }
 
    /**
     * 插入值后返回主鍵值
     * 
     * @param sql
     *            插入sql語(yǔ)句
     * @return 返回結(jié)果
     * @throws Exception
     */
    public static Object insertWithReturnPrimeKey(String sql)
            throws SQLException {
        ResultSet rs = null;
        Object result = null;
        try {
            conn = JdbcUnits.getConnection();
            preparedStatement = conn.prepareStatement(sql,
                    PreparedStatement.RETURN_GENERATED_KEYS);
            preparedStatement.execute();
            rs = preparedStatement.getGeneratedKeys();
            if (rs.next()) {
                result = rs.getObject(1);
            }
            return result;
        } catch (SQLException e) {
            throw new SQLException(e);
        }
    }
 
    /**
     * 插入值后返回主鍵值
     * 
     * @param sql
     *            插入sql語(yǔ)句
     * @param paramters
     *            參數(shù)列表
     * @return 返回結(jié)果
     * @throws SQLException
     */
    public static Object insertWithReturnPrimeKey(String sql,
            Object... paramters) throws SQLException {
        ResultSet rs = null;
        Object result = null;
        try {
            conn = JdbcUnits.getConnection();
            preparedStatement = conn.prepareStatement(sql,
                    PreparedStatement.RETURN_GENERATED_KEYS);
            for (int i = 0; i < paramters.length; i++) {
                preparedStatement.setObject(i + 1, paramters[i]);
            }
            preparedStatement.execute();
            rs = preparedStatement.getGeneratedKeys();
            if (rs.next()) {
                result = rs.getObject(1);
            }
            return result;
        } catch (SQLException e) {
            throw new SQLException(e);
        }
 
    }
 
    /**
     * 調(diào)用存儲(chǔ)過(guò)程執(zhí)行查詢
     * 
     * @param procedureSql
     *            存儲(chǔ)過(guò)程
     * @return
     * @throws SQLException
     */
    @SuppressWarnings("rawtypes")
    public static List callableQuery(String procedureSql) throws SQLException {
        ResultSet rs = null;
        try {
            getCallableStatement(procedureSql);
            rs = callableStatement.executeQuery();
            return ResultToListMap(rs);
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free(rs);
        }
    }
 
    /**
     * 調(diào)用存儲(chǔ)過(guò)程(帶參數(shù)),執(zhí)行查詢
     * 
     * @param procedureSql
     *            存儲(chǔ)過(guò)程
     * @param paramters
     *            參數(shù)表
     * @return
     * @throws SQLException
     */
    @SuppressWarnings("rawtypes")
    public static List callableQuery(String procedureSql, Object... paramters)
            throws SQLException {
        ResultSet rs = null;
        try {
            getCallableStatement(procedureSql);
 
            for (int i = 0; i < paramters.length; i++) {
                callableStatement.setObject(i + 1, paramters[i]);
            }
            rs = callableStatement.executeQuery();
            return ResultToListMap(rs);
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free(rs);
        }
    }
 
    /**
     * 調(diào)用存儲(chǔ)過(guò)程,查詢單個(gè)值
     * 
     * @param procedureSql
     * @return
     * @throws SQLException
     */
    public static Object callableGetSingle(String procedureSql)
            throws SQLException {
        Object result = null;
        ResultSet rs = null;
        try {
            getCallableStatement(procedureSql);
            rs = callableStatement.executeQuery();
            while (rs.next()) {
                result = rs.getObject(1);
            }
            return result;
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free(rs);
        }
    }
 
    /**
     * 調(diào)用存儲(chǔ)過(guò)程(帶參數(shù))阔挠,查詢單個(gè)值
     * 
     * @param procedureSql
     * @param parameters
     * @return
     * @throws SQLException
     */
    public static Object callableGetSingle(String procedureSql,
            Object... paramters) throws SQLException {
        Object result = null;
        ResultSet rs = null;
        try {
            getCallableStatement(procedureSql);
 
            for (int i = 0; i < paramters.length; i++) {
                callableStatement.setObject(i + 1, paramters[i]);
            }
            rs = callableStatement.executeQuery();
            while (rs.next()) {
                result = rs.getObject(1);
            }
            return result;
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free(rs);
        }
    }
 
    public static Object callableWithParamters(String procedureSql)
            throws SQLException {
        try {
            getCallableStatement(procedureSql);
            callableStatement.registerOutParameter(0, Types.OTHER);
            callableStatement.execute();
            return callableStatement.getObject(0);
 
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free();
        }
 
    }
 
    /**
     * 調(diào)用存儲(chǔ)過(guò)程飘庄,執(zhí)行增刪改
     * 
     * @param procedureSql
     *            存儲(chǔ)過(guò)程
     * @return 影響行數(shù)
     * @throws SQLException
     */
    public static int callableUpdate(String procedureSql) throws SQLException {
        try {
            getCallableStatement(procedureSql);
            return callableStatement.executeUpdate();
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free();
        }
    }
 
    /**
     * 調(diào)用存儲(chǔ)過(guò)程(帶參數(shù)),執(zhí)行增刪改
     * 
     * @param procedureSql
     *            存儲(chǔ)過(guò)程
     * @param parameters
     * @return 影響行數(shù)
     * @throws SQLException
     */
    public static int callableUpdate(String procedureSql, Object... parameters)
            throws SQLException {
        try {
            getCallableStatement(procedureSql);
            for (int i = 0; i < parameters.length; i++) {
                callableStatement.setObject(i + 1, parameters[i]);
            }
            return callableStatement.executeUpdate();
        } catch (SQLException e) {
            throw new SQLException(e);
        } finally {
            free();
        }
    }
 
    /**
     * 批量更新數(shù)據(jù)
     * 
     * @param sqlList
     *            一組sql
     * @return
     */
    public static int[] batchUpdate(List<String> sqlList) {
 
        int[] result = new int[] {};
        Statement statenent = null;
        try {
            conn = JdbcUnits.getConnection();
            conn.setAutoCommit(false);
            statenent = conn.createStatement();
            for (String sql : sqlList) {
                statenent.addBatch(sql);
            }
            result = statenent.executeBatch();
            conn.commit();
        } catch (SQLException e) {
            try {
                conn.rollback();
            } catch (SQLException e1) {
                // TODO Auto-generated catch block
                throw new ExceptionInInitializerError(e1);
            }
            throw new ExceptionInInitializerError(e);
        } finally {
            free(statenent, null);
        }
        return result;
    }
 
    @SuppressWarnings({ "unchecked", "rawtypes" })
    private static List ResultToListMap(ResultSet rs) throws SQLException {
        List list = new ArrayList();
        while (rs.next()) {
            ResultSetMetaData md = rs.getMetaData();
            Map map = new HashMap();
            for (int i = 1; i < md.getColumnCount(); i++) {
                map.put(md.getColumnLabel(i), rs.getObject(i));
            }
            list.add(map);
        }
        return list;
    }
 
    /**
     * 獲取PreparedStatement
     * 
     * @param sql
     * @throws SQLException
     */
    private static void getPreparedStatement(String sql) throws SQLException {
        conn = JdbcUnits.getConnection();
        preparedStatement = conn.prepareStatement(sql);
    }
 
    /**
     * 獲取CallableStatement
     * 
     * @param procedureSql
     * @throws SQLException
     */
    private static void getCallableStatement(String procedureSql)
            throws SQLException {
        conn = JdbcUnits.getConnection();
        callableStatement = conn.prepareCall(procedureSql);
    }
 
    /**
     * 釋放資源
     * 
     * @param rs
     *            結(jié)果集
     */
    public static void free(ResultSet rs) {
 
        JdbcUnits.free(conn, preparedStatement, rs);
    }
 
    /**
     * 釋放資源
     * 
     * @param statement
     * @param rs
     */
    public static void free(Statement statement, ResultSet rs) {
        JdbcUnits.free(conn, statement, rs);
    }
 
    /**
     * 釋放資源
     */
    public static void free() {
 
        free(null);
    }
 
}
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末购撼,一起剝皮案震驚了整個(gè)濱河市跪削,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌迂求,老刑警劉巖碾盐,帶你破解...
    沈念sama閱讀 218,941評(píng)論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異揩局,居然都是意外死亡毫玖,警方通過(guò)查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,397評(píng)論 3 395
  • 文/潘曉璐 我一進(jìn)店門(mén)凌盯,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)付枫,“玉大人急凰,你說(shuō)我怎么就攤上這事蟆盹。” “怎么了匿刮?”我有些...
    開(kāi)封第一講書(shū)人閱讀 165,345評(píng)論 0 356
  • 文/不壞的土叔 我叫張陵县忌,是天一觀的道長(zhǎng)掂榔。 經(jīng)常有香客問(wèn)我,道長(zhǎng)症杏,這世上最難降的妖魔是什么装获? 我笑而不...
    開(kāi)封第一講書(shū)人閱讀 58,851評(píng)論 1 295
  • 正文 為了忘掉前任,我火速辦了婚禮鸳慈,結(jié)果婚禮上饱溢,老公的妹妹穿的比我還像新娘喧伞。我一直安慰自己走芋,他們只是感情好绩郎,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,868評(píng)論 6 392
  • 文/花漫 我一把揭開(kāi)白布。 她就那樣靜靜地躺著翁逞,像睡著了一般肋杖。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上挖函,一...
    開(kāi)封第一講書(shū)人閱讀 51,688評(píng)論 1 305
  • 那天状植,我揣著相機(jī)與錄音,去河邊找鬼怨喘。 笑死津畸,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的必怜。 我是一名探鬼主播肉拓,決...
    沈念sama閱讀 40,414評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼梳庆!你這毒婦竟也來(lái)了暖途?” 一聲冷哼從身側(cè)響起,我...
    開(kāi)封第一講書(shū)人閱讀 39,319評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤膏执,失蹤者是張志新(化名)和其女友劉穎驻售,沒(méi)想到半個(gè)月后,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體更米,經(jīng)...
    沈念sama閱讀 45,775評(píng)論 1 315
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡欺栗,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,945評(píng)論 3 336
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了征峦。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片纸巷。...
    茶點(diǎn)故事閱讀 40,096評(píng)論 1 350
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖眶痰,靈堂內(nèi)的尸體忽然破棺而出瘤旨,到底是詐尸還是另有隱情,我是刑警寧澤竖伯,帶...
    沈念sama閱讀 35,789評(píng)論 5 346
  • 正文 年R本政府宣布存哲,位于F島的核電站,受9級(jí)特大地震影響七婴,放射性物質(zhì)發(fā)生泄漏祟偷。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,437評(píng)論 3 331
  • 文/蒙蒙 一打厘、第九天 我趴在偏房一處隱蔽的房頂上張望修肠。 院中可真熱鬧,春花似錦户盯、人聲如沸嵌施。這莊子的主人今日做“春日...
    開(kāi)封第一講書(shū)人閱讀 31,993評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)吗伤。三九已至吃靠,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間足淆,已是汗流浹背巢块。 一陣腳步聲響...
    開(kāi)封第一講書(shū)人閱讀 33,107評(píng)論 1 271
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留巧号,地道東北人族奢。 一個(gè)月前我還...
    沈念sama閱讀 48,308評(píng)論 3 372
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像丹鸿,于是被迫代替她去往敵國(guó)和親歹鱼。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,037評(píng)論 2 355

推薦閱讀更多精彩內(nèi)容