linwe
2024-06-13 b636e92e32c2a698e2590210037c471e45b9c88a
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
<?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="org.springblade.modules.issueClazz.mapper.IssueClazzMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="issueClazzResultMap" type="org.springblade.modules.issueClazz.entity.IssueClazzEntity">
    </resultMap>
 
 
    <select id="selectIssueClazzPage" resultMap="issueClazzResultMap">
        select * from jczz_issue_clazz where is_deleted = 0
    </select>
 
    <resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode">
        <id column="id" property="id"/>
<!--        <result column="parent_id" property="parentId"/>-->
        <result column="title" property="title"/>
        <result column="value" property="value"/>
        <result column="key" property="key"/>
        <result column="has_children" property="hasChildren"/>
    </resultMap>
 
 
    <select id="tree" resultMap="treeNodeResultMap">
        SELECT CODE        id,
               NAME AS     title,
               CODE AS     "value",
               CODE AS     "key",
               parent_code parentId
        FROM jczz_issue_clazz
    </select>
 
 
</mapper>