<?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>
|