puzhibing
2023-02-11 ea719b0443b8ccbc6d17349796936664ff3261d0
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>