<?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.dora.mapper.SystemConfigMapper">

    <select id="findAll" resultType="com.dora.entity.SystemConfig">
        SELECT * FROM system_config ORDER BY id ASC
    </select>

    <select id="findByKey" parameterType="string" resultType="com.dora.entity.SystemConfig">
        SELECT * FROM system_config WHERE config_key = #{configKey}
    </select>

    <update id="update" parameterType="com.dora.entity.SystemConfig">
        UPDATE system_config
        SET config_value = #{configValue}, description = #{description}
        WHERE config_key = #{configKey}
    </update>

</mapper>
