添加资金流水等表逻辑
This commit is contained in:
1 parent
8d3cb18a46
commit
a8e2a507d9
23 files changed
+3305
-2
No files matched your search
@@ -0,0 +1,127 @@
|
||||
<?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.ruoyi.system.mapper.UsdtOrdersMapper">
|
||||
|
||||
<resultMap type="UsdtOrders" id="UsdtOrdersResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="tradeId" column="trade_id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="blockTransactionId" column="block_transaction_id" />
|
||||
<result property="actualAmount" column="actual_amount" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="token" column="token" />
|
||||
<result property="status" column="status" />
|
||||
<result property="notifyUrl" column="notify_url" />
|
||||
<result property="redirectUrl" column="redirect_url" />
|
||||
<result property="callbackNum" column="callback_num" />
|
||||
<result property="callbackConfirm" column="callback_confirm" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
<result property="deletedAt" column="deleted_at" />
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="settlementStatus" column="settlement_status" />
|
||||
<result property="userId" column="user_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUsdtOrdersVo">
|
||||
select id, trade_id, order_id, block_transaction_id, actual_amount, amount, token, status, notify_url, redirect_url, callback_num, callback_confirm, created_at, updated_at, deleted_at, app_id, settlement_status, user_id from orders
|
||||
</sql>
|
||||
|
||||
<select id="selectUsdtOrdersList" parameterType="UsdtOrders" resultMap="UsdtOrdersResult">
|
||||
<include refid="selectUsdtOrdersVo"/>
|
||||
<where>
|
||||
<if test="tradeId != null and tradeId != ''"> and trade_id like concat('%', #{tradeId}, '%')</if>
|
||||
<if test="orderId != null and orderId != ''"> and order_id like concat('%', #{orderId}, '%')</if>
|
||||
<if test="token != null and token != ''"> and token = #{token}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="callbackConfirm != null "> and callback_confirm = #{callbackConfirm}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="settlementStatus != null "> and settlement_status = #{settlementStatus}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUsdtOrdersById" parameterType="Long" resultMap="UsdtOrdersResult">
|
||||
<include refid="selectUsdtOrdersVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertUsdtOrders" parameterType="UsdtOrders" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into orders
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="tradeId != null and tradeId != ''">trade_id,</if>
|
||||
<if test="orderId != null and orderId != ''">order_id,</if>
|
||||
<if test="blockTransactionId != null">block_transaction_id,</if>
|
||||
<if test="actualAmount != null">actual_amount,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="token != null and token != ''">token,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="notifyUrl != null and notifyUrl != ''">notify_url,</if>
|
||||
<if test="redirectUrl != null">redirect_url,</if>
|
||||
<if test="callbackNum != null">callback_num,</if>
|
||||
<if test="callbackConfirm != null">callback_confirm,</if>
|
||||
<if test="createdAt != null">created_at,</if>
|
||||
<if test="updatedAt != null">updated_at,</if>
|
||||
<if test="deletedAt != null">deleted_at,</if>
|
||||
<if test="appId != null">app_id,</if>
|
||||
<if test="settlementStatus != null">settlement_status,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tradeId != null and tradeId != ''">#{tradeId},</if>
|
||||
<if test="orderId != null and orderId != ''">#{orderId},</if>
|
||||
<if test="blockTransactionId != null">#{blockTransactionId},</if>
|
||||
<if test="actualAmount != null">#{actualAmount},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="token != null and token != ''">#{token},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="notifyUrl != null and notifyUrl != ''">#{notifyUrl},</if>
|
||||
<if test="redirectUrl != null">#{redirectUrl},</if>
|
||||
<if test="callbackNum != null">#{callbackNum},</if>
|
||||
<if test="callbackConfirm != null">#{callbackConfirm},</if>
|
||||
<if test="createdAt != null">#{createdAt},</if>
|
||||
<if test="updatedAt != null">#{updatedAt},</if>
|
||||
<if test="deletedAt != null">#{deletedAt},</if>
|
||||
<if test="appId != null">#{appId},</if>
|
||||
<if test="settlementStatus != null">#{settlementStatus},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUsdtOrders" parameterType="UsdtOrders">
|
||||
update orders
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tradeId != null and tradeId != ''">trade_id = #{tradeId},</if>
|
||||
<if test="orderId != null and orderId != ''">order_id = #{orderId},</if>
|
||||
<if test="blockTransactionId != null">block_transaction_id = #{blockTransactionId},</if>
|
||||
<if test="actualAmount != null">actual_amount = #{actualAmount},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="token != null and token != ''">token = #{token},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="notifyUrl != null and notifyUrl != ''">notify_url = #{notifyUrl},</if>
|
||||
<if test="redirectUrl != null">redirect_url = #{redirectUrl},</if>
|
||||
<if test="callbackNum != null">callback_num = #{callbackNum},</if>
|
||||
<if test="callbackConfirm != null">callback_confirm = #{callbackConfirm},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
<if test="appId != null">app_id = #{appId},</if>
|
||||
<if test="settlementStatus != null">settlement_status = #{settlementStatus},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUsdtOrdersById" parameterType="Long">
|
||||
delete from orders where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUsdtOrdersByIds" parameterType="String">
|
||||
delete from orders where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user