多单位版国产化地质资料管理系统
zhai
2025-09-17 7a8a84577894b766a95c6cbfa5ac7b51e54ac242
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?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.ruili.wcp.dao.config.SubtabMapper"> 
     <!-- 查询带操作信息SQL -->
      <select id="getSubtabListByViewId"  parameterType="Long" resultType="com.ruili.wcp.data.entity.config.Subtab">
       SELECT a.* FROM 
       cnf_subtab a,cnf_view_subtab b WHERE a.subtab_id=b.subtab_id and b.view_id=#{viewId}
       order by b.sort_num asc
      </select>
 
    <!-- 根据模块ID获取页签最大排序号 -->
    <select id="selectMaxSortNum" parameterType="Long" resultType="int">
        select
        ifnull(max(sort_num),0) sortNum
        FROM cnf_subtab where module_id = #{moduleId}
    </select>
    <!-- 根据模块ID获取页签最大排序号 -->
    <select id="selectMaxSortNum" parameterType="Long" resultType="int" databaseId="postgresql">
        select
            NVL(max(sort_num),0) sortNum
        FROM cnf_subtab where module_id = #{moduleId}
    </select>
 
    <!-- 根据模块ID获取页签最大排序号 -->
    <select id="selectMaxSortNum" parameterType="Long" resultType="int" databaseId="oracle">
        select
        NVL(max(sort_num),0) sortNum
        FROM cnf_subtab where module_id = #{moduleId}
    </select>
 
    <!-- 根据模块ID获取页签最大排序号 -->
    <select id="selectMaxSortNum" parameterType="Long" resultType="int" databaseId="kingbasees">
        select
            NVL(max(sort_num),0) sortNum
        FROM cnf_subtab where module_id = #{moduleId}
    </select>
 
    <!-- 根据模块ID获取页签最大排序号 -->
    <select id="selectMaxSortNum" parameterType="Long" resultType="int" databaseId="sqlServer">
        select
        isnull(max(sort_num),0) sortNum
        FROM cnf_subtab where module_id = #{moduleId}
    </select>
</mapper>