<?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.zjt.mapper.groupMapper" >
  <resultMap id="BaseResultMap" type="com.zjt.entity.group" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="client_code" property="clientCode" jdbcType="VARCHAR" />
    <result column="material_group_code" property="materialGroupCode" jdbcType="VARCHAR" />
    <result column="material_group_name" property="materialGroupName" jdbcType="VARCHAR" />
    <result column="status" property="status" jdbcType="INTEGER" />
    <result column="father_id" property="fatherId" jdbcType="BIGINT" />
    <result column="codes" property="codes" jdbcType="VARCHAR" />
    <result column="material_type_code" property="materialTypeCode" jdbcType="VARCHAR" />
    <result column="brand_code" property="brandCode" jdbcType="VARCHAR" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="create_user_code" property="createUserCode" jdbcType="VARCHAR" />
    <result column="create_user_name" property="createUserName" jdbcType="VARCHAR" />
    <result column="create_user_id" property="createUserId" jdbcType="BIGINT" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
    <result column="update_user_code" property="updateUserCode" jdbcType="VARCHAR" />
    <result column="update_user_name" property="updateUserName" jdbcType="VARCHAR" />
    <result column="update_user_id" property="updateUserId" jdbcType="BIGINT" />
  </resultMap>
  <resultMap id="ResultMapWithBLOBs" type="com.zjt.entity.group" extends="BaseResultMap" >
    <result column="property_content" property="propertyContent" jdbcType="LONGVARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, client_code, material_group_code, material_group_name, status, father_id, codes, 
    material_type_code, brand_code, create_time, create_user_code, create_user_name, 
    create_user_id, update_time, update_user_code, update_user_name, update_user_id
  </sql>
  <sql id="Blob_Column_List" >
    property_content
  </sql>
  <select id="selectBrand" resultMap="BaseResultMap" parameterType="java.lang.String">
    SELECT <include refid="Base_Column_List" />
    FROM `b_base_material_group` t WHERE t.`brand_code`= #{brand};

  </select>
</mapper>