puzhibing
2024-02-07 387f61d55a8e20bc772b026cba4f8c34dfce5665
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/CompanyMapper.xml
@@ -107,15 +107,78 @@
        insertTime as insertTime
        from t_company where flag != 3 and state = 0 and id in (
        select companyId from t_company_city where state = 1
        <if test="null != province and null != city and null != code">
            and provinceCode = #{province} and cityCode = #{city} and areaCode = #{code}
        <if test="null != cityIds">
            and cityId in
            <foreach collection="cityIds" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test="null != province and null != city and null == code">
            and provinceCode = #{province} and cityCode = #{city} and (areaCode = '' or areaCode is null)
        </if>
        <if test="null != province and null == city and null == code">
            and provinceCode = #{province} and (cityCode = '' or cityCode is null) and (areaCode = '' or areaCode is null)
        ) order by `type` desc limit 0, 1
    </select>
    <select id="queryList" resultType="Company">
        select
        id as id,
        isSpe as isSpe,
        isTaxi as isTaxi,
        isCross as isCross,
        isCrossLogistics as isCrossLogistics,
        isSameLogistics as isSameLogistics,
        isCharter as isCharter,
        isSpeFixedOrProportional as isSpeFixedOrProportional,
        isTaxiFixedOrProportional as isTaxiFixedOrProportional,
        isCrossLogisticsFixedOrProportional as isCrossLogisticsFixedOrProportional,
        isSameLogisticsFixedOrProportional as isSameLogisticsFixedOrProportional,
        speMoney as speMoney,
        taxiMoney as taxiMoney,
        crossLogisticsMoney as crossLogisticsMoney,
        sameLogisticsMoney as sameLogisticsMoney,
        isNeedFerry as isNeedFerry,
        name as name,
        type as type,
        superiorId as superiorId,
        principalName as principalName,
        principalPhone as principalPhone,
        adminName as adminName,
        adminPhone as adminPhone,
        urgentPhoen as urgentPhoen,
        setupTime as setupTime,
        identifier as identifier,
        addressCode as addressCode,
        businessScope as businessScope,
        contactAddress as contactAddress,
        documentAddress as documentAddress,
        economicType as economicType,
        regCapital as regCapital,
        legalName as legalName,
        legalId as legalId,
        legalPhone as legalPhone,
        legalPhotoUrl as legalPhotoUrl,
        licensingAgency as licensingAgency,
        licenseTime as licenseTime,
        licenseStartTime as licenseStartTime,
        licenseEndTime as licenseEndTime,
        licenseNumber as licenseNumber,
        carNum as carNum,
        driverNum as driverNum,
        mac as mac,
        state as state,
        flag as flag,
        upload as upload,
        insertTime as insertTime
        from t_company where flag != 3 and state = 0 and id in (
        select companyId from t_company_city where state = 1
        <if test="null != city">
            and cityId in (select id from t_city where englishName in
            <foreach collection="city" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
            )
        </if>
        )
        <if test="null != type">
            and type = #{type}
        </if>
    </select>
</mapper>