| | |
| | | |
| | | |
| | | |
| | | <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 != province"> |
| | | and provinceCode = #{province} |
| | | </if> |
| | | <if test="null != city"> |
| | | and cityCode = #{city} |
| | | </if> |
| | | <if test="null != code"> |
| | | and areaCode = #{code} |
| | | </if> |
| | | ) |
| | | from t_phone where companyId in |
| | | <foreach collection="companyIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | |
| | | |
| | |
| | | and platform = #{platform} |
| | | </if> |
| | | <if test="platform != 1"> |
| | | and companyId in ( |
| | | select companyId from t_company_city where state = 1 |
| | | <if test="null != province"> |
| | | and provinceCode = #{province} |
| | | </if> |
| | | <if test="null != city"> |
| | | and cityCode = #{city} |
| | | </if> |
| | | <if test="null != code"> |
| | | and areaCode = #{code} |
| | | </if> |
| | | ) |
| | | and companyId = #{companyId} |
| | | </if> |
| | | </select> |
| | | |