智慧农业后台管理
tangzy
2022-05-30 0f51855b9046632aef8b517eb35b9116e5ea8b72
src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml
@@ -17,19 +17,25 @@
    <select id="selectLandPage" resultMap="landResultMap">
        SELECT l.land_name,
               l.land_area ,
               ST_ASTEXT(land_range) as land_range,
               l.url,
               d.dict_value as dic,
               c.dict_value as dica
        l.land_area ,
        ST_ASTEXT(land_range) as land_range,
        l.url,
        d.dict_value as dic,
        c.dict_value as dica
        FROM `sys_land` l
                 LEFT JOIN (SELECT dict_key, dict_value FROM blade_dict_biz WHERE CODE = 'land' AND is_deleted = 0) d
                           ON d.dict_key = l.land_type
                 LEFT JOIN (SELECT dict_key, dict_value
                            FROM blade_dict_biz
                            WHERE CODE = 'landunit'
                              AND is_deleted = 0) c ON c.dict_key = l.type
        LEFT JOIN (SELECT dict_key, dict_value FROM blade_dict_biz WHERE CODE = 'land' AND is_deleted = 0) d
        ON d.dict_key = l.land_type
        LEFT JOIN (SELECT dict_key, dict_value
        FROM blade_dict_biz
        WHERE CODE = 'landunit'
        AND is_deleted = 0) c ON c.dict_key = l.type
        where l.is_deleted = 0
        <if test="land.landType!=null and land.landType != ''">
            and l.land_type = #{land.landType}
        </if>
        <if test="land.landName!=null and land.landName != ''">
            and l.land_name like concat('%', #{land.landName},'%')
        </if>
    </select>
    <insert id="saveLandInfo">