Pu Zhibing
2025-03-28 8b09fbc19a96b57bf1d0e4d7c79b51a76aeca554
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/CompanyMapper.xml
@@ -107,16 +107,13 @@
        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)
        </if>
        )
        ) order by `type` desc limit 0, 1
    </select>
@@ -184,4 +181,70 @@
            and type = #{type}
        </if>
    </select>
    <select id="queryList1" 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 != collect">
            and cityId in
            <foreach collection="collect" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        )
        <if test="null != type">
            and type = #{type}
        </if>
    </select>
</mapper>