<?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.usky.issue.mapper.SpProjectConfigMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.usky.issue.domain.SpProjectConfig">
        <id column="id" property="id" />
        <result column="project_name" property="projectName" />
        <result column="app_key" property="appKey" />
        <result column="company_code" property="companyCode" />
    </resultMap>
    <!--根据传入appKey查询company_code-->
    <select id="getCompanyCode" resultType="java.lang.String">
        select company_code
        from sp_project_config
        <where>
            <if test="appKey != null">
                and app_key = #{appKey}
            </if>
        </where>
    </select>

</mapper>
