| | |
| | | cf.tel as tel, |
| | | cf.email as email, |
| | | cf.url as url, |
| | | cf.ip_start as ipStart, |
| | | cf.ip_end as ipEnd, |
| | | concat(cf.ip_start, "~", cf.ip_end) AS ipRange, |
| | | cf.memo as memo, |
| | | cf.isp_id as ispId, |
| | | cf.hosting_id as hostingId, |
| | |
| | | <if test="id != '' and id != null"> |
| | | AND cf.id like CONCAT('%',#{id},'%') |
| | | </if> |
| | | <if test="url != '' and id != url"> |
| | | AND cf.url like CONCAT('%',#{url},'%') |
| | | <choose> |
| | | <when test="url != null and url.size != 0"> |
| | | AND |
| | | <foreach collection="url" item="item" index="index" separator="or" open="(" close=")"> |
| | | cf.url LIKE CONCAT('%',#{item},'%') |
| | | </foreach> |
| | | </when> |
| | | </choose> |
| | | <if test="ip != '' and ip != null"> |
| | | AND INET_ATON(cf.ip_start) <![CDATA[ <= ]]> #{ip} AND INET_ATON(cf.ip_end) >= #{ip} |
| | | </if> |
| | | ORDER BY cf.register_date DESC |
| | | <if test="pageSize != '' and pageSize != null"> |
| | |
| | | AND cf.id like CONCAT('%',#{id},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="findByUrls" 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="url != null and url.size != 0"> |
| | | AND |
| | | <foreach collection="url" item="item" index="index" separator="or" open="(" close=")"> |
| | | cf.url LIKE CONCAT('%',#{item},'%') |
| | | </foreach> |
| | | </when> |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="findByUrlsAndIdNot" 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="url != null and url.size != 0"> |
| | | AND |
| | | <foreach collection="url" item="item" index="index" separator="or" open="(" close=")"> |
| | | cf.url LIKE CONCAT('%',#{item},'%') |
| | | </foreach> |
| | | </when> |
| | | </choose> |
| | | <if test="id != '' and id != null"> |
| | | AND cf.id not like CONCAT('%',#{id},'%') |
| | | </if> |
| | | </select> |
| | | </mapper> |