月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-06-02 c31e03f0e51214a524d3fc34d30f3459698ff625
src/main/resources/mapper/data/DirMapper.xml
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper  PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lf.server.mapper.data.DirMapper">
    <select id="selectDir" resultType="com.lf.server.entity.data.DirEntity">
<mapper namespace="com.moon.server.mapper.data.DirMapper">
    <select id="selectDir" resultType="com.moon.server.entity.data.DirEntity">
        select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where id = #{id}
    </select>
    <select id="selectByCode" resultType="com.lf.server.entity.data.DirEntity">
    <select id="selectByCode" resultType="com.moon.server.entity.data.DirEntity">
        select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where code = #{code}
    </select>
    <select id="selectDirAll" resultType="com.lf.server.entity.data.DirEntity">
    <select id="selectDirAll" resultType="com.moon.server.entity.data.DirEntity">
        select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a order by order_num;
    </select>
    <select id="selectDirRoot" resultType="com.lf.server.entity.data.DirEntity">
    <select id="selectDirRoot" resultType="com.moon.server.entity.data.DirEntity">
        select a.*, fn_get_fullname(a.code, 2) fullName
        from lf.sys_dir a
        where pid = 0
        order by code;
    </select>
    <select id="selectProject" resultType="com.lf.server.entity.data.DirEntity">
    <select id="selectProject" resultType="com.moon.server.entity.data.DirEntity">
        select a.*, fn_get_fullname(a.code, 2) fullName
        from lf.sys_dir a
        <where>
@@ -31,7 +31,7 @@
        order by code;
    </select>
    <select id="selectDirRecursive" resultType="com.lf.server.entity.data.DirEntity">
    <select id="selectDirRecursive" resultType="com.moon.server.entity.data.DirEntity">
        with recursive rs as(
            select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where name = #{name}
            union
@@ -40,7 +40,7 @@
        order by order_num;
    </select>
    <select id="selectRecursiveById" resultType="com.lf.server.entity.data.DirEntity">
    <select id="selectRecursiveById" resultType="com.moon.server.entity.data.DirEntity">
        with recursive rs as(
            select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where id = #{id}
            union
@@ -49,12 +49,12 @@
        order by code;
    </select>
    <select id="selectDirsForPrj" resultType="com.lf.server.entity.data.DirEntity">
    <select id="selectDirsForPrj" resultType="com.moon.server.entity.data.DirEntity">
        select a.* from lf.sys_dir a where code not like '00%' order by code;
    </select>
    <!-- 插入一条 -->
    <insert id="insert" parameterType="com.lf.server.entity.data.DirEntity">
    <insert id="insert" parameterType="com.moon.server.entity.data.DirEntity">
        <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id">
            select currval('lf.sys_dir_id_seq'::regclass) as id
        </selectKey>