<?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.supServer.project.mapper.BizCategoryMapper">

    <resultMap type="com.supServer.project.entity.BizCategory" id="BizCategoryResult">
        <id     property="catId"       column="cat_id"      />
        <result property="name"       column="name"      />
        <result property="parentCode"     column="parent_code"    />
        <result property="level"     	column="level"    />
        <result property="showStatus" 	column="show_status"        />
        <result property="sort"  		column="sort"  />
        <result property="mark" 		column="mark"/>
        <result property="userName"       	column="user_name"       />
        <result property="code"     column="code"     />
        <result property="createTime"   column="create_time"  />
        <result property="updateTime"   column="update_time"  />
    </resultMap>


    <select id="listTree" parameterType="com.supServer.project.entity.vo.BizCategoryVo" resultMap="BizCategoryResult">
        select bc.*
        from biz_category bc
        <where>
            <if test="vo.name != null  and vo.name != ''">
              and bc.name like concat('%', #{vo.name}, '%')
            </if>
            and bc.show_status='1'
        </where>
    </select>


</mapper>