| <?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.dy.pipIrrGlobal.daoBa.BaClientTypeMapper"> | 
|   <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoBa.BaClientType"> | 
|     <!--@mbg.generated--> | 
|     <!--@Table ba_client_type--> | 
|     <result column="id" jdbcType="BIGINT" property="id" /> | 
|     <result column="name" jdbcType="VARCHAR" property="name" /> | 
|   </resultMap> | 
|   <sql id="Base_Column_List"> | 
|     <!--@mbg.generated--> | 
|     id, `name` | 
|   </sql> | 
|   | 
|   <select id="selectNameById" parameterType="long" resultType="string"> | 
|     select name | 
|     from ba_client_type | 
|     where id=#{id, jdbcType=BIGINT} | 
|   </select> | 
|   | 
|   <select id="selectAll" resultMap="BaseResultMap"> | 
|     select | 
|     <include refid="Base_Column_List" /> | 
|     from ba_client_type | 
|   </select> | 
|   | 
|   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|     <!--@mbg.generated--> | 
|     select | 
|     <include refid="Base_Column_List" /> | 
|     from ba_client_type | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </select> | 
|   | 
|   <select id="selectTotal" parameterType="java.util.Map" resultType="java.lang.Long"> | 
|     select | 
|     count(*) | 
|     from ba_client_type | 
|     <trim prefix="where" suffixOverrides="and"> | 
|       <if test="name != null and name != ''"> | 
|         name like concat('%', #{name}, '%') and | 
|       </if> | 
|     </trim> | 
|   </select> | 
|   | 
|   <select id="selectSome" parameterType="java.util.Map" resultMap="BaseResultMap"> | 
|     select | 
|     <include refid="Base_Column_List" /> | 
|     from ba_client_type | 
|     <trim prefix="where" suffixOverrides="and"> | 
|       <if test="name != null and name != ''"> | 
|         name like concat('%', #{name}, '%') | 
|       </if> | 
|     </trim> | 
|     order by id DESC | 
|     <trim prefix="limit " > | 
|       <if test="start != null and count != null"> | 
|         #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
|       </if> | 
|     </trim> | 
|   </select> | 
|   | 
|   <insert id="putin" parameterType="com.dy.pipIrrGlobal.pojoBa.BaClientType"> | 
|     <!--@mbg.generated--> | 
|     insert into ba_client_type (id, `name`) | 
|     values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}) | 
|   </insert> | 
|   | 
|   <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaClientType"> | 
|     <!--@mbg.generated--> | 
|     insert into ba_client_type | 
|     <trim prefix="(" suffix=")" suffixOverrides=","> | 
|       <if test="id != null"> | 
|         id, | 
|       </if> | 
|       <if test="name != null"> | 
|         `name`, | 
|       </if> | 
|     </trim> | 
|     <trim prefix="values (" suffix=")" suffixOverrides=","> | 
|       <if test="id != null"> | 
|         #{id,jdbcType=BIGINT}, | 
|       </if> | 
|       <if test="name != null"> | 
|         #{name,jdbcType=VARCHAR}, | 
|       </if> | 
|     </trim> | 
|   </insert> | 
|   | 
|   | 
|   <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaClientType"> | 
|     update ba_client_type | 
|     <trim prefix="set " suffixOverrides=","> | 
|       <if test="name != null"> | 
|         `name` = #{name,jdbcType=VARCHAR} | 
|       </if> | 
|     </trim> | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </update> | 
|   | 
|   <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoBa.BaClientType"> | 
|     update ba_client_type | 
|     set `name` = #{name,jdbcType=VARCHAR} | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </update> | 
|   | 
|   | 
|   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
|     <!--@mbg.generated--> | 
|     delete from ba_client_type | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </delete> | 
|   | 
| </mapper> |