<?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.unis.crk.cplbusiness.mapper.DataCrkywGysDefaultMapper">

        <!-- 通用查询映射结果 -->
        <resultMap id="BaseResultMap" type="com.unis.crk.cplbusiness.entity.DataCrkywGysDefault">
                    <id column="ID" property="id" />
                    <result column="station" property="station" />
                    <result column="create_user_id" property="createUserId" />
                    <result column="created_time" property="createdTime" />
                    <result column="modify_user_id" property="modifyUserId" />
                    <result column="modified_time" property="modifiedTime" />
                    <result column="supplier_number" property="supplierNumber" />
                    <result column="supplier_abbreviation" property="supplierAbbreviation" />
                    <result column="organization_code" property="organizationCode" />
                    <result column="social_credit_code" property="socialCreditCode" />
                    <result column="business_type" property="businessType" />
                    <result column="enterprise_nature" property="enterpriseNature" />
                    <result column="registration_type" property="registrationType" />
                    <result column="supplier_type" property="supplierType" />
                    <result column="supplier_location" property="supplierLocation" />
                    <result column="registration_number" property="registrationNumber" />
                    <result column="juridical_person" property="juridicalPerson" />
                    <result column="telephone" property="telephone" />
                    <result column="business_fax" property="businessFax" />
                    <result column="contact_email" property="contactEmail" />
                    <result column="website" property="website" />
                    <result column="business_zip_code" property="businessZipCode" />
                    <result column="enterprise_longitude" property="enterpriseLongitude" />
                    <result column="enterprise_latitude" property="enterpriseLatitude" />
                    <result column="administrative_code" property="administrativeCode" />
                    <result column="administrative_name" property="administrativeName" />
                    <result column="fixedssets" property="fixedssets" />
                    <result column="registered_capital" property="registeredCapital" />
                    <result column="assets" property="assets" />
                    <result column="company_number" property="companyNumber" />
                    <result column="employees_number" property="employeesNumber" />
                    <result column="create_org" property="createOrg" />
                    <result column="depositary_bank" property="depositaryBank" />
                    <result column="bank_credit" property="bankCredit" />
                    <result column="supplier_address" property="supplierAddress" />
                    <result column="bank_account" property="bankAccount" />
                    <result column="primary_ability" property="primaryAbility" />
                    <result column="main_brand" property="mainBrand" />
                    <result column="overall_ratings" property="overallRatings" />
                    <result column="quality_average" property="qualityAverage" />
                    <result column="performance_average" property="performanceAverage" />
                    <result column="linkman" property="linkman" />
                    <result column="linkman_telephone" property="linkmanTelephone" />
                    <result column="name" property="name" />
        </resultMap>

    <select id="selectMyMapsPage" resultType="java.util.Map">
        SELECT *   FROM  data_crkyw_gys_default
        <if test="ew.sqlSegment != null and ew.sqlSegment != ''">
            where  ${ew.sqlSegment}
        </if>
    </select>

    <select id="getGysList" resultType="java.util.Map">
         SELECT DISTINCT
            id as "gysId",
            name as "gysName",
            modified_time
        FROM
            data_crkyw_gys_default
        WHERE
            station = #{unitId}
        ORDER BY
            modified_time DESC
    </select>
</mapper>