流水表基础代码生成

This commit is contained in:
lu7213 committed 2026-10-13 09:33:50 -04:00
1 parent cdf32a86cb
commit 8cc7bd0c17
14 files changed
+3356

No files matched your search

@@ -0,0 +1,170 @@
<?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.AppsBalanceLedgerMapper">
<resultMap type="AppsBalanceLedger" id="AppsBalanceLedgerResult">
<result property="id" column="id" />
<result property="tradeNo" column="trade_no" />
<result property="idempotencyKey" column="idempotency_key" />
<result property="appId" column="app_id" />
<result property="userId" column="user_id" />
<result property="currency" column="currency" />
<result property="balanceType" column="balance_type" />
<result property="businessType" column="business_type" />
<result property="direction" column="direction" />
<result property="amount" column="amount" />
<result property="balanceBefore" column="balance_before" />
<result property="balanceAfter" column="balance_after" />
<result property="availableBefore" column="available_before" />
<result property="availableAfter" column="available_after" />
<result property="frozenBefore" column="frozen_before" />
<result property="frozenAfter" column="frozen_after" />
<result property="orderId" column="order_id" />
<result property="merchantOrderId" column="merchant_order_id" />
<result property="aggregationTaskId" column="aggregation_task_id" />
<result property="walletLedgerId" column="wallet_ledger_id" />
<result property="transactionId" column="transaction_id" />
<result property="operatorId" column="operator_id" />
<result property="requestId" column="request_id" />
<result property="remark" column="remark" />
<result property="createdAt" column="created_at" />
</resultMap>
<sql id="selectAppsBalanceLedgerVo">
select id, trade_no, idempotency_key, app_id, user_id, currency, balance_type, business_type, direction, amount, balance_before, balance_after, available_before, available_after, frozen_before, frozen_after, order_id, merchant_order_id, aggregation_task_id, wallet_ledger_id, transaction_id, operator_id, request_id, remark, created_at from apps_balance_ledger
</sql>
<select id="selectAppsBalanceLedgerList" parameterType="AppsBalanceLedger" resultMap="AppsBalanceLedgerResult">
<include refid="selectAppsBalanceLedgerVo"/>
<where>
<if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo}</if>
<if test="idempotencyKey != null and idempotencyKey != ''"> and idempotency_key = #{idempotencyKey}</if>
<if test="appId != null "> and app_id = #{appId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="currency != null and currency != ''"> and currency = #{currency}</if>
<if test="balanceType != null "> and balance_type = #{balanceType}</if>
<if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
<if test="direction != null "> and direction = #{direction}</if>
<if test="amount != null "> and amount = #{amount}</if>
<if test="balanceBefore != null "> and balance_before = #{balanceBefore}</if>
<if test="balanceAfter != null "> and balance_after = #{balanceAfter}</if>
<if test="availableBefore != null "> and available_before = #{availableBefore}</if>
<if test="availableAfter != null "> and available_after = #{availableAfter}</if>
<if test="frozenBefore != null "> and frozen_before = #{frozenBefore}</if>
<if test="frozenAfter != null "> and frozen_after = #{frozenAfter}</if>
<if test="orderId != null "> and order_id = #{orderId}</if>
<if test="merchantOrderId != null and merchantOrderId != ''"> and merchant_order_id = #{merchantOrderId}</if>
<if test="aggregationTaskId != null "> and aggregation_task_id = #{aggregationTaskId}</if>
<if test="walletLedgerId != null "> and wallet_ledger_id = #{walletLedgerId}</if>
<if test="transactionId != null and transactionId != ''"> and transaction_id = #{transactionId}</if>
<if test="operatorId != null "> and operator_id = #{operatorId}</if>
<if test="requestId != null and requestId != ''"> and request_id = #{requestId}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
</where>
</select>
<select id="selectAppsBalanceLedgerById" parameterType="Long" resultMap="AppsBalanceLedgerResult">
<include refid="selectAppsBalanceLedgerVo"/>
where id = #{id}
</select>
<insert id="insertAppsBalanceLedger" parameterType="AppsBalanceLedger" useGeneratedKeys="true" keyProperty="id">
insert into apps_balance_ledger
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tradeNo != null and tradeNo != ''">trade_no,</if>
<if test="idempotencyKey != null and idempotencyKey != ''">idempotency_key,</if>
<if test="appId != null">app_id,</if>
<if test="userId != null">user_id,</if>
<if test="currency != null and currency != ''">currency,</if>
<if test="balanceType != null">balance_type,</if>
<if test="businessType != null and businessType != ''">business_type,</if>
<if test="direction != null">direction,</if>
<if test="amount != null">amount,</if>
<if test="balanceBefore != null">balance_before,</if>
<if test="balanceAfter != null">balance_after,</if>
<if test="availableBefore != null">available_before,</if>
<if test="availableAfter != null">available_after,</if>
<if test="frozenBefore != null">frozen_before,</if>
<if test="frozenAfter != null">frozen_after,</if>
<if test="orderId != null">order_id,</if>
<if test="merchantOrderId != null">merchant_order_id,</if>
<if test="aggregationTaskId != null">aggregation_task_id,</if>
<if test="walletLedgerId != null">wallet_ledger_id,</if>
<if test="transactionId != null">transaction_id,</if>
<if test="operatorId != null">operator_id,</if>
<if test="requestId != null">request_id,</if>
<if test="remark != null">remark,</if>
<if test="createdAt != null">created_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tradeNo != null and tradeNo != ''">#{tradeNo},</if>
<if test="idempotencyKey != null and idempotencyKey != ''">#{idempotencyKey},</if>
<if test="appId != null">#{appId},</if>
<if test="userId != null">#{userId},</if>
<if test="currency != null and currency != ''">#{currency},</if>
<if test="balanceType != null">#{balanceType},</if>
<if test="businessType != null and businessType != ''">#{businessType},</if>
<if test="direction != null">#{direction},</if>
<if test="amount != null">#{amount},</if>
<if test="balanceBefore != null">#{balanceBefore},</if>
<if test="balanceAfter != null">#{balanceAfter},</if>
<if test="availableBefore != null">#{availableBefore},</if>
<if test="availableAfter != null">#{availableAfter},</if>
<if test="frozenBefore != null">#{frozenBefore},</if>
<if test="frozenAfter != null">#{frozenAfter},</if>
<if test="orderId != null">#{orderId},</if>
<if test="merchantOrderId != null">#{merchantOrderId},</if>
<if test="aggregationTaskId != null">#{aggregationTaskId},</if>
<if test="walletLedgerId != null">#{walletLedgerId},</if>
<if test="transactionId != null">#{transactionId},</if>
<if test="operatorId != null">#{operatorId},</if>
<if test="requestId != null">#{requestId},</if>
<if test="remark != null">#{remark},</if>
<if test="createdAt != null">#{createdAt},</if>
</trim>
</insert>
<update id="updateAppsBalanceLedger" parameterType="AppsBalanceLedger">
update apps_balance_ledger
<trim prefix="SET" suffixOverrides=",">
<if test="tradeNo != null and tradeNo != ''">trade_no = #{tradeNo},</if>
<if test="idempotencyKey != null and idempotencyKey != ''">idempotency_key = #{idempotencyKey},</if>
<if test="appId != null">app_id = #{appId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="currency != null and currency != ''">currency = #{currency},</if>
<if test="balanceType != null">balance_type = #{balanceType},</if>
<if test="businessType != null and businessType != ''">business_type = #{businessType},</if>
<if test="direction != null">direction = #{direction},</if>
<if test="amount != null">amount = #{amount},</if>
<if test="balanceBefore != null">balance_before = #{balanceBefore},</if>
<if test="balanceAfter != null">balance_after = #{balanceAfter},</if>
<if test="availableBefore != null">available_before = #{availableBefore},</if>
<if test="availableAfter != null">available_after = #{availableAfter},</if>
<if test="frozenBefore != null">frozen_before = #{frozenBefore},</if>
<if test="frozenAfter != null">frozen_after = #{frozenAfter},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="merchantOrderId != null">merchant_order_id = #{merchantOrderId},</if>
<if test="aggregationTaskId != null">aggregation_task_id = #{aggregationTaskId},</if>
<if test="walletLedgerId != null">wallet_ledger_id = #{walletLedgerId},</if>
<if test="transactionId != null">transaction_id = #{transactionId},</if>
<if test="operatorId != null">operator_id = #{operatorId},</if>
<if test="requestId != null">request_id = #{requestId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppsBalanceLedgerById" parameterType="Long">
delete from apps_balance_ledger where id = #{id}
</delete>
<delete id="deleteAppsBalanceLedgerByIds" parameterType="String">
delete from apps_balance_ledger where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,230 @@
<?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.WalletAddressLedgerMapper">
<resultMap type="WalletAddressLedger" id="WalletAddressLedgerResult">
<result property="id" column="id" />
<result property="tradeNo" column="trade_no" />
<result property="idempotencyKey" column="idempotency_key" />
<result property="appId" column="app_id" />
<result property="userId" column="user_id" />
<result property="walletAddressId" column="wallet_address_id" />
<result property="walletAddress" column="wallet_address" />
<result property="counterpartyAddress" column="counterparty_address" />
<result property="currency" column="currency" />
<result property="businessType" column="business_type" />
<result property="direction" column="direction" />
<result property="amount" column="amount" />
<result property="balanceBefore" column="balance_before" />
<result property="balanceAfter" column="balance_after" />
<result property="feeCurrency" column="fee_currency" />
<result property="feeAmount" column="fee_amount" />
<result property="energyUsed" column="energy_used" />
<result property="bandwidthUsed" column="bandwidth_used" />
<result property="burnedTrx" column="burned_trx" />
<result property="orderId" column="order_id" />
<result property="merchantOrderId" column="merchant_order_id" />
<result property="tradeId" column="trade_id" />
<result property="aggregationTaskId" column="aggregation_task_id" />
<result property="aggregationItemId" column="aggregation_item_id" />
<result property="transactionId" column="transaction_id" />
<result property="blockNumber" column="block_number" />
<result property="blockTime" column="block_time" />
<result property="confirmationCount" column="confirmation_count" />
<result property="status" column="status" />
<result property="sourceType" column="source_type" />
<result property="requestId" column="request_id" />
<result property="operatorId" column="operator_id" />
<result property="errorCode" column="error_code" />
<result property="errorMessage" column="error_message" />
<result property="remark" column="remark" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectWalletAddressLedgerVo">
select id, trade_no, idempotency_key, app_id, user_id, wallet_address_id, wallet_address, counterparty_address, currency, business_type, direction, amount, balance_before, balance_after, fee_currency, fee_amount, energy_used, bandwidth_used, burned_trx, order_id, merchant_order_id, trade_id, aggregation_task_id, aggregation_item_id, transaction_id, block_number, block_time, confirmation_count, status, source_type, request_id, operator_id, error_code, error_message, remark, created_at, updated_at from wallet_address_ledger
</sql>
<select id="selectWalletAddressLedgerList" parameterType="WalletAddressLedger" resultMap="WalletAddressLedgerResult">
<include refid="selectWalletAddressLedgerVo"/>
<where>
<if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo}</if>
<if test="idempotencyKey != null and idempotencyKey != ''"> and idempotency_key = #{idempotencyKey}</if>
<if test="appId != null "> and app_id = #{appId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="walletAddressId != null "> and wallet_address_id = #{walletAddressId}</if>
<if test="walletAddress != null and walletAddress != ''"> and wallet_address = #{walletAddress}</if>
<if test="counterpartyAddress != null and counterpartyAddress != ''"> and counterparty_address = #{counterpartyAddress}</if>
<if test="currency != null and currency != ''"> and currency = #{currency}</if>
<if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
<if test="direction != null "> and direction = #{direction}</if>
<if test="amount != null "> and amount = #{amount}</if>
<if test="balanceBefore != null "> and balance_before = #{balanceBefore}</if>
<if test="balanceAfter != null "> and balance_after = #{balanceAfter}</if>
<if test="feeCurrency != null and feeCurrency != ''"> and fee_currency = #{feeCurrency}</if>
<if test="feeAmount != null "> and fee_amount = #{feeAmount}</if>
<if test="energyUsed != null "> and energy_used = #{energyUsed}</if>
<if test="bandwidthUsed != null "> and bandwidth_used = #{bandwidthUsed}</if>
<if test="burnedTrx != null "> and burned_trx = #{burnedTrx}</if>
<if test="orderId != null "> and order_id = #{orderId}</if>
<if test="merchantOrderId != null and merchantOrderId != ''"> and merchant_order_id = #{merchantOrderId}</if>
<if test="tradeId != null and tradeId != ''"> and trade_id = #{tradeId}</if>
<if test="aggregationTaskId != null "> and aggregation_task_id = #{aggregationTaskId}</if>
<if test="aggregationItemId != null "> and aggregation_item_id = #{aggregationItemId}</if>
<if test="transactionId != null and transactionId != ''"> and transaction_id = #{transactionId}</if>
<if test="blockNumber != null "> and block_number = #{blockNumber}</if>
<if test="blockTime != null "> and block_time = #{blockTime}</if>
<if test="confirmationCount != null "> and confirmation_count = #{confirmationCount}</if>
<if test="status != null "> and status = #{status}</if>
<if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType}</if>
<if test="requestId != null and requestId != ''"> and request_id = #{requestId}</if>
<if test="operatorId != null "> and operator_id = #{operatorId}</if>
<if test="errorCode != null and errorCode != ''"> and error_code = #{errorCode}</if>
<if test="errorMessage != null and errorMessage != ''"> and error_message = #{errorMessage}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
</where>
</select>
<select id="selectWalletAddressLedgerById" parameterType="Long" resultMap="WalletAddressLedgerResult">
<include refid="selectWalletAddressLedgerVo"/>
where id = #{id}
</select>
<insert id="insertWalletAddressLedger" parameterType="WalletAddressLedger" useGeneratedKeys="true" keyProperty="id">
insert into wallet_address_ledger
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tradeNo != null and tradeNo != ''">trade_no,</if>
<if test="idempotencyKey != null and idempotencyKey != ''">idempotency_key,</if>
<if test="appId != null">app_id,</if>
<if test="userId != null">user_id,</if>
<if test="walletAddressId != null">wallet_address_id,</if>
<if test="walletAddress != null and walletAddress != ''">wallet_address,</if>
<if test="counterpartyAddress != null">counterparty_address,</if>
<if test="currency != null and currency != ''">currency,</if>
<if test="businessType != null and businessType != ''">business_type,</if>
<if test="direction != null">direction,</if>
<if test="amount != null">amount,</if>
<if test="balanceBefore != null">balance_before,</if>
<if test="balanceAfter != null">balance_after,</if>
<if test="feeCurrency != null">fee_currency,</if>
<if test="feeAmount != null">fee_amount,</if>
<if test="energyUsed != null">energy_used,</if>
<if test="bandwidthUsed != null">bandwidth_used,</if>
<if test="burnedTrx != null">burned_trx,</if>
<if test="orderId != null">order_id,</if>
<if test="merchantOrderId != null">merchant_order_id,</if>
<if test="tradeId != null">trade_id,</if>
<if test="aggregationTaskId != null">aggregation_task_id,</if>
<if test="aggregationItemId != null">aggregation_item_id,</if>
<if test="transactionId != null">transaction_id,</if>
<if test="blockNumber != null">block_number,</if>
<if test="blockTime != null">block_time,</if>
<if test="confirmationCount != null">confirmation_count,</if>
<if test="status != null">status,</if>
<if test="sourceType != null and sourceType != ''">source_type,</if>
<if test="requestId != null">request_id,</if>
<if test="operatorId != null">operator_id,</if>
<if test="errorCode != null">error_code,</if>
<if test="errorMessage != null">error_message,</if>
<if test="remark != null">remark,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tradeNo != null and tradeNo != ''">#{tradeNo},</if>
<if test="idempotencyKey != null and idempotencyKey != ''">#{idempotencyKey},</if>
<if test="appId != null">#{appId},</if>
<if test="userId != null">#{userId},</if>
<if test="walletAddressId != null">#{walletAddressId},</if>
<if test="walletAddress != null and walletAddress != ''">#{walletAddress},</if>
<if test="counterpartyAddress != null">#{counterpartyAddress},</if>
<if test="currency != null and currency != ''">#{currency},</if>
<if test="businessType != null and businessType != ''">#{businessType},</if>
<if test="direction != null">#{direction},</if>
<if test="amount != null">#{amount},</if>
<if test="balanceBefore != null">#{balanceBefore},</if>
<if test="balanceAfter != null">#{balanceAfter},</if>
<if test="feeCurrency != null">#{feeCurrency},</if>
<if test="feeAmount != null">#{feeAmount},</if>
<if test="energyUsed != null">#{energyUsed},</if>
<if test="bandwidthUsed != null">#{bandwidthUsed},</if>
<if test="burnedTrx != null">#{burnedTrx},</if>
<if test="orderId != null">#{orderId},</if>
<if test="merchantOrderId != null">#{merchantOrderId},</if>
<if test="tradeId != null">#{tradeId},</if>
<if test="aggregationTaskId != null">#{aggregationTaskId},</if>
<if test="aggregationItemId != null">#{aggregationItemId},</if>
<if test="transactionId != null">#{transactionId},</if>
<if test="blockNumber != null">#{blockNumber},</if>
<if test="blockTime != null">#{blockTime},</if>
<if test="confirmationCount != null">#{confirmationCount},</if>
<if test="status != null">#{status},</if>
<if test="sourceType != null and sourceType != ''">#{sourceType},</if>
<if test="requestId != null">#{requestId},</if>
<if test="operatorId != null">#{operatorId},</if>
<if test="errorCode != null">#{errorCode},</if>
<if test="errorMessage != null">#{errorMessage},</if>
<if test="remark != null">#{remark},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateWalletAddressLedger" parameterType="WalletAddressLedger">
update wallet_address_ledger
<trim prefix="SET" suffixOverrides=",">
<if test="tradeNo != null and tradeNo != ''">trade_no = #{tradeNo},</if>
<if test="idempotencyKey != null and idempotencyKey != ''">idempotency_key = #{idempotencyKey},</if>
<if test="appId != null">app_id = #{appId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="walletAddressId != null">wallet_address_id = #{walletAddressId},</if>
<if test="walletAddress != null and walletAddress != ''">wallet_address = #{walletAddress},</if>
<if test="counterpartyAddress != null">counterparty_address = #{counterpartyAddress},</if>
<if test="currency != null and currency != ''">currency = #{currency},</if>
<if test="businessType != null and businessType != ''">business_type = #{businessType},</if>
<if test="direction != null">direction = #{direction},</if>
<if test="amount != null">amount = #{amount},</if>
<if test="balanceBefore != null">balance_before = #{balanceBefore},</if>
<if test="balanceAfter != null">balance_after = #{balanceAfter},</if>
<if test="feeCurrency != null">fee_currency = #{feeCurrency},</if>
<if test="feeAmount != null">fee_amount = #{feeAmount},</if>
<if test="energyUsed != null">energy_used = #{energyUsed},</if>
<if test="bandwidthUsed != null">bandwidth_used = #{bandwidthUsed},</if>
<if test="burnedTrx != null">burned_trx = #{burnedTrx},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="merchantOrderId != null">merchant_order_id = #{merchantOrderId},</if>
<if test="tradeId != null">trade_id = #{tradeId},</if>
<if test="aggregationTaskId != null">aggregation_task_id = #{aggregationTaskId},</if>
<if test="aggregationItemId != null">aggregation_item_id = #{aggregationItemId},</if>
<if test="transactionId != null">transaction_id = #{transactionId},</if>
<if test="blockNumber != null">block_number = #{blockNumber},</if>
<if test="blockTime != null">block_time = #{blockTime},</if>
<if test="confirmationCount != null">confirmation_count = #{confirmationCount},</if>
<if test="status != null">status = #{status},</if>
<if test="sourceType != null and sourceType != ''">source_type = #{sourceType},</if>
<if test="requestId != null">request_id = #{requestId},</if>
<if test="operatorId != null">operator_id = #{operatorId},</if>
<if test="errorCode != null">error_code = #{errorCode},</if>
<if test="errorMessage != null">error_message = #{errorMessage},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteWalletAddressLedgerById" parameterType="Long">
delete from wallet_address_ledger where id = #{id}
</delete>
<delete id="deleteWalletAddressLedgerByIds" parameterType="String">
delete from wallet_address_ledger where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>