| | |
| | | AND cf.id not like CONCAT('%',#{id},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="findByIps" resultType="kr.wisestone.owl.domain.CompanyField" parameterType="kr.wisestone.owl.web.condition.CompanyFieldCondition"> |
| | | SELECT |
| | | cf.id as id, |
| | | cf.name as name, |
| | | cf.email as email, |
| | | cf.url as url |
| | | FROM |
| | | company_field cf |
| | | WHERE 1=1 |
| | | <choose> |
| | | <when test="ipStart != null and ipStart != '' and ipEnd != null and ipEnd != ''"> |
| | | AND INET_ATON(cf.ip_start) BETWEEN #{ipStart} AND #{ipEnd} OR INET_ATON(cf.ip_end) BETWEEN #{ipStart} AND #{ipEnd} |
| | | </when> |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="findByIpsAndIdNot" resultType="kr.wisestone.owl.domain.CompanyField" parameterType="kr.wisestone.owl.web.condition.CompanyFieldCondition"> |
| | | SELECT |
| | | cf.id as id, |
| | | cf.name as name, |
| | | cf.email as email, |
| | | cf.url as url |
| | | FROM |
| | | company_field cf |
| | | WHERE 1=1 |
| | | <choose> |
| | | <when test="ipStart != null and ipStart != '' and ipEnd != null and ipEnd != ''"> |
| | | AND (INET_ATON(cf.ip_start) BETWEEN #{ipStart} AND #{ipEnd} OR INET_ATON(cf.ip_end) BETWEEN #{ipStart} AND #{ipEnd}) |
| | | </when> |
| | | </choose> |
| | | <if test="id != '' and id != null"> |
| | | AND cf.id not like CONCAT('%',#{id},'%') |
| | | </if> |
| | | </select> |
| | | </mapper> |