<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="cn.reghao.tnb.content.app.chat.db.mapper.CodeBlockMessageMapper">
    <insert id="save" useGeneratedKeys="true" keyProperty="id">
        insert into chat_code_block_message
        (`id`,`deleted`,`create_time`,`update_time`,`record_id`,`lang`,`code`)
        values 
        (#{id},#{deleted},#{createTime},#{updateTime},#{recordId},#{lang},#{code})
    </insert>

    <select id="findByRecordId" resultType="cn.reghao.tnb.content.app.chat.model.po.message.CodeBlockMessage">
        select * from chat_code_block_message where record_id=#{recordId}
    </select>
</mapper>
