| | |
| | | <where> |
| | | <if test="placePractitioner.id != null ">and jpp.id = #{placePractitioner.id}</if> |
| | | <if test="placePractitioner.placeId != null ">and jpp.place_id = #{placePractitioner.placeId}</if> |
| | | <if test="placePractitioner.name != null and placePractitioner.name != ''">and jpp.name = |
| | | #{placePractitioner.name} |
| | | <if test="placePractitioner.name != null and placePractitioner.name != ''">and jpp.name like concat('%', |
| | | #{placePractitioner.name},'%') |
| | | |
| | | </if> |
| | | <if test="placePractitioner.telephone != null and placePractitioner.telephone != ''">and jpp.telephone = |
| | | #{placePractitioner.telephone} |
| | | <if test="placePractitioner.telephone != null and placePractitioner.telephone != ''">and jpp.telephone like |
| | | concat('%', #{placePractitioner.telephone},'%') |
| | | |
| | | </if> |
| | | <if test="placePractitioner.tempAddress != null and placePractitioner.tempAddress != ''">and jpp.temp_address = |
| | | <if test="placePractitioner.tempAddress != null and placePractitioner.tempAddress != ''">and |
| | | jpp.temp_address = |
| | | #{placePractitioner.tempAddress} |
| | | </if> |
| | | <if test="placePractitioner.age != null ">and jpp.age = #{placePractitioner.age}</if> |
| | |
| | | <if test="placePractitioner.jobNature != null and placePractitioner.jobNature != ''">and jpp.job_nature = |
| | | #{placePractitioner.jobNature} |
| | | </if> |
| | | <if test="placePractitioner.employerImg != null and placePractitioner.employerImg != ''">and jpp.employer_img = |
| | | <if test="placePractitioner.employerImg != null and placePractitioner.employerImg != ''">and |
| | | jpp.employer_img = |
| | | #{placePractitioner.employerImg} |
| | | </if> |
| | | <if test="placePractitioner.wxAccount != null and placePractitioner.wxAccount != ''">and jpp.wx_account = |
| | |
| | | and jpp.ethnicity != 1 |
| | | </if> |
| | | <if test="placePractitioner.type == 3"> |
| | | and (CURDATE() < DATE_ADD( birthday, INTERVAL 18 YEAR ) or ( jpp.ethnicity != 1)) |
| | | and (CURDATE() < DATE_ADD( jpp.birthday, INTERVAL 18 YEAR ) or ( jpp.ethnicity != 1)) |
| | | and jc.category_no in (180202,180201) |
| | | </if> |
| | | and jpp.is_deleted = 0 |
| | |
| | | select |
| | | count(1) |
| | | from |
| | | jczz_place_practitioner |
| | | jczz_place_practitioner jpp |
| | | LEFT JOIN jczz_place jp ON jp.id = jpp.place_id |
| | | LEFT JOIN jczz_place_poi_label jppl on jppl.place_id = jp.id and type = 3 |
| | | LEFT JOIN jczz_category jc on jc.category_no = jppl.poi_code |
| | | <where> |
| | | <if test="type == 1"> |
| | | and CURDATE() < DATE_ADD( birthday, INTERVAL 18 YEAR ) |
| | | and (CURDATE() < DATE_ADD( jpp.birthday, INTERVAL 18 YEAR ) or ( jpp.ethnicity != 1)) |
| | | and jc.category_no in (180202,180201) |
| | | </if> |
| | | <if test="type == 2"> |
| | | and ethnicity != 1 |
| | | and jpp.ethnicity != 1 |
| | | </if> |
| | | and is_deleted = 0 |
| | | and jpp.is_deleted = 0 |
| | | </where> |
| | | </select> |
| | | |