<?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.oying.modules.pc.category.mapper.PlatformCategoryMapper">
|
<resultMap id="BaseResultMap" type="com.oying.modules.pc.category.domain.PlatformCategory">
|
<id column="category_id" property="categoryId"/>
|
<result column="parent_id" property="parentId"/>
|
<result column="name" property="name"/>
|
<result column="level" property="level"/>
|
<result column="sort_weight" property="sortWeight"/>
|
<result column="icon_id" property="iconId"/>
|
<result column="icon_url" property="iconId"/>
|
<result column="status" property="status"/>
|
<result column="active" property="active"/>
|
<result column="create_by" property="createBy"/>
|
<result column="create_time" property="createTime"/>
|
<result column="update_by" property="updateBy"/>
|
<result column="update_time" property="updateTime"/>
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
category_id, parent_id, name, level, sort_weight, icon_id, status, active, create_by, create_time, update_by, update_time
|
</sql>
|
|
<select id="findAll" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List"/>
|
from pc_platform_category
|
<where>
|
<if test="criteria.blurry != null and criteria.blurry != ''">
|
and name like concat('%',#{criteria.blurry},'%')
|
</if>
|
<if test="criteria.active != null">
|
and active = #{criteria.active}
|
</if>
|
<if test="criteria.createStart != null">
|
and create_time >= #{criteria.createStart}
|
</if>
|
<if test="criteria.createEnd != null">
|
and create_time <= #{criteria.createEnd}
|
</if>
|
</where>
|
order by category_id desc
|
</select>
|
</mapper>
|