|  |  |  | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | <!--@Table se_manager_card--> | 
|---|
|  |  |  | <id column="id" jdbcType="BIGINT" property="id" /> | 
|---|
|  |  |  | <result column="protocol" jdbcType="VARCHAR" property="protocol" /> | 
|---|
|  |  |  | <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" /> | 
|---|
|  |  |  | <result column="order_no" jdbcType="VARCHAR" property="orderNo" /> | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  | <sql id="Base_Column_List"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | id, card_addr, card_num, card_type, create_time, remarks | 
|---|
|  |  |  | id, protocol, card_addr, card_num, card_type, create_time, remarks, order_no | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | 
|---|
|  |  |  | </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 into se_manager_card (id, protocol, card_addr, | 
|---|
|  |  |  | card_num, card_type, create_time, | 
|---|
|  |  |  | remarks, order_no) | 
|---|
|  |  |  | values (#{id,jdbcType=BIGINT}, #{protocol,jdbcType=VARCHAR}, #{cardAddr,jdbcType=VARCHAR}, | 
|---|
|  |  |  | #{cardNum,jdbcType=VARCHAR}, #{cardType,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, | 
|---|
|  |  |  | #{remarks,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}) | 
|---|
|  |  |  | </insert> | 
|---|
|  |  |  | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeManagerCard"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | 
|---|
|  |  |  | <trim prefix="(" suffix=")" suffixOverrides=","> | 
|---|
|  |  |  | <if test="id != null"> | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="protocol != null"> | 
|---|
|  |  |  | protocol, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="cardAddr != null"> | 
|---|
|  |  |  | card_addr, | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="remarks != null"> | 
|---|
|  |  |  | remarks, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="orderNo != null"> | 
|---|
|  |  |  | order_no, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | <trim prefix="values (" suffix=")" suffixOverrides=","> | 
|---|
|  |  |  | <if test="id != null"> | 
|---|
|  |  |  | #{id,jdbcType=BIGINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="protocol != null"> | 
|---|
|  |  |  | #{protocol,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="cardAddr != null"> | 
|---|
|  |  |  | #{cardAddr,jdbcType=VARCHAR}, | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="remarks != null"> | 
|---|
|  |  |  | #{remarks,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="orderNo != null"> | 
|---|
|  |  |  | #{orderNo,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </insert> | 
|---|
|  |  |  | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeManagerCard"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | update se_manager_card | 
|---|
|  |  |  | <set> | 
|---|
|  |  |  | <if test="protocol != null"> | 
|---|
|  |  |  | protocol = #{protocol,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="cardAddr != null"> | 
|---|
|  |  |  | card_addr = #{cardAddr,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="remarks != null"> | 
|---|
|  |  |  | remarks = #{remarks,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="orderNo != null"> | 
|---|
|  |  |  | order_no = #{orderNo,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}, | 
|---|
|  |  |  | set protocol = #{protocol,jdbcType=VARCHAR}, | 
|---|
|  |  |  | card_addr = #{cardAddr,jdbcType=VARCHAR}, | 
|---|
|  |  |  | card_num = #{cardNum,jdbcType=VARCHAR}, | 
|---|
|  |  |  | card_type = #{cardType,jdbcType=TINYINT}, | 
|---|
|  |  |  | create_time = #{createTime,jdbcType=TIMESTAMP}, | 
|---|
|  |  |  | remarks = #{remarks,jdbcType=VARCHAR} | 
|---|
|  |  |  | remarks = #{remarks,jdbcType=VARCHAR}, | 
|---|
|  |  |  | order_no = #{orderNo,jdbcType=VARCHAR} | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | ORDER BY card_num desc | 
|---|
|  |  |  | LIMIT 0,1 | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--充值机用获取管理卡信息--> | 
|---|
|  |  |  | <select id="getTermManagerCardInfo" resultType="com.dy.pipIrrGlobal.voSe.VoTermCard"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | card_num AS cardNum, | 
|---|
|  |  |  | card_type AS cardType, | 
|---|
|  |  |  | NULL AS money, | 
|---|
|  |  |  | NULL AS state, | 
|---|
|  |  |  | NULL AS userName, | 
|---|
|  |  |  | NULL AS clientNum, | 
|---|
|  |  |  | NULL AS phone, | 
|---|
|  |  |  | NULL AS address, | 
|---|
|  |  |  | NULL AS lastRechargeTime, | 
|---|
|  |  |  | card.protocol AS cardcardAgreement | 
|---|
|  |  |  | FROM se_manager_card card | 
|---|
|  |  |  | WHERE card.card_addr = #{cardAddr} AND card.state != 4 | 
|---|
|  |  |  | ORDER BY card.createDt DESC | 
|---|
|  |  |  | LIMIT 1 | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|