<?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.qiaoba.module.system.mapper.SysConfigMapper">
    <select id="checkKeyIsExist" resultType="string">
        select config_key from sys_config
        where config_key = #{configKey}
        <if test="configId !=null">
            and config_id != #{configId}
        </if>
    </select>

    <select id="selectByIds" resultType="com.qiaoba.api.system.entity.SysConfig">
        select config_id, config_name, config_key, config_value, config_type, create_user, create_time, update_user,
        update_time, remark
        from sys_config where config_id in
        <foreach item="configId" collection="list" open="(" separator="," close=")">
            #{configId}
        </foreach>
    </select>
</mapper>
