<?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.SettingMapper">
    <insert id="save" useGeneratedKeys="true" keyProperty="id">
        insert into chat_setting
        (`id`,`deleted`,`create_time`,`update_time`,`user_id`,`keyboard_event_notify`,`notify_cue_tone`,`theme_bag_img`,`theme_color`,`theme_mode`)
        values 
        (#{id},#{deleted},#{createTime},#{updateTime},#{userId},#{keyboardEventNotify},#{notifyCueTone},#{themeBagImg},#{themeColor},#{themeMode})
    </insert>

    <select id="findByUserId" resultType="cn.reghao.tnb.content.app.chat.model.po.Setting">
        select * from chat_setting where user_id=#{userId}
    </select>
</mapper>
