| | |
| | | select |
| | | jp.*, |
| | | bu.real_name as username,bu.phone as phone, |
| | | bx.real_name as createUserName |
| | | from jczz_place jp |
| | | bx.real_name as createUserName, |
| | | jpe.confirm_flag confirmFlag |
| | | from jczz_place jp |
| | | left join blade_user bu on bu.id = jp.principal_user_id and bu.is_deleted = 0 |
| | | left join blade_user bx on bx.id = jp.create_user and bx.is_deleted = 0 |
| | | LEFT JOIN jczz_place_ext jpe on jpe.place_id=jp.id |
| | | left join ( |
| | | select a.* from jczz_place_poi_label a inner join |
| | | ( |
| | | select place_id,max(id) as id from jczz_place_poi_label b group by place_id |
| | | ) b on a.id = b.id |
| | | select a.* from jczz_place_poi_label a inner join |
| | | ( |
| | | select place_id,max(id) as id from jczz_place_poi_label b group by place_id |
| | | ) b on a.id = b.id |
| | | ) jppl on jppl.place_id = jp.id |
| | | where jp.is_deleted = 0 |
| | | <if test="place.roleName!=null and place.roleName!=''"> |
| | |
| | | <if test="place.placeName!=null and place.placeName!=''"> |
| | | and jp.place_name like concat('%',#{place.placeName},'%') |
| | | </if> |
| | | <if test="place.principal!=null and place.principal!=''"> |
| | | and jp.principal like concat('%',#{place.principal},'%') |
| | | </if> |
| | | <if test="place.principalPhone!=null and place.principalPhone!=''"> |
| | | and jp.principal_phone like concat('%',#{place.principalPhone},'%') |
| | | </if> |
| | | <if test="place.isPerfect==1"> |
| | | and |
| | | ( |
| | |
| | | and bu.real_name != "" |
| | | and bu.phone != "" |
| | | </if> |
| | | order by jpe.create_time desc |
| | | </select> |
| | | |
| | | <!--查询场所集合信息--> |
| | |
| | | </if> |
| | | limit 1 |
| | | </select> |
| | | |
| | | <!--查询出有用户id 的场所--> |
| | | <select id="getHasUserIdPlaceList" resultType="org.springblade.modules.place.entity.PlaceEntity"> |
| | | select |
| | | jp.* |
| | | from jczz_place jp |
| | | left join blade_user bu on bu.id = jp.principal_user_id and bu.is_deleted = 0 |
| | | where jp.is_deleted = 0 and jp.principal_user_id is not null |
| | | </select> |
| | | </mapper> |