<?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.yeejoin.amos.boot.module.tzs.api.mapper.UseUnitMapper">


    <select id="selectExportData" resultType="com.yeejoin.amos.boot.module.tzs.api.dto.UseUnitDto">
        select
        u.social_credit_code as socialCreditCode,
        u.use_unit_name as useUnitName,
        u.real_estate_brand as realEstateBrand,
        u.property_company_brand as propertyCompanyBrand,
        u.province as province,
        u.city as city,
        u.district as district,
        u.region_code as regionCode,
        u.address as address,
        u.principal as principal,
        u.longitude as longitude,
        u.latitude as latitude,
        u.principal_phone as principalPhone,
        u.management as management,
        u.manager as manager,
        u.manager_phone as managerPhone
        from tcb_use_unit u where u.is_delete = 0
        <if test="ids != null and ids.size() > 0">
            and u.sequence_nbr in
            <foreach item="item" collection="ids" separator="," open="(" close=")" index="">  #{item}
            </foreach>

        </if>
    </select>

</mapper>
