Pu Zhibing
2025-03-28 8b09fbc19a96b57bf1d0e4d7c79b51a76aeca554
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/PhoneMapper.xml
@@ -13,23 +13,17 @@
    <select id="queryPhones" resultType="Phone">
    <select id="queryPhones" resultType="com.stylefeng.guns.modular.system.model.Phone">
        select
        id as id,
        type as type,
        platform as platform,
        phone as phone,
        companyId as companyId
        from t_phone where companyId in (
        select companyId from t_company_city where state = 1
        <if test="null != city">
            and cityId in (
            <foreach collection="city" item="item" index="index" separator="," open="(" close=")">
                #{item}
            </foreach>
            )
        </if>
        )
        from t_phone where companyId in
        <foreach collection="companyIds" item="item" index="index" separator="," open="(" close=")">
            #{item}
        </foreach>
    </select>
@@ -48,16 +42,7 @@
            and platform = #{platform}
        </if>
        <if test="platform != 1">
            and companyId in (
            select companyId from t_company_city where state = 1
            <if test="null != city">
                and cityId in (
                <foreach collection="city" item="item" index="index" separator="," open="(" close=")">
                    #{item}
                </foreach>
                )
            </if>
            )
            and companyId = #{companyId}
        </if>
    </select>