| <?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.daoSe.SeManagerCardMapper"> | 
|   <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeManagerCard"> | 
|     <!--@mbg.generated--> | 
|     <!--@Table se_manager_card--> | 
|     <id column="id" jdbcType="BIGINT" property="id" /> | 
|     <result column="card_addr" jdbcType="VARCHAR" property="cardAddr" /> | 
|     <result column="card_num" jdbcType="VARCHAR" property="cardNum" /> | 
|     <result column="card_type" jdbcType="TINYINT" property="cardType" /> | 
|     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> | 
|     <result column="remarks" jdbcType="VARCHAR" property="remarks" /> | 
|   </resultMap> | 
|   <sql id="Base_Column_List"> | 
|     <!--@mbg.generated--> | 
|     id, card_addr, card_num, card_type, create_time, remarks | 
|   </sql> | 
|   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|     <!--@mbg.generated--> | 
|     select  | 
|     <include refid="Base_Column_List" /> | 
|     from se_manager_card | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </select> | 
|   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
|     <!--@mbg.generated--> | 
|     delete from se_manager_card | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </delete> | 
|   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeManagerCard"> | 
|     <!--@mbg.generated--> | 
|     insert into se_manager_card (id, card_addr, card_num,  | 
|       card_type, create_time, remarks | 
|       ) | 
|     values (#{id,jdbcType=BIGINT}, #{cardAddr,jdbcType=VARCHAR}, #{cardNum,jdbcType=VARCHAR},  | 
|       #{cardType,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR} | 
|       ) | 
|   </insert> | 
|   <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeManagerCard"> | 
|     <!--@mbg.generated--> | 
|     insert into se_manager_card | 
|     <trim prefix="(" suffix=")" suffixOverrides=","> | 
|       <if test="id != null"> | 
|         id, | 
|       </if> | 
|       <if test="cardAddr != null"> | 
|         card_addr, | 
|       </if> | 
|       <if test="cardNum != null"> | 
|         card_num, | 
|       </if> | 
|       <if test="cardType != null"> | 
|         card_type, | 
|       </if> | 
|       <if test="createTime != null"> | 
|         create_time, | 
|       </if> | 
|       <if test="remarks != null"> | 
|         remarks, | 
|       </if> | 
|     </trim> | 
|     <trim prefix="values (" suffix=")" suffixOverrides=","> | 
|       <if test="id != null"> | 
|         #{id,jdbcType=BIGINT}, | 
|       </if> | 
|       <if test="cardAddr != null"> | 
|         #{cardAddr,jdbcType=VARCHAR}, | 
|       </if> | 
|       <if test="cardNum != null"> | 
|         #{cardNum,jdbcType=VARCHAR}, | 
|       </if> | 
|       <if test="cardType != null"> | 
|         #{cardType,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="createTime != null"> | 
|         #{createTime,jdbcType=TIMESTAMP}, | 
|       </if> | 
|       <if test="remarks != null"> | 
|         #{remarks,jdbcType=VARCHAR}, | 
|       </if> | 
|     </trim> | 
|   </insert> | 
|   <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeManagerCard"> | 
|     <!--@mbg.generated--> | 
|     update se_manager_card | 
|     <set> | 
|       <if test="cardAddr != null"> | 
|         card_addr = #{cardAddr,jdbcType=VARCHAR}, | 
|       </if> | 
|       <if test="cardNum != null"> | 
|         card_num = #{cardNum,jdbcType=VARCHAR}, | 
|       </if> | 
|       <if test="cardType != null"> | 
|         card_type = #{cardType,jdbcType=TINYINT}, | 
|       </if> | 
|       <if test="createTime != null"> | 
|         create_time = #{createTime,jdbcType=TIMESTAMP}, | 
|       </if> | 
|       <if test="remarks != null"> | 
|         remarks = #{remarks,jdbcType=VARCHAR}, | 
|       </if> | 
|     </set> | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </update> | 
|   <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeManagerCard"> | 
|     <!--@mbg.generated--> | 
|     update se_manager_card | 
|     set card_addr = #{cardAddr,jdbcType=VARCHAR}, | 
|       card_num = #{cardNum,jdbcType=VARCHAR}, | 
|       card_type = #{cardType,jdbcType=TINYINT}, | 
|       create_time = #{createTime,jdbcType=TIMESTAMP}, | 
|       remarks = #{remarks,jdbcType=VARCHAR} | 
|     where id = #{id,jdbcType=BIGINT} | 
|   </update> | 
|   | 
|   <!--根据行政区划串模糊查询管理卡编号--> | 
|   <select id="getManagerCardNumOfMax"  resultType="java.lang.String"> | 
|     SELECT card_num | 
|     FROM se_manager_card | 
|     WHERE card_num LIKE CONCAT(#{areaCode},'%') | 
|     ORDER BY card_num desc | 
|     LIMIT 0,1 | 
|   </select> | 
| </mapper> |