| | |
| | | <!--自定义分页查询--> |
| | | <select id="selectPlacePractitionerPage" resultType="org.springblade.modules.place.vo.PlacePractitionerVO"> |
| | | SELECT |
| | | * |
| | | jpp.id, |
| | | jpp.place_id, |
| | | jpp.name, |
| | | jpp.telephone, |
| | | jpp.temp_address, |
| | | (YEAR(CURDATE()) - YEAR(jpp.birthday))age, |
| | | jpp.gender, |
| | | jpp.id_card, |
| | | jpp.card_type, |
| | | jp.place_name employer, |
| | | jpp.registered_address, |
| | | jpp.job_nature, |
| | | jpp.employer_img, |
| | | jpp.wx_account, |
| | | jpp.create_time, |
| | | jpp.birthday, |
| | | jpp.ethnicity, |
| | | jpp.is_deleted, |
| | | jpp.criminal_record_flag, |
| | | jpp.fake_id_card, |
| | | jc.category_name |
| | | FROM |
| | | jczz_place_practitioner jpp |
| | | LEFT JOIN jczz_place jp ON jp.id = jpp.place_id |
| | |
| | | |
| | | <if test="placePractitioner.type == 1"> |
| | | and (YEAR(CURDATE()) - YEAR(jpp.birthday)) < 18 |
| | | and jc.category_no in (180202,180201) |
| | | </if> |
| | | <if test="placePractitioner.type == 2"> |
| | | and jpp.ethnicity != 1 |
| | | and jc.category_no in (180202,180201) |
| | | </if> |
| | | <if test="placePractitioner.type == 3"> |
| | | 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 |
| | | order by jpp.id desc |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | </if> |
| | | <if test="type == 2"> |
| | | and jpp.ethnicity != 1 |
| | | and jc.category_no in (180202,180201) |
| | | </if> |
| | | and jpp.is_deleted = 0 |
| | | </where> |
| | |
| | | package org.springblade.modules.place.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import liquibase.pro.packaged.S; |
| | | import org.springblade.modules.place.entity.PlacePractitionerEntity; |
| | | import org.springblade.core.tool.node.INode; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty(value = "类型1:未成年 2:少数民族 3:包含1和2", example = "") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "标签类型", example = "") |
| | | private String categoryName; |
| | | |
| | | } |