<?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.lutao.cloud.admin.mapper.SysCompanyMapper">

  <resultMap id="sysCompanyMap" type="com.lutao.cloud.admin.api.entity.SysCompany">
                        <id property="id" column="id"/>
                        <result property="companyName" column="company_name"/>
                        <result property="companyIntro" column="company_intro"/>
                        <result property="companyCode" column="company_code"/>
                        <result property="areaCode" column="area_code"/>
                        <result property="establishmentTime" column="establishment_time"/>
                        <result property="companyType" column="company_type"/>
                        <result property="legalPerson" column="legal_person"/>
                        <result property="director" column="director"/>
                        <result property="directorPhone" column="director_phone"/>
                        <result property="safeDirector" column="safe_director"/>
                        <result property="safeDirectorPhone" column="safe_director_phone"/>
                        <result property="economicType" column="economic_type"/>
                        <result property="companyScale" column="company_scale"/>
                        <result property="staffCount" column="staff_count"/>
                        <result property="domainId" column="domain_id"/>
                        <result property="scaleId" column="scale_id"/>
                        <result property="industryId" column="industry_id"/>
                        <result property="reviewStatus" column="review_status"/>
                        <result property="reviewTime" column="review_time"/>
                        <result property="reviewBy" column="review_by"/>
                        <result property="reviewUser" column="review_user"/>
                        <result property="thirdAuthId" column="third_auth_id"/>
                        <result property="adminId" column="admin_id"/>
                        <result property="adminUser" column="admin_user"/>
            </resultMap>

    <sql id="companySql">
        com.id,
            com.company_name,
            com.company_intro,
            com.company_code,
            com.area_code,
            com.establishment_time,
            com.legal_person,
            com.director,
            com.director_phone,
            com.safe_director,
            com.safe_director_phone,
            com.economic_type,
            com.company_scale,
            com.staff_count,
            com.domain_id,
            com.scale_id,
            com.industry_id,
            com.address
    </sql>
    <select id="getSysCompanyById" resultMap="sysCompanyMap">
        select
        <include refid="companySql"></include>
        from sys_company com where com.id = #{companyId}
    </select>
</mapper>
