linwe
2024-08-02 a1eede2f9f7c2590952ab1bdf34210020cdde7c6
src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
@@ -1113,4 +1113,83 @@
        ORDER BY distance limit 60
    </select>
    <select id="getPlacePage" resultType="org.springblade.modules.place.vo.PlaceVO">
        select
        jp.id,
        jp.house_code,
        jp.house_code_binds,
        jp.building_code,
        jp.principal_user_id,
        jp.principal,
        jp.principal_phone,
        jp.principal_id_card,
        jp.place_name,
        jp.lng,
        jp.lat,
        jp.location,
        jp.image_urls,
        jp.grid_id,
        jp.grid_code,
        jp.jw_grid_code,
        jp.source,
        jp.status,
        jp.is_scene,
        jp.is_nine,
        jp.nine_type,
        jp.is_front,
        jp.front_type,
        jp.create_user,
        jp.create_time,
        jp.update_user,
        jp.update_time,
        jp.remark,
        jp.is_deleted,
        jp.aoi_code,
        jp.three_fire_protection,
        jp.no_explosion_category,
        jp.principal_account,
        jp.universal_account
        from
        jczz_place jp
        LEFT JOIN jczz_place_poi_label jppl ON jppl.place_id = jp.id
        <where>
            <if test="place.id != null "> and id = #{place.id}</if>
            <if test="place.houseCode != null  and place.houseCode != ''"> and house_code = #{place.houseCode}</if>
            <if test="place.houseCodeBinds != null  and place.houseCodeBinds != ''"> and house_code_binds = #{place.houseCodeBinds}</if>
            <if test="place.buildingCode != null  and place.buildingCode != ''"> and building_code = #{place.buildingCode}</if>
            <if test="place.principalUserId != null "> and principal_user_id = #{place.principalUserId}</if>
            <if test="place.principal != null  and place.principal != ''"> and principal = #{place.principal}</if>
            <if test="place.principalPhone != null  and place.principalPhone != ''"> and principal_phone = #{place.principalPhone}</if>
            <if test="place.principalIdCard != null  and place.principalIdCard != ''"> and principal_id_card = #{place.principalIdCard}</if>
            <if test="place.placeName != null  and place.placeName != ''"> and place_name = #{place.placeName}</if>
            <if test="place.lng != null  and place.lng != ''"> and lng = #{place.lng}</if>
            <if test="place.lat != null  and place.lat != ''"> and lat = #{place.lat}</if>
            <if test="place.location != null  and place.location != ''"> and location = #{place.location}</if>
            <if test="place.imageUrls != null  and place.imageUrls != ''"> and image_urls = #{place.imageUrls}</if>
            <if test="place.gridId != null "> and grid_id = #{place.gridId}</if>
            <if test="place.gridCode != null  and place.gridCode != ''"> and grid_code = #{place.gridCode}</if>
            <if test="place.jwGridCode != null  and place.jwGridCode != ''"> and jw_grid_code = #{place.jwGridCode}</if>
            <if test="place.source != null "> and source = #{place.source}</if>
            <if test="place.status != null "> and status = #{place.status}</if>
            <if test="place.isScene != null "> and is_scene = #{place.isScene}</if>
            <if test="place.isNine != null "> and is_nine = #{place.isNine}</if>
            <if test="place.nineType != null "> and nine_type = #{place.nineType}</if>
            <if test="place.isFront != null "> and is_front = #{place.isFront}</if>
            <if test="place.frontType != null "> and front_type = #{place.frontType}</if>
            <if test="place.createUser != null "> and create_user = #{place.createUser}</if>
            <if test="place.createTime != null "> and create_time = #{place.createTime}</if>
            <if test="place.updateUser != null "> and update_user = #{place.updateUser}</if>
            <if test="place.updateTime != null "> and update_time = #{place.updateTime}</if>
            <if test="place.remark != null  and place.remark != ''"> and remark = #{place.remark}</if>
            <if test="place.isDeleted != null "> and is_deleted = #{place.isDeleted}</if>
            <if test="place.aoiCode != null  and place.aoiCode != ''"> and aoi_code = #{place.aoiCode}</if>
            <if test="place.threeFireProtection != null "> and three_fire_protection = #{place.threeFireProtection}</if>
            <if test="place.noExplosionCategory != null "> and no_explosion_category = #{place.noExplosionCategory}</if>
            <if test="place.principalAccount != null "> and principal_account = #{place.principalAccount}</if>
            <if test="place.universalAccount != null "> and universal_account = #{place.universalAccount}</if>
            <if test="place.poiCodes != null "> and jppl.poi_code = #{place.poiCodes}</if>
        </where>
    </select>
</mapper>