From ecef3df4890be54c1da2a8a4fc1c8c1f50f1c263 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期一, 07 四月 2025 15:41:47 +0800 Subject: [PATCH] 式样代码管理 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeVcRechargeMapper.xml | 199 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 199 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeVcRechargeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeVcRechargeMapper.xml new file mode 100644 index 0000000..c7f9188 --- /dev/null +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeVcRechargeMapper.xml @@ -0,0 +1,199 @@ +<?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> \ No newline at end of file -- Gitblit v1.8.0