New file |
| | |
| | | <?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.SeVcRechargeMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeVcRecharge"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table se_vc_recharge--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="vc_id" jdbcType="BIGINT" property="vcId" /> |
| | | <result column="client_id" jdbcType="BIGINT" property="clientId" /> |
| | | <result column="money" jdbcType="FLOAT" property="money" /> |
| | | <result column="after_recharge" jdbcType="FLOAT" property="afterRecharge" /> |
| | | <result column="order_number" jdbcType="VARCHAR" property="orderNumber" /> |
| | | <result column="recharge_amount" jdbcType="FLOAT" property="rechargeAmount" /> |
| | | <result column="order_time" jdbcType="TIMESTAMP" property="orderTime" /> |
| | | <result column="recharge_time" jdbcType="TIMESTAMP" property="rechargeTime" /> |
| | | <result column="order_state" jdbcType="TINYINT" property="orderState" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, vc_id, client_id, money, after_recharge, order_number, recharge_amount, order_time, |
| | | recharge_time, order_state |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from se_vc_recharge |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from se_vc_recharge |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeVcRecharge"> |
| | | <!--@mbg.generated--> |
| | | insert into se_vc_recharge (id, vc_id, client_id, |
| | | money, after_recharge, order_number, |
| | | recharge_amount, order_time, recharge_time, |
| | | order_state) |
| | | values (#{id,jdbcType=BIGINT}, #{vcId,jdbcType=BIGINT}, #{clientId,jdbcType=BIGINT}, |
| | | #{money,jdbcType=FLOAT}, #{afterRecharge,jdbcType=FLOAT}, #{orderNumber,jdbcType=VARCHAR}, |
| | | #{rechargeAmount,jdbcType=FLOAT}, #{orderTime,jdbcType=TIMESTAMP}, #{rechargeTime,jdbcType=TIMESTAMP}, |
| | | #{orderState,jdbcType=TINYINT}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeVcRecharge"> |
| | | <!--@mbg.generated--> |
| | | insert into se_vc_recharge |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="vcId != null"> |
| | | vc_id, |
| | | </if> |
| | | <if test="clientId != null"> |
| | | client_id, |
| | | </if> |
| | | <if test="money != null"> |
| | | money, |
| | | </if> |
| | | <if test="afterRecharge != null"> |
| | | after_recharge, |
| | | </if> |
| | | <if test="orderNumber != null"> |
| | | order_number, |
| | | </if> |
| | | <if test="rechargeAmount != null"> |
| | | recharge_amount, |
| | | </if> |
| | | <if test="orderTime != null"> |
| | | order_time, |
| | | </if> |
| | | <if test="rechargeTime != null"> |
| | | recharge_time, |
| | | </if> |
| | | <if test="orderState != null"> |
| | | order_state, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="vcId != null"> |
| | | #{vcId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientId != null"> |
| | | #{clientId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | #{money,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="afterRecharge != null"> |
| | | #{afterRecharge,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="orderNumber != null"> |
| | | #{orderNumber,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="rechargeAmount != null"> |
| | | #{rechargeAmount,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="orderTime != null"> |
| | | #{orderTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="rechargeTime != null"> |
| | | #{rechargeTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="orderState != null"> |
| | | #{orderState,jdbcType=TINYINT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeVcRecharge"> |
| | | <!--@mbg.generated--> |
| | | update se_vc_recharge |
| | | <set> |
| | | <if test="vcId != null"> |
| | | vc_id = #{vcId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientId != null"> |
| | | client_id = #{clientId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | money = #{money,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="afterRecharge != null"> |
| | | after_recharge = #{afterRecharge,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="orderNumber != null"> |
| | | order_number = #{orderNumber,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="rechargeAmount != null"> |
| | | recharge_amount = #{rechargeAmount,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="orderTime != null"> |
| | | order_time = #{orderTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="rechargeTime != null"> |
| | | recharge_time = #{rechargeTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="orderState != null"> |
| | | order_state = #{orderState,jdbcType=TINYINT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeVcRecharge"> |
| | | <!--@mbg.generated--> |
| | | update se_vc_recharge |
| | | set vc_id = #{vcId,jdbcType=BIGINT}, |
| | | client_id = #{clientId,jdbcType=BIGINT}, |
| | | money = #{money,jdbcType=FLOAT}, |
| | | after_recharge = #{afterRecharge,jdbcType=FLOAT}, |
| | | order_number = #{orderNumber,jdbcType=VARCHAR}, |
| | | recharge_amount = #{rechargeAmount,jdbcType=FLOAT}, |
| | | order_time = #{orderTime,jdbcType=TIMESTAMP}, |
| | | recharge_time = #{rechargeTime,jdbcType=TIMESTAMP}, |
| | | order_state = #{orderState,jdbcType=TINYINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!--根据订单号获取虚拟卡充值对象--> |
| | | <select id="getVCRechargeByorderNumber" resultMap="BaseResultMap"> |
| | | SELECT |
| | | <include refid="Base_Column_List" /> |
| | | FROM se_vc_recharge |
| | | WHERE order_number = #{orderNumber} |
| | | LIMIT 0,1 |
| | | </select> |
| | | |
| | | <!--根据虚拟卡号获取订单列表--> |
| | | <select id="getOrders" resultType="com.dy.pipIrrGlobal.voSe.VoOrders"> |
| | | SELECT |
| | | order_number AS orderNumber, |
| | | recharge_amount AS rechargeAmount, |
| | | recharge_time AS rechargeTime |
| | | FROM se_vc_recharge |
| | | <where> |
| | | AND order_state = 2 |
| | | <if test = "virtualId != null and virtualId > 0"> |
| | | AND vc_id = #{virtualId} |
| | | </if> |
| | | </where> |
| | | ORDER BY order_number |
| | | </select> |
| | | |
| | | <!--根据订单号获取充值金额--> |
| | | <select id="getRechargeAmountByOrderNumber" resultType="java.lang.Double"> |
| | | SELECT |
| | | recharge_amount AS rechargeAmount |
| | | FROM se_vc_recharge |
| | | <where> |
| | | <if test = "orderNumber != null and orderNumber !=''"> |
| | | AND order_number = #{orderNumber} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |