月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-08-14 e002c67732b571f0b20cca8321ca8ee1ddba2e05
src/main/resources/mapper/data/PublishMapper.xml
ÎļþÃû´Ó src/main/resources/mapper/show/PublishMapper.xml ÐÞ¸Ä
@@ -48,8 +48,15 @@
    <select id="selectCount" resultType="java.lang.Integer">
        select count(*) from lf.sys_publish
        <where>
            1 = 1
            <if test="name != null">
                upper(name) like #{name}
                and upper(name) like #{name}
            </if>
            <if test="dircode != null">
                and dirid like #{dircode}
            </if>
            <if test="type != null">
                and ${type}
            </if>
        </where>
    </select>
@@ -58,11 +65,18 @@
        select ST_AsText(geom) "geom", a.*, fn_get_fullname(a.depid, 1) depName, fn_get_fullname(a.dirid, 2) dirName, fn_uname(create_user) createName, fn_uname(update_user) updateName
        from lf.sys_publish a
        <where>
            1 = 1
            <if test="name != null">
                upper(name) like #{name}
                and upper(name) like #{name}
            </if>
            <if test="dircode != null">
                and dirid like #{dircode}
            </if>
            <if test="type != null">
                and ${type}
            </if>
        </where>
        order by id desc
        order by a.update_time desc, a.create_time desc
        limit #{limit} offset #{offset}
    </select>
@@ -80,6 +94,25 @@
        select * from lf.sys_publish where id in (${ids}) order by id desc;
    </select>
    <select id="selectCodesForDir" resultType="java.lang.String">
        select code
        from lf.sys_dir
        <where>
            <choose>
                <when test="isDom > 0">
                    name in ('DOM', '数字正射影像图')
                </when>
                <otherwise>
                    name in ('DEM', '数字高程模型')
                </otherwise>
            </choose>
            <if test="dircode != null">
                and code like #{dircode}
            </if>
        </where>
        order by code;
    </select>
    <insert id="insert" parameterType="com.moon.server.entity.data.PublishEntity">
        insert into lf.sys_publish
        (regid,name,url,path,type,status,dirid,depid,min,max,json,create_user,create_time,bak)