2019-05-19_Mybatis關(guān)于mysql批量插入學習

Mybatis關(guān)于mysql批量插入學習
1.概述
對mybatis常用的操作命令做一下總結(jié),數(shù)據(jù)庫基于mysql济瓢。后面章節(jié)會涉及數(shù)據(jù)的批量插入踱葛、批量更新和更新后返回主鍵ID等內(nèi)容披诗。
1.數(shù)據(jù)庫信息
1.1.表結(jié)構(gòu)定義
CREATE TABLE users (
id int(11) NOT NULL AUTO_INCREMENT,
NAME varchar(20) DEFAULT NULL,
age int(11) DEFAULT NULL,
remark varchar(200) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=682 DEFAULT CHARSET=utf8;

1.2.數(shù)據(jù)庫配置db.properties
mysql.driver=com.mysql.jdbc.Driver

需要開啟多行執(zhí)行功能

jdbc:mysql://localhost:3306/mybatis?userUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false"

jdbc:mysql://localhost:3306/mybatis?userUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC&allowMultiQueries=true"

mysql.url=jdbc:mysql://localhost:3306/mybatis?userUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
mysql.username=root
mysql.password=123456
1.3.實體類
package com.tech.ability.mybatis.Entity;

/**

  • Created by kikop on 2019/1/17.
    */
    public class MyUser {

    //實體類的屬性和表的字段名稱一一對應
    private int id;
    private String name;
    private int age;

    public String getRemark() {
    return remark;
    }

    public void setRemark(String remark) {
    this.remark = remark;
    }

    private String remark;

    public int getId() {
    return id;
    }

    public void setId(int id) {
    this.id = id;
    }

    public String getName() {
    return name;
    }

    public void setName(String name) {
    this.name = name;
    }

    public int getAge() {
    return age;
    }

    public void setAge(int age) {
    this.age = age;
    }

    @Override
    public String toString() {
    return "MyUser{" +
    "age=" + age +
    ", id=" + id +
    ", name='" + name + ''' +
    ", remark='" + remark + ''' +
    '}';
    }

}
2.mybatis mapper接口文件
package com.tech.ability.mybatis.Mapper;

import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.SelectKey;
import org.springframework.data.repository.query.Param;

/**



<mapper namespace="com.tech.ability.mybatis.Mapper.MyUserMapper">





<insert id="batchInsertUserInfoListByUnionAll" parameterType="com.alibaba.fastjson.JSONObject">
insert into users(name,age,remark)
<foreach collection="idList" index="index" item="currentRow" separator="union all">
( select '{currentRow.name}',#{currentRow.age},'{currentRow.remark}')
</foreach>
</insert>

<!--7.批量插入-->
<!--union all的方式-->
<!--oracle:useGeneratedKeys="false"-->
<!--主鍵在myaql自增漲-->
<insert id="batchInsertUserInfoListByExecutorBach" parameterType="com.alibaba.fastjson.JSONObject">
    insert into users(name,age,remark)
    values('${name}',#{age},'${remark}')
</insert>

</mapper>
4.mybatis工具類
package com.tech.ability.mybatis;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.io.InputStream;

/**

  • Created by kikop on 2019/5/19.
    */
    public class mybatisUtils {
    //mybatis核心配置文件
    private static final String mybatis_configPath = "mybatisconfig.xml";
/**
 * 讀取SqlSession
 *
 * @return
 */
public static SqlSession getSqlSession(ExecutorType execType, boolean isAutoCommit) {

    SqlSession sqlSession = null;
    try {
        //1.讀取mybatis的配置文件
        //String resource = "mybatisconfig.xml";

        //2.構(gòu)建sqlSession的工廠
        //使用類加載器加載 mybatis 的 classspath中配置文件
        InputStream inputStream = null;

// InputStream inputStream = mybatisTest.class.getClassLoader().getResourceAsStream(resource);
inputStream = Resources.getResourceAsStream(mybatis_configPath);
SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(inputStream);

        //2.構(gòu)建sqlSession的工廠
        //使用MyBatis提供的Resources類加載mybatis的配置文件(它也加載關(guān)聯(lián)的映射文件)
        //Reader reader = Resources.getResourceAsReader(resource);
        //SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);

        //3.創(chuàng)建能執(zhí)行映射文件中sql的sqlSession

// sqlSession = sessionFactory.openSession(isAutoCommit);
sqlSession = sessionFactory.openSession(execType, isAutoCommit);

    } catch (IOException e) {
        e.printStackTrace();
    }

    return sqlSession;

}

/**
 * 關(guān)閉session(回收連接池必須)
 *
 * @param session
 */
public static void closeSqlSession(SqlSession session) {
    session.close();
}

/**
 * 關(guān)閉inputStream
 *
 * @param inputStream
 */
public static void closeInputSream(InputStream inputStream) {
    try {
        inputStream.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

}
5.測試代碼
5.1.測試1

package com.tech.ability.mybatis;

import com.alibaba.fastjson.JSONObject;
import com.tech.ability.mybatis.Entity.MyUser;
import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.ArrayList;
import java.util.List;

/**

  • Created by kikop on 2019/1/17.
    */
    public class mybatisTest {

    private static final Logger logger = LogManager.getLogger(mybatisTest.class);

/**
 * 批量插入實現(xiàn)1
 */
public static void batchInsertUserInfoListByUnionAllTest() {

    //1.構(gòu)建sqlSession
    SqlSession session = mybatisUtils.getSqlSession(ExecutorType.SIMPLE, false);

    //2.映射sql的標識字符串
    StringBuffer statement = new StringBuffer();
    statement.append("com.tech.ability.mybatis.Mapper.MyUserMapper");  //mapper標簽的namespace屬性的值
    statement.append(".batchInsertUserInfoListByUnionAll");  //select標簽的id屬性值

    //3.定義查詢條件
    List<JSONObject> idList = new ArrayList<>();
    for (int i = 0; i < 100; i++) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("name", String.format("name_%d", i));
        jsonObject.put("age", i);
        jsonObject.put("remark", String.format("remark_%d", i));
        idList.add(jsonObject);
    }
    JSONObject requestJsonObject = new JSONObject();
    requestJsonObject.put("idList", idList);
    //4.執(zhí)行查詢返回一個唯一user對象的sql
    int updateResult = session.insert(statement.toString(), requestJsonObject);
    System.out.println("[insertUserXml]影響的行數(shù)updateResult:" + updateResult + "返回值respID:" + requestJsonObject.get("respID"));

    if (updateResult > 0) {
        session.commit();
    } else {
        session.rollback();
    }
    //5.資源釋放(連接池回收)
    mybatisUtils.closeSqlSession(session);

}

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/E:/workfolder/JavaWebSoft/maven/LocalMavenRep/org/apache/logging/log4j/log4j-slf4j-impl/2.1/log4j-slf4j-impl-2.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/E:/workfolder/JavaWebSoft/maven/LocalMavenRep/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
2019-05-19 17:06:11.931 DEBUG [main][LogFactory.java:124] - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
2019-05-19 17:06:11.945 DEBUG [main][PooledDataSource.java:304] - PooledDataSource forcefully closed/removed all connections.
2019-05-19 17:06:11.946 DEBUG [main][PooledDataSource.java:304] - PooledDataSource forcefully closed/removed all connections.
2019-05-19 17:06:11.946 DEBUG [main][PooledDataSource.java:304] - PooledDataSource forcefully closed/removed all connections.
2019-05-19 17:06:11.947 DEBUG [main][PooledDataSource.java:304] - PooledDataSource forcefully closed/removed all connections.
2019-05-19 17:06:12.132 DEBUG [main][JdbcTransaction.java:129] - Opening JDBC Connection
2019-05-19 17:06:12.591 DEBUG [main][PooledDataSource.java:378] - Created connection 898694235.
2019-05-19 17:06:12.591 DEBUG [main][JdbcTransaction.java:95] - Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@3590fc5b]
2019-05-19 17:06:12.595 DEBUG [main][BaseJdbcLogger.java:132] - ooo Using Connection [com.mysql.jdbc.JDBC4Connection@3590fc5b]
2019-05-19 17:06:12.600 DEBUG [main][BaseJdbcLogger.java:132] - ==> Preparing: insert into users(name,age,remark) ( select 'name_0',?,'remark_0') union all ( select 'name_1',?,'remark_1') union all ( select 'name_2',?,'remark_2') union all ( select 'name_3',?,'remark_3') union all ( select 'name_4',?,'remark_4') union all ( select 'name_5',?,'remark_5') union all ( select 'name_6',?,'remark_6') union all ( select 'name_7',?,'remark_7') union all ( select 'name_8',?,'remark_8') union all ( select 'name_9',?,'remark_9') union all ( select 'name_10',?,'remark_10') union all ( select 'name_11',?,'remark_11') union all ( select 'name_12',?,'remark_12') union all ( select 'name_13',?,'remark_13') union all ( select 'name_14',?,'remark_14') union all ( select 'name_15',?,'remark_15') union all ( select 'name_16',?,'remark_16') union all ( select 'name_17',?,'remark_17') union all ( select 'name_18',?,'remark_18') union all ( select 'name_19',?,'remark_19') union all ( select 'name_20',?,'remark_20') union all ( select 'name_21',?,'remark_21') union all ( select 'name_22',?,'remark_22') union all ( select 'name_23',?,'remark_23') union all ( select 'name_24',?,'remark_24') union all ( select 'name_25',?,'remark_25') union all ( select 'name_26',?,'remark_26') union all ( select 'name_27',?,'remark_27') union all ( select 'name_28',?,'remark_28') union all ( select 'name_29',?,'remark_29') union all ( select 'name_30',?,'remark_30') union all ( select 'name_31',?,'remark_31') union all ( select 'name_32',?,'remark_32') union all ( select 'name_33',?,'remark_33') union all ( select 'name_34',?,'remark_34') union all ( select 'name_35',?,'remark_35') union all ( select 'name_36',?,'remark_36') union all ( select 'name_37',?,'remark_37') union all ( select 'name_38',?,'remark_38') union all ( select 'name_39',?,'remark_39') union all ( select 'name_40',?,'remark_40') union all ( select 'name_41',?,'remark_41') union all ( select 'name_42',?,'remark_42') union all ( select 'name_43',?,'remark_43') union all ( select 'name_44',?,'remark_44') union all ( select 'name_45',?,'remark_45') union all ( select 'name_46',?,'remark_46') union all ( select 'name_47',?,'remark_47') union all ( select 'name_48',?,'remark_48') union all ( select 'name_49',?,'remark_49') union all ( select 'name_50',?,'remark_50') union all ( select 'name_51',?,'remark_51') union all ( select 'name_52',?,'remark_52') union all ( select 'name_53',?,'remark_53') union all ( select 'name_54',?,'remark_54') union all ( select 'name_55',?,'remark_55') union all ( select 'name_56',?,'remark_56') union all ( select 'name_57',?,'remark_57') union all ( select 'name_58',?,'remark_58') union all ( select 'name_59',?,'remark_59') union all ( select 'name_60',?,'remark_60') union all ( select 'name_61',?,'remark_61') union all ( select 'name_62',?,'remark_62') union all ( select 'name_63',?,'remark_63') union all ( select 'name_64',?,'remark_64') union all ( select 'name_65',?,'remark_65') union all ( select 'name_66',?,'remark_66') union all ( select 'name_67',?,'remark_67') union all ( select 'name_68',?,'remark_68') union all ( select 'name_69',?,'remark_69') union all ( select 'name_70',?,'remark_70') union all ( select 'name_71',?,'remark_71') union all ( select 'name_72',?,'remark_72') union all ( select 'name_73',?,'remark_73') union all ( select 'name_74',?,'remark_74') union all ( select 'name_75',?,'remark_75') union all ( select 'name_76',?,'remark_76') union all ( select 'name_77',?,'remark_77') union all ( select 'name_78',?,'remark_78') union all ( select 'name_79',?,'remark_79') union all ( select 'name_80',?,'remark_80') union all ( select 'name_81',?,'remark_81') union all ( select 'name_82',?,'remark_82') union all ( select 'name_83',?,'remark_83') union all ( select 'name_84',?,'remark_84') union all ( select 'name_85',?,'remark_85') union all ( select 'name_86',?,'remark_86') union all ( select 'name_87',?,'remark_87') union all ( select 'name_88',?,'remark_88') union all ( select 'name_89',?,'remark_89') union all ( select 'name_90',?,'remark_90') union all ( select 'name_91',?,'remark_91') union all ( select 'name_92',?,'remark_92') union all ( select 'name_93',?,'remark_93') union all ( select 'name_94',?,'remark_94') union all ( select 'name_95',?,'remark_95') union all ( select 'name_96',?,'remark_96') union all ( select 'name_97',?,'remark_97') union all ( select 'name_98',?,'remark_98') union all ( select 'name_99',?,'remark_99')
2019-05-19 17:06:12.661 DEBUG [main][BaseJdbcLogger.java:132] - ==> Parameters: 0(Integer), 1(Integer), 2(Integer), 3(Integer), 4(Integer), 5(Integer), 6(Integer), 7(Integer), 8(Integer), 9(Integer), 10(Integer), 11(Integer), 12(Integer), 13(Integer), 14(Integer), 15(Integer), 16(Integer), 17(Integer), 18(Integer), 19(Integer), 20(Integer), 21(Integer), 22(Integer), 23(Integer), 24(Integer), 25(Integer), 26(Integer), 27(Integer), 28(Integer), 29(Integer), 30(Integer), 31(Integer), 32(Integer), 33(Integer), 34(Integer), 35(Integer), 36(Integer), 37(Integer), 38(Integer), 39(Integer), 40(Integer), 41(Integer), 42(Integer), 43(Integer), 44(Integer), 45(Integer), 46(Integer), 47(Integer), 48(Integer), 49(Integer), 50(Integer), 51(Integer), 52(Integer), 53(Integer), 54(Integer), 55(Integer), 56(Integer), 57(Integer), 58(Integer), 59(Integer), 60(Integer), 61(Integer), 62(Integer), 63(Integer), 64(Integer), 65(Integer), 66(Integer), 67(Integer), 68(Integer), 69(Integer), 70(Integer), 71(Integer), 72(Integer), 73(Integer), 74(Integer), 75(Integer), 76(Integer), 77(Integer), 78(Integer), 79(Integer), 80(Integer), 81(Integer), 82(Integer), 83(Integer), 84(Integer), 85(Integer), 86(Integer), 87(Integer), 88(Integer), 89(Integer), 90(Integer), 91(Integer), 92(Integer), 93(Integer), 94(Integer), 95(Integer), 96(Integer), 97(Integer), 98(Integer), 99(Integer)
2019-05-19 17:06:12.665 DEBUG [main][BaseJdbcLogger.java:132] - <== Updates: 100
2019-05-19 17:06:12.666 DEBUG [main][JdbcTransaction.java:66] - Committing JDBC Connection [com.mysql.jdbc.JDBC4Connection@3590fc5b]
2019-05-19 17:06:12.668 DEBUG [main][JdbcTransaction.java:117] - Resetting autocommit to true on JDBC Connection [com.mysql.jdbc.JDBC4Connection@3590fc5b]
2019-05-19 17:06:12.669 DEBUG [main][JdbcTransaction.java:85] - Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@3590fc5b]
2019-05-19 17:06:12.670 DEBUG [main][PooledDataSource.java:332] - Returned connection 898694235 to pool.

5.2.測試2

/**
* 批量插入實現(xiàn)2
* Batch返回值:固定
*/
public static void batchInsertUserInfoListByExecutorBachTest2() {

    //1.構(gòu)建sqlSession
    SqlSession session = mybatisUtils.getSqlSession(ExecutorType.BATCH, false);

    //2.映射sql的標識字符串
    StringBuffer statement = new StringBuffer();
    statement.append("com.tech.ability.mybatis.Mapper.MyUserMapper");  //mapper標簽的namespace屬性的值
    statement.append(".batchInsertUserInfoListByExecutorBach");  //select標簽的id屬性值

    try {
        //3.定義查詢條件
        for (int i = 0; i < 100; i++) {
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("name", String.format("name_%d", i));
            jsonObject.put("age", i);
            jsonObject.put("remark", String.format("remark_%d", i));

// handler.parameterize(stmt);
// handler.batch(stmt);
// return -2147482646;

            //4.執(zhí)行查詢返回一個唯一user對象的sql
            int updateResult = session.insert(statement.toString(), jsonObject);
            System.out.println("[insertUserXml]影響的行數(shù)updateResult:" + updateResult + "返回值respID:" + jsonObject.get("respID"));

        }
        session.commit();
    } catch (Exception ex) {
        ex.printStackTrace();
        session.rollback();
    } finally {
        //5.資源釋放(連接池回收)
        mybatisUtils.closeSqlSession(session);
    }

}
6.調(diào)用
public static void main(String[] args) throws Exception {
//getUserInfoByIDTest();
//getUserInfoByInTest();
//getUserInfoByInnerForeachTest();
//batchUpdateUserInfoListManualTest();
//batchUpdateUserInfoListAutoTest();
//batchInsertUserInfoListByUnionAllTest();
//batchInsertUserInfoListByExecutorBachTest2();
//insertUserXmlTest();
batchInsertUserInfoListByUnionAllTest();
}
}

2019-05-19 22:31:24.436 DEBUG [main][LogFactory.java:124] - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
2019-05-19 22:31:24.449 DEBUG [main][PooledDataSource.java:304] - PooledDataSource forcefully closed/removed all connections.
2019-05-19 22:31:24.450 DEBUG [main][PooledDataSource.java:304] - PooledDataSource forcefully closed/removed all connections.
2019-05-19 22:31:24.450 DEBUG [main][PooledDataSource.java:304] - PooledDataSource forcefully closed/removed all connections.
2019-05-19 22:31:24.451 DEBUG [main][PooledDataSource.java:304] - PooledDataSource forcefully closed/removed all connections.
2019-05-19 22:31:24.576 DEBUG [main][JdbcTransaction.java:129] - Opening JDBC Connection
2019-05-19 22:31:24.915 DEBUG [main][PooledDataSource.java:378] - Created connection 1786294176.
2019-05-19 22:31:24.918 DEBUG [main][JdbcTransaction.java:95] - Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@6a78afa0]
2019-05-19 22:31:24.921 DEBUG [main][BaseJdbcLogger.java:132] - ooo Using Connection [com.mysql.jdbc.JDBC4Connection@6a78afa0]
2019-05-19 22:31:24.923 DEBUG [main][BaseJdbcLogger.java:132] - ==> Preparing: insert into users(name,age,remark) values('name_0',?,'remark_0')
2019-05-19 22:31:24.985 DEBUG [main][BaseJdbcLogger.java:132] - ==> Parameters: 0(Integer)
[batchInsertUserInfoListByExecutorBach]影響的行數(shù)updateResult:-2147482646返回值respID:null
2019-05-19 22:31:24.986 DEBUG [main][BaseJdbcLogger.java:132] - ooo Using Connection [com.mysql.jdbc.JDBC4Connection@6a78afa0]
2019-05-19 22:31:24.987 DEBUG [main][BaseJdbcLogger.java:132] - ==> Preparing: insert into users(name,age,remark) values('name_1',?,'remark_1')
2019-05-19 22:31:24.988 DEBUG [main][BaseJdbcLogger.java:132] - ==> Parameters: 1(Integer)
[batchInsertUserInfoListByExecutorBach]影響的行數(shù)updateResult:-2147482646返回值respID:null
2019-05-19 22:31:24.988 DEBUG [main][BaseJdbcLogger.java:132] - ooo Using Connection [com.mysql.jdbc.JDBC4Connection@6a78afa0]
2019-05-19 22:31:24.989 DEBUG [main][BaseJdbcLogger.java:132] - ==> Preparing: insert into users(name,age,remark) values('name_2',?,'remark_2')
2019-05-19 22:31:24.991 DEBUG [main][BaseJdbcLogger.java:132] - ==> Parameters: 2(Integer)
[batchInsertUserInfoListByExecutorBach]影響的行數(shù)updateResult:-2147482646返回值respID:null
2019-05-19 22:31:24.991 DEBUG [main][BaseJdbcLogger.java:132] - ooo Using Connection [com.mysql.jdbc.JDBC4Connection@6a78afa0]
2019-05-19 22:31:24.992 DEBUG [main][BaseJdbcLogger.java:132] - ==> Preparing: insert into users(name,age,remark) values('name_3',?,'remark_3')
2019-05-19 22:31:24.992 DEBUG [main][BaseJdbcLogger.java:132] - ==> Parameters: 3(Integer)
[batchInsertUserInfoListByExecutorBach]影響的行數(shù)updateResult:-2147482646返回值respID:null
2019-05-19 22:31:24.993 DEBUG [main][BaseJdbcLogger.java:132] - ooo Using Connection [com.mysql.jdbc.JDBC4Connection@6a78afa0]
2019-05-19 22:31:24.993 DEBUG [main][BaseJdbcLogger.java:132] - ==> Preparing: insert into users(name,age,remark) values('name_4',?,'remark_4')
2019-05-19 22:31:24.995 DEBUG [main][BaseJdbcLogger.java:132] - ==> Parameters: 4(Integer)
[batchInsertUserInfoListByExecutorBach]影響的行數(shù)updateResult:-2147482646返回值respID:null
2019-05-19 22:31:24.997 DEBUG [main][JdbcTransaction.java:66] - Committing JDBC Connection [com.mysql.jdbc.JDBC4Connection@6a78afa0]
2019-05-19 22:31:25.002 DEBUG [main][JdbcTransaction.java:117] - Resetting autocommit to true on JDBC Connection [com.mysql.jdbc.JDBC4Connection@6a78afa0]
2019-05-19 22:31:25.003 DEBUG [main][JdbcTransaction.java:85] - Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@6a78afa0]
2019-05-19 22:31:25.003 DEBUG [main][PooledDataSource.java:332] - Returned connection 1786294176 to pool.
總結(jié)
1.數(shù)據(jù)庫連接時,設置運行多行查詢乳怎。
2.多條語句,用“毯焕;”隔開即可赂蠢。
3.batchInsertUserInfoListByUnionAll 一次性事務提交,數(shù)據(jù)庫執(zhí)行的sql長度有限制。
4.batchInsertUserInfoListByExecutorBach均是一次性提交砰蠢。

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末蓖扑,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子台舱,更是在濱河造成了極大的恐慌律杠,老刑警劉巖,帶你破解...
    沈念sama閱讀 212,454評論 6 493
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件竞惋,死亡現(xiàn)場離奇詭異柜去,居然都是意外死亡,警方通過查閱死者的電腦和手機拆宛,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,553評論 3 385
  • 文/潘曉璐 我一進店門诡蜓,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人胰挑,你說我怎么就攤上這事〈患纾” “怎么了瞻颂?”我有些...
    開封第一講書人閱讀 157,921評論 0 348
  • 文/不壞的土叔 我叫張陵,是天一觀的道長郑象。 經(jīng)常有香客問我贡这,道長,這世上最難降的妖魔是什么厂榛? 我笑而不...
    開封第一講書人閱讀 56,648評論 1 284
  • 正文 為了忘掉前任盖矫,我火速辦了婚禮,結(jié)果婚禮上击奶,老公的妹妹穿的比我還像新娘辈双。我一直安慰自己,他們只是感情好柜砾,可當我...
    茶點故事閱讀 65,770評論 6 386
  • 文/花漫 我一把揭開白布湃望。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪证芭。 梳的紋絲不亂的頭發(fā)上瞳浦,一...
    開封第一講書人閱讀 49,950評論 1 291
  • 那天,我揣著相機與錄音废士,去河邊找鬼叫潦。 笑死,一個胖子當著我的面吹牛官硝,可吹牛的內(nèi)容都是我干的矗蕊。 我是一名探鬼主播,決...
    沈念sama閱讀 39,090評論 3 410
  • 文/蒼蘭香墨 我猛地睜開眼泛源,長吁一口氣:“原來是場噩夢啊……” “哼拔妥!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起达箍,我...
    開封第一講書人閱讀 37,817評論 0 268
  • 序言:老撾萬榮一對情侶失蹤没龙,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后缎玫,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體硬纤,經(jīng)...
    沈念sama閱讀 44,275評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,592評論 2 327
  • 正文 我和宋清朗相戀三年赃磨,在試婚紗的時候發(fā)現(xiàn)自己被綠了筝家。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 38,724評論 1 341
  • 序言:一個原本活蹦亂跳的男人離奇死亡邻辉,死狀恐怖溪王,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情值骇,我是刑警寧澤莹菱,帶...
    沈念sama閱讀 34,409評論 4 333
  • 正文 年R本政府宣布,位于F島的核電站吱瘩,受9級特大地震影響道伟,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜使碾,卻給世界環(huán)境...
    茶點故事閱讀 40,052評論 3 316
  • 文/蒙蒙 一蜜徽、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧票摇,春花似錦拘鞋、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,815評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽怜械。三九已至,卻和暖如春傅事,著一層夾襖步出監(jiān)牢的瞬間缕允,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 32,043評論 1 266
  • 我被黑心中介騙來泰國打工蹭越, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留障本,地道東北人。 一個月前我還...
    沈念sama閱讀 46,503評論 2 361
  • 正文 我出身青樓响鹃,卻偏偏與公主長得像驾霜,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子买置,可洞房花燭夜當晚...
    茶點故事閱讀 43,627評論 2 350

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