基础代码生成

This commit is contained in:
lu7213 committed 2026-10-22 11:09:36 -04:00
1 parent 352d7d023f
commit 1c0544afe0
122 files changed
+21475

No files matched your search

@@ -0,0 +1,144 @@
<?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.RentTransactionMapper">
<resultMap type="RentTransaction" id="RentTransactionResult">
<result property="id" column="id" />
<result property="taskId" column="task_id" />
<result property="network" column="network" />
<result property="txId" column="tx_id" />
<result property="ownerAddress" column="owner_address" />
<result property="receiverAddress" column="receiver_address" />
<result property="transactionType" column="transaction_type" />
<result property="resourceType" column="resource_type" />
<result property="amountSun" column="amount_sun" />
<result property="verifiedTotalLimit" column="verified_total_limit" />
<result property="verifiedTotalWeight" column="verified_total_weight" />
<result property="verifiedResourceQuantity" column="verified_resource_quantity" />
<result property="baselineSun" column="baseline_sun" />
<result property="afterSun" column="after_sun" />
<result property="blockHeight" column="block_height" />
<result property="blockTime" column="block_time" />
<result property="status" column="status" />
<result property="evidence" column="evidence" />
<result property="expiresAt" column="expires_at" />
<result property="confirmedAt" column="confirmed_at" />
<result property="nextCheckAt" column="next_check_at" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentTransactionVo">
select id, task_id, network, tx_id, owner_address, receiver_address, transaction_type, resource_type, amount_sun, verified_total_limit, verified_total_weight, verified_resource_quantity, baseline_sun, after_sun, block_height, block_time, status, evidence, expires_at, confirmed_at, next_check_at, version, created_at, updated_at from rent_transaction
</sql>
<select id="selectRentTransactionList" parameterType="RentTransaction" resultMap="RentTransactionResult">
<include refid="selectRentTransactionVo"/>
<where>
<if test="ownerAddress != null and ownerAddress != ''"> and owner_address = #{ownerAddress}</if>
</where>
</select>
<select id="selectRentTransactionById" parameterType="Long" resultMap="RentTransactionResult">
<include refid="selectRentTransactionVo"/>
where id = #{id}
</select>
<insert id="insertRentTransaction" parameterType="RentTransaction" useGeneratedKeys="true" keyProperty="id">
insert into rent_transaction
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskId != null">task_id,</if>
<if test="network != null and network != ''">network,</if>
<if test="txId != null and txId != ''">tx_id,</if>
<if test="ownerAddress != null and ownerAddress != ''">owner_address,</if>
<if test="receiverAddress != null and receiverAddress != ''">receiver_address,</if>
<if test="transactionType != null and transactionType != ''">transaction_type,</if>
<if test="resourceType != null and resourceType != ''">resource_type,</if>
<if test="amountSun != null">amount_sun,</if>
<if test="verifiedTotalLimit != null">verified_total_limit,</if>
<if test="verifiedTotalWeight != null">verified_total_weight,</if>
<if test="verifiedResourceQuantity != null">verified_resource_quantity,</if>
<if test="baselineSun != null">baseline_sun,</if>
<if test="afterSun != null">after_sun,</if>
<if test="blockHeight != null">block_height,</if>
<if test="blockTime != null">block_time,</if>
<if test="status != null and status != ''">status,</if>
<if test="evidence != null">evidence,</if>
<if test="expiresAt != null">expires_at,</if>
<if test="confirmedAt != null">confirmed_at,</if>
<if test="nextCheckAt != null">next_check_at,</if>
<if test="version != null">version,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null">#{taskId},</if>
<if test="network != null and network != ''">#{network},</if>
<if test="txId != null and txId != ''">#{txId},</if>
<if test="ownerAddress != null and ownerAddress != ''">#{ownerAddress},</if>
<if test="receiverAddress != null and receiverAddress != ''">#{receiverAddress},</if>
<if test="transactionType != null and transactionType != ''">#{transactionType},</if>
<if test="resourceType != null and resourceType != ''">#{resourceType},</if>
<if test="amountSun != null">#{amountSun},</if>
<if test="verifiedTotalLimit != null">#{verifiedTotalLimit},</if>
<if test="verifiedTotalWeight != null">#{verifiedTotalWeight},</if>
<if test="verifiedResourceQuantity != null">#{verifiedResourceQuantity},</if>
<if test="baselineSun != null">#{baselineSun},</if>
<if test="afterSun != null">#{afterSun},</if>
<if test="blockHeight != null">#{blockHeight},</if>
<if test="blockTime != null">#{blockTime},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="evidence != null">#{evidence},</if>
<if test="expiresAt != null">#{expiresAt},</if>
<if test="confirmedAt != null">#{confirmedAt},</if>
<if test="nextCheckAt != null">#{nextCheckAt},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentTransaction" parameterType="RentTransaction">
update rent_transaction
<trim prefix="SET" suffixOverrides=",">
<if test="taskId != null">task_id = #{taskId},</if>
<if test="network != null and network != ''">network = #{network},</if>
<if test="txId != null and txId != ''">tx_id = #{txId},</if>
<if test="ownerAddress != null and ownerAddress != ''">owner_address = #{ownerAddress},</if>
<if test="receiverAddress != null and receiverAddress != ''">receiver_address = #{receiverAddress},</if>
<if test="transactionType != null and transactionType != ''">transaction_type = #{transactionType},</if>
<if test="resourceType != null and resourceType != ''">resource_type = #{resourceType},</if>
<if test="amountSun != null">amount_sun = #{amountSun},</if>
<if test="verifiedTotalLimit != null">verified_total_limit = #{verifiedTotalLimit},</if>
<if test="verifiedTotalWeight != null">verified_total_weight = #{verifiedTotalWeight},</if>
<if test="verifiedResourceQuantity != null">verified_resource_quantity = #{verifiedResourceQuantity},</if>
<if test="baselineSun != null">baseline_sun = #{baselineSun},</if>
<if test="afterSun != null">after_sun = #{afterSun},</if>
<if test="blockHeight != null">block_height = #{blockHeight},</if>
<if test="blockTime != null">block_time = #{blockTime},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="evidence != null">evidence = #{evidence},</if>
<if test="expiresAt != null">expires_at = #{expiresAt},</if>
<if test="confirmedAt != null">confirmed_at = #{confirmedAt},</if>
<if test="nextCheckAt != null">next_check_at = #{nextCheckAt},</if>
<if test="version != null">version = #{version},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteRentTransactionById" parameterType="Long">
delete from rent_transaction where id = #{id}
</delete>
<delete id="deleteRentTransactionByIds" parameterType="String">
delete from rent_transaction where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>