<?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.gk.firework.Mapper.ProductCategoryMapper" >
|
<resultMap id="BaseResultMap" type="com.gk.firework.Domain.ProductCategory" >
|
<!-- -->
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="type" property="type" jdbcType="TINYINT" />
|
<result column="code" property="code" jdbcType="VARCHAR" />
|
<result column="name" property="name" jdbcType="VARCHAR" />
|
<result column="parentname" property="parentname" jdbcType="VARCHAR" />
|
<result column="content" property="content" jdbcType="VARCHAR" />
|
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
<result column="flag" property="flag" jdbcType="TINYINT" />
|
<result column="level" property="level" jdbcType="VARCHAR" />
|
<result column="bitcode" property="bitcode" jdbcType="VARCHAR" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
<!-- -->
|
id, type, code, name, parentname, content, remark, flag, `level`
|
</sql>
|
<select id="countOne" resultType="java.lang.Integer">
|
select count(0)
|
from productcategory as pc1,productcategory as pc2
|
where pc1.name = pc2.parentname
|
and pc1.name = #{type}
|
and pc2.name = #{secondaryType}
|
and pc2.level like concat("%",#{level},"%")
|
</select>
|
|
</mapper>
|