<?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="com.yfd.platform.modules.config.mapper.SystemConfigMapper">
    <resultMap id="BaseResultMap" type="com.yfd.platform.modules.config.model.entity.SystemConfig">
        <!--@mbg.generated-->
        <!--@Table fi_system_config-->
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="name" jdbcType="VARCHAR" property="name"/>
        <result column="value" jdbcType="VARCHAR" property="value"/>
        <result column="title" jdbcType="VARCHAR" property="title"/>
    </resultMap>
    <sql id="Base_Column_List">
        <!--@mbg.generated-->
        id, `name`, `value`, title
    </sql>

    <select id="findAll" resultMap="BaseResultMap">
        select <include refid="Base_Column_List"/> from fi_system_config
    </select>

<!--auto generated by MybatisCodeHelper on 2021-07-15-->
    <select id="findByName" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from fi_system_config
        where `name`=#{name,jdbcType=VARCHAR}
    </select>

<!--auto generated by MybatisCodeHelper on 2021-07-15-->
    <insert id="saveAll" useGeneratedKeys="true" keyProperty="id">
        INSERT INTO fi_system_config(
        name,
        value,
        title
        )VALUES
        <foreach collection="list" item="element" index="index" separator=",">
            (
            #{element.name,jdbcType=VARCHAR},
            #{element.value,jdbcType=VARCHAR},
            #{element.title,jdbcType=VARCHAR}
            )
        </foreach>
    </insert>
</mapper>
