<?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.casic.missiles.modular.system.dao.ConfigNbCuccMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.casic.missiles.modular.system.model.ConfigNbCucc">
        <id column="ID" property="id"/>
        <result column="DEPTID" property="deptid"/>
        <result column="BASE_URL" property="baseUrl"/>
        <result column="APPID" property="appid"/>
        <result column="APPKEY" property="appkey"/>
        <result column="SUBSCRIBE_URL" property="subscribeUrl"/>
        <result column="APPNAME" property="appname"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        ID AS id, DEPTID AS deptid, BASE_URL AS "baseUrl", APPID AS appid, APPKEY AS appkey,
         SUBSCRIBE_URL AS "subscribeUrl", APPNAME AS appname
    </sql>

    <select id="getConfigByDept" resultType="com.casic.missiles.modular.system.model.ConfigNbCucc">
        SELECT
        <include refid="Base_Column_List"/>
        FROM config_nb_cucc c where c.DEPTID = #{deptid}
    </select>

</mapper>
