<?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="cn.superdesk.uniorder.dao.mapper.unified.WeixinNotifyInfoMapper">
	<resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.unified.WeixinNotifyInfo">
		<id column="id" property="id" jdbcType="BIGINT"/>
		<result column="return_code" property="returnCode" jdbcType="VARCHAR"/>
		<result column="return_msg" property="returnMsg" jdbcType="VARCHAR"/>
		<result column="nonce_str" property="nonceStr" jdbcType="VARCHAR"/>
		<result column="sign" property="sign" jdbcType="VARCHAR"/>
		<result column="sign_type" property="signType" jdbcType="VARCHAR"/>
		<result column="result_code" property="resultCode" jdbcType="VARCHAR"/>
		<result column="err_code" property="errCode" jdbcType="VARCHAR"/>
		<result column="err_code_des" property="errCodeDes" jdbcType="VARCHAR"/>
		<result column="openid" property="openid" jdbcType="VARCHAR"/>
		<result column="is_subscribe" property="isSubscribe" jdbcType="VARCHAR"/>
		<result column="trade_type" property="tradeType" jdbcType="VARCHAR"/>
		<result column="bank_type" property="bankType" jdbcType="VARCHAR"/>
		<result column="total_fee" property="totalFee" jdbcType="INTEGER"/>
		<result column="settlement_total_fee" property="settlementTotalFee" jdbcType="INTEGER"/>
		<result column="cash_fee" property="cashFee" jdbcType="INTEGER"/>
		<result column="transaction_id" property="transactionId" jdbcType="VARCHAR"/>
		<result column="out_trade_no" property="outTradeNo" jdbcType="VARCHAR"/>
		<result column="time_end" property="timeEnd" jdbcType="VARCHAR"/>
		<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
		<result column="last_update_time" property="lastUpdateTime" jdbcType="TIMESTAMP"/>
		<result column="create_user_id" property="createUserId" jdbcType="BIGINT"/>
		<result column="last_update_user_id" property="lastUpdateUserId" jdbcType="BIGINT"/>
		<result column="del_flag" property="delFlag" jdbcType="INTEGER"/>
	</resultMap>
	<sql id="Base_Column_List">
    id, return_code, return_msg, nonce_str, sign, sign_type, result_code, err_code, err_code_des, 
    openid, is_subscribe, trade_type, bank_type, total_fee, settlement_total_fee, cash_fee, 
    transaction_id, out_trade_no, time_end, create_time, last_update_time, create_user_id, 
    last_update_user_id, del_flag
  </sql>
	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
		select
		<include refid="Base_Column_List"/>
		from weixin_notify_info
		where id = #{id,jdbcType=BIGINT}
	</select>
	<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from weixin_notify_info
    where id = #{id,jdbcType=BIGINT}
  </delete>
	<insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.unified.WeixinNotifyInfo">
		<selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER">
			SELECT LAST_INSERT_ID()
		</selectKey>
		insert into weixin_notify_info (return_code, return_msg, nonce_str,
		sign, sign_type, result_code,
		err_code, err_code_des, openid,
		is_subscribe, trade_type, bank_type,
		total_fee, settlement_total_fee, cash_fee,
		transaction_id, out_trade_no, time_end,
		create_time, last_update_time, create_user_id,
		last_update_user_id, del_flag)
		values (#{returnCode,jdbcType=VARCHAR}, #{returnMsg,jdbcType=VARCHAR}, #{nonceStr,jdbcType=VARCHAR},
		#{sign,jdbcType=VARCHAR}, #{signType,jdbcType=VARCHAR}, #{resultCode,jdbcType=VARCHAR},
		#{errCode,jdbcType=VARCHAR}, #{errCodeDes,jdbcType=VARCHAR}, #{openid,jdbcType=VARCHAR},
		#{isSubscribe,jdbcType=VARCHAR}, #{tradeType,jdbcType=VARCHAR}, #{bankType,jdbcType=VARCHAR},
		#{totalFee,jdbcType=INTEGER}, #{settlementTotalFee,jdbcType=INTEGER}, #{cashFee,jdbcType=INTEGER},
		#{transactionId,jdbcType=VARCHAR}, #{outTradeNo,jdbcType=VARCHAR}, #{timeEnd,jdbcType=VARCHAR},
		#{createTime,jdbcType=TIMESTAMP}, #{lastUpdateTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT},
		#{lastUpdateUserId,jdbcType=BIGINT}, #{delFlag,jdbcType=INTEGER})
	</insert>
	<insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.unified.WeixinNotifyInfo">
		<selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER">
			SELECT LAST_INSERT_ID()
		</selectKey>
		insert into weixin_notify_info
		<trim prefix="(" suffix=")" suffixOverrides=",">
			<if test="returnCode != null">
				return_code,
			</if>
			<if test="returnMsg != null">
				return_msg,
			</if>
			<if test="nonceStr != null">
				nonce_str,
			</if>
			<if test="sign != null">
				sign,
			</if>
			<if test="signType != null">
				sign_type,
			</if>
			<if test="resultCode != null">
				result_code,
			</if>
			<if test="errCode != null">
				err_code,
			</if>
			<if test="errCodeDes != null">
				err_code_des,
			</if>
			<if test="openid != null">
				openid,
			</if>
			<if test="isSubscribe != null">
				is_subscribe,
			</if>
			<if test="tradeType != null">
				trade_type,
			</if>
			<if test="bankType != null">
				bank_type,
			</if>
			<if test="totalFee != null">
				total_fee,
			</if>
			<if test="settlementTotalFee != null">
				settlement_total_fee,
			</if>
			<if test="cashFee != null">
				cash_fee,
			</if>
			<if test="transactionId != null">
				transaction_id,
			</if>
			<if test="outTradeNo != null">
				out_trade_no,
			</if>
			<if test="timeEnd != null">
				time_end,
			</if>
			<if test="createTime != null">
				create_time,
			</if>
			<if test="lastUpdateTime != null">
				last_update_time,
			</if>
			<if test="createUserId != null">
				create_user_id,
			</if>
			<if test="lastUpdateUserId != null">
				last_update_user_id,
			</if>
			<if test="delFlag != null">
				del_flag,
			</if>
		</trim>
		<trim prefix="values (" suffix=")" suffixOverrides=",">
			<if test="returnCode != null">
				#{returnCode,jdbcType=VARCHAR},
			</if>
			<if test="returnMsg != null">
				#{returnMsg,jdbcType=VARCHAR},
			</if>
			<if test="nonceStr != null">
				#{nonceStr,jdbcType=VARCHAR},
			</if>
			<if test="sign != null">
				#{sign,jdbcType=VARCHAR},
			</if>
			<if test="signType != null">
				#{signType,jdbcType=VARCHAR},
			</if>
			<if test="resultCode != null">
				#{resultCode,jdbcType=VARCHAR},
			</if>
			<if test="errCode != null">
				#{errCode,jdbcType=VARCHAR},
			</if>
			<if test="errCodeDes != null">
				#{errCodeDes,jdbcType=VARCHAR},
			</if>
			<if test="openid != null">
				#{openid,jdbcType=VARCHAR},
			</if>
			<if test="isSubscribe != null">
				#{isSubscribe,jdbcType=VARCHAR},
			</if>
			<if test="tradeType != null">
				#{tradeType,jdbcType=VARCHAR},
			</if>
			<if test="bankType != null">
				#{bankType,jdbcType=VARCHAR},
			</if>
			<if test="totalFee != null">
				#{totalFee,jdbcType=INTEGER},
			</if>
			<if test="settlementTotalFee != null">
				#{settlementTotalFee,jdbcType=INTEGER},
			</if>
			<if test="cashFee != null">
				#{cashFee,jdbcType=INTEGER},
			</if>
			<if test="transactionId != null">
				#{transactionId,jdbcType=VARCHAR},
			</if>
			<if test="outTradeNo != null">
				#{outTradeNo,jdbcType=VARCHAR},
			</if>
			<if test="timeEnd != null">
				#{timeEnd,jdbcType=VARCHAR},
			</if>
			<if test="createTime != null">
				#{createTime,jdbcType=TIMESTAMP},
			</if>
			<if test="lastUpdateTime != null">
				#{lastUpdateTime,jdbcType=TIMESTAMP},
			</if>
			<if test="createUserId != null">
				#{createUserId,jdbcType=BIGINT},
			</if>
			<if test="lastUpdateUserId != null">
				#{lastUpdateUserId,jdbcType=BIGINT},
			</if>
			<if test="delFlag != null">
				#{delFlag,jdbcType=INTEGER},
			</if>
		</trim>
	</insert>
	<update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.unified.WeixinNotifyInfo">
		update weixin_notify_info
		<set>
			<if test="returnCode != null">
				return_code = #{returnCode,jdbcType=VARCHAR},
			</if>
			<if test="returnMsg != null">
				return_msg = #{returnMsg,jdbcType=VARCHAR},
			</if>
			<if test="nonceStr != null">
				nonce_str = #{nonceStr,jdbcType=VARCHAR},
			</if>
			<if test="sign != null">
				sign = #{sign,jdbcType=VARCHAR},
			</if>
			<if test="signType != null">
				sign_type = #{signType,jdbcType=VARCHAR},
			</if>
			<if test="resultCode != null">
				result_code = #{resultCode,jdbcType=VARCHAR},
			</if>
			<if test="errCode != null">
				err_code = #{errCode,jdbcType=VARCHAR},
			</if>
			<if test="errCodeDes != null">
				err_code_des = #{errCodeDes,jdbcType=VARCHAR},
			</if>
			<if test="openid != null">
				openid = #{openid,jdbcType=VARCHAR},
			</if>
			<if test="isSubscribe != null">
				is_subscribe = #{isSubscribe,jdbcType=VARCHAR},
			</if>
			<if test="tradeType != null">
				trade_type = #{tradeType,jdbcType=VARCHAR},
			</if>
			<if test="bankType != null">
				bank_type = #{bankType,jdbcType=VARCHAR},
			</if>
			<if test="totalFee != null">
				total_fee = #{totalFee,jdbcType=INTEGER},
			</if>
			<if test="settlementTotalFee != null">
				settlement_total_fee = #{settlementTotalFee,jdbcType=INTEGER},
			</if>
			<if test="cashFee != null">
				cash_fee = #{cashFee,jdbcType=INTEGER},
			</if>
			<if test="transactionId != null">
				transaction_id = #{transactionId,jdbcType=VARCHAR},
			</if>
			<if test="outTradeNo != null">
				out_trade_no = #{outTradeNo,jdbcType=VARCHAR},
			</if>
			<if test="timeEnd != null">
				time_end = #{timeEnd,jdbcType=VARCHAR},
			</if>
			<if test="createTime != null">
				create_time = #{createTime,jdbcType=TIMESTAMP},
			</if>
			<if test="lastUpdateTime != null">
				last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP},
			</if>
			<if test="createUserId != null">
				create_user_id = #{createUserId,jdbcType=BIGINT},
			</if>
			<if test="lastUpdateUserId != null">
				last_update_user_id = #{lastUpdateUserId,jdbcType=BIGINT},
			</if>
			<if test="delFlag != null">
				del_flag = #{delFlag,jdbcType=INTEGER},
			</if>
		</set>
		where id = #{id,jdbcType=BIGINT}
	</update>
	<update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.unified.WeixinNotifyInfo">
    update weixin_notify_info
    set return_code = #{returnCode,jdbcType=VARCHAR},
      return_msg = #{returnMsg,jdbcType=VARCHAR},
      nonce_str = #{nonceStr,jdbcType=VARCHAR},
      sign = #{sign,jdbcType=VARCHAR},
      sign_type = #{signType,jdbcType=VARCHAR},
      result_code = #{resultCode,jdbcType=VARCHAR},
      err_code = #{errCode,jdbcType=VARCHAR},
      err_code_des = #{errCodeDes,jdbcType=VARCHAR},
      openid = #{openid,jdbcType=VARCHAR},
      is_subscribe = #{isSubscribe,jdbcType=VARCHAR},
      trade_type = #{tradeType,jdbcType=VARCHAR},
      bank_type = #{bankType,jdbcType=VARCHAR},
      total_fee = #{totalFee,jdbcType=INTEGER},
      settlement_total_fee = #{settlementTotalFee,jdbcType=INTEGER},
      cash_fee = #{cashFee,jdbcType=INTEGER},
      transaction_id = #{transactionId,jdbcType=VARCHAR},
      out_trade_no = #{outTradeNo,jdbcType=VARCHAR},
      time_end = #{timeEnd,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      last_update_user_id = #{lastUpdateUserId,jdbcType=BIGINT},
      del_flag = #{delFlag,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>