彭雪彬
2025-07-14 c1d20b425b10e8ba59f102dd1ab413055883eed0
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.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="iconUrl"/>
        <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, icon_url, 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 &gt;= #{criteria.createStart}
            </if>
            <if test="criteria.createEnd != null">
                and create_time &lt;= #{criteria.createEnd}
            </if>
        </where>
        order by category_id desc
    </select>
</mapper>