linwe
2023-12-23 55d677758efadb6d42e6d4e595cecc2c50c20d5a
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
<?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.category.mapper.CategoryMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="categoryResultMap" type="org.springblade.modules.category.entity.CategoryEntity">
        <result column="id" property="id"/>
        <result column="category_no" property="categoryNo"/>
        <result column="category_name" property="categoryName"/>
        <result column="parent_no" property="parentNo"/>
        <result column="importance" property="importance"/>
        <result column="remark" property="remark"/>
        <result column="level" property="level"/>
        <result column="description" property="description"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
 
    <!--自定义分页查询-->
    <select id="selectCategoryPage" resultMap="categoryResultMap">
        select * from jczz_category where is_deleted = 0
    </select>
 
    <!--天地图poi 分类获取-->
    <select id="getCategory" resultType="org.springblade.modules.category.vo.CategoryVO">
        select * from jczz_category
        where is_deleted = 0
        <if test="category.level!=null">
            and level = #{category.level}
        </if>
        <if test="category.parentNo!=null and category.parentNo!=''">
            and parent_no = #{category.parentNo}
        </if>
    </select>
 
 
</mapper>