基础代码生成

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,88 @@
<?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.RentAccountMapper">
<resultMap type="RentAccount" id="RentAccountResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="network" column="network" />
<result property="availableAmount" column="available_amount" />
<result property="frozenAmount" column="frozen_amount" />
<result property="supplierPendingAmount" column="supplier_pending_amount" />
<result property="status" column="status" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentAccountVo">
select id, user_id, network, available_amount, frozen_amount, supplier_pending_amount, status, version, created_at, updated_at from rent_account
</sql>
<select id="selectRentAccountList" parameterType="RentAccount" resultMap="RentAccountResult">
<include refid="selectRentAccountVo"/>
<where>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectRentAccountById" parameterType="Long" resultMap="RentAccountResult">
<include refid="selectRentAccountVo"/>
where id = #{id}
</select>
<insert id="insertRentAccount" parameterType="RentAccount" useGeneratedKeys="true" keyProperty="id">
insert into rent_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="network != null and network != ''">network,</if>
<if test="availableAmount != null">available_amount,</if>
<if test="frozenAmount != null">frozen_amount,</if>
<if test="supplierPendingAmount != null">supplier_pending_amount,</if>
<if test="status != null and status != ''">status,</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="userId != null">#{userId},</if>
<if test="network != null and network != ''">#{network},</if>
<if test="availableAmount != null">#{availableAmount},</if>
<if test="frozenAmount != null">#{frozenAmount},</if>
<if test="supplierPendingAmount != null">#{supplierPendingAmount},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentAccount" parameterType="RentAccount">
update rent_account
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="network != null and network != ''">network = #{network},</if>
<if test="availableAmount != null">available_amount = #{availableAmount},</if>
<if test="frozenAmount != null">frozen_amount = #{frozenAmount},</if>
<if test="supplierPendingAmount != null">supplier_pending_amount = #{supplierPendingAmount},</if>
<if test="status != null and status != ''">status = #{status},</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="deleteRentAccountById" parameterType="Long">
delete from rent_account where id = #{id}
</delete>
<delete id="deleteRentAccountByIds" parameterType="String">
delete from rent_account where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,80 @@
<?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.RentAppMapper">
<resultMap type="RentApp" id="RentAppResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="name" column="name" />
<result property="status" column="status" />
<result property="notifyUrl" column="notify_url" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentAppVo">
select id, user_id, name, status, notify_url, version, created_at, updated_at from rent_app
</sql>
<select id="selectRentAppList" parameterType="RentApp" resultMap="RentAppResult">
<include refid="selectRentAppVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
</where>
</select>
<select id="selectRentAppById" parameterType="Long" resultMap="RentAppResult">
<include refid="selectRentAppVo"/>
where id = #{id}
</select>
<insert id="insertRentApp" parameterType="RentApp" useGeneratedKeys="true" keyProperty="id">
insert into rent_app
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="name != null and name != ''">name,</if>
<if test="status != null and status != ''">status,</if>
<if test="notifyUrl != null">notify_url,</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="userId != null">#{userId},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="notifyUrl != null">#{notifyUrl},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentApp" parameterType="RentApp">
update rent_app
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="notifyUrl != null">notify_url = #{notifyUrl},</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="deleteRentAppById" parameterType="Long">
delete from rent_app where id = #{id}
</delete>
<delete id="deleteRentAppByIds" parameterType="String">
delete from rent_app where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,96 @@
<?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.RentCredentialMapper">
<resultMap type="RentCredential" id="RentCredentialResult">
<result property="id" column="id" />
<result property="ownerType" column="owner_type" />
<result property="ownerId" column="owner_id" />
<result property="apiKey" column="api_key" />
<result property="apiSecret" column="api_secret" />
<result property="masterKeyVersion" column="master_key_version" />
<result property="status" column="status" />
<result property="expiresAt" column="expires_at" />
<result property="revokedAt" column="revoked_at" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentCredentialVo">
select id, owner_type, owner_id, api_key, api_secret, master_key_version, status, expires_at, revoked_at, version, created_at, updated_at from rent_credential
</sql>
<select id="selectRentCredentialList" parameterType="RentCredential" resultMap="RentCredentialResult">
<include refid="selectRentCredentialVo"/>
<where>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectRentCredentialById" parameterType="Long" resultMap="RentCredentialResult">
<include refid="selectRentCredentialVo"/>
where id = #{id}
</select>
<insert id="insertRentCredential" parameterType="RentCredential" useGeneratedKeys="true" keyProperty="id">
insert into rent_credential
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ownerType != null and ownerType != ''">owner_type,</if>
<if test="ownerId != null">owner_id,</if>
<if test="apiKey != null and apiKey != ''">api_key,</if>
<if test="apiSecret != null and apiSecret != ''">api_secret,</if>
<if test="masterKeyVersion != null and masterKeyVersion != ''">master_key_version,</if>
<if test="status != null and status != ''">status,</if>
<if test="expiresAt != null">expires_at,</if>
<if test="revokedAt != null">revoked_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="ownerType != null and ownerType != ''">#{ownerType},</if>
<if test="ownerId != null">#{ownerId},</if>
<if test="apiKey != null and apiKey != ''">#{apiKey},</if>
<if test="apiSecret != null and apiSecret != ''">#{apiSecret},</if>
<if test="masterKeyVersion != null and masterKeyVersion != ''">#{masterKeyVersion},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="expiresAt != null">#{expiresAt},</if>
<if test="revokedAt != null">#{revokedAt},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentCredential" parameterType="RentCredential">
update rent_credential
<trim prefix="SET" suffixOverrides=",">
<if test="ownerType != null and ownerType != ''">owner_type = #{ownerType},</if>
<if test="ownerId != null">owner_id = #{ownerId},</if>
<if test="apiKey != null and apiKey != ''">api_key = #{apiKey},</if>
<if test="apiSecret != null and apiSecret != ''">api_secret = #{apiSecret},</if>
<if test="masterKeyVersion != null and masterKeyVersion != ''">master_key_version = #{masterKeyVersion},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="expiresAt != null">expires_at = #{expiresAt},</if>
<if test="revokedAt != null">revoked_at = #{revokedAt},</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="deleteRentCredentialById" parameterType="Long">
delete from rent_credential where id = #{id}
</delete>
<delete id="deleteRentCredentialByIds" parameterType="String">
delete from rent_credential where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,96 @@
<?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.RentEventMapper">
<resultMap type="RentEvent" id="RentEventResult">
<result property="id" column="id" />
<result property="eventNo" column="event_no" />
<result property="objectType" column="object_type" />
<result property="objectId" column="object_id" />
<result property="action" column="action" />
<result property="actorUserId" column="actor_user_id" />
<result property="nodeId" column="node_id" />
<result property="detail" column="detail" />
<result property="reason" column="reason" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentEventVo">
select id, event_no, object_type, object_id, action, actor_user_id, node_id, detail, reason, version, created_at, updated_at from rent_event
</sql>
<select id="selectRentEventList" parameterType="RentEvent" resultMap="RentEventResult">
<include refid="selectRentEventVo"/>
<where>
<if test="eventNo != null and eventNo != ''"> and event_no = #{eventNo}</if>
</where>
</select>
<select id="selectRentEventById" parameterType="Long" resultMap="RentEventResult">
<include refid="selectRentEventVo"/>
where id = #{id}
</select>
<insert id="insertRentEvent" parameterType="RentEvent" useGeneratedKeys="true" keyProperty="id">
insert into rent_event
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="eventNo != null and eventNo != ''">event_no,</if>
<if test="objectType != null and objectType != ''">object_type,</if>
<if test="objectId != null">object_id,</if>
<if test="action != null and action != ''">action,</if>
<if test="actorUserId != null">actor_user_id,</if>
<if test="nodeId != null">node_id,</if>
<if test="detail != null">detail,</if>
<if test="reason != null and reason != ''">reason,</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="eventNo != null and eventNo != ''">#{eventNo},</if>
<if test="objectType != null and objectType != ''">#{objectType},</if>
<if test="objectId != null">#{objectId},</if>
<if test="action != null and action != ''">#{action},</if>
<if test="actorUserId != null">#{actorUserId},</if>
<if test="nodeId != null">#{nodeId},</if>
<if test="detail != null">#{detail},</if>
<if test="reason != null and reason != ''">#{reason},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentEvent" parameterType="RentEvent">
update rent_event
<trim prefix="SET" suffixOverrides=",">
<if test="eventNo != null and eventNo != ''">event_no = #{eventNo},</if>
<if test="objectType != null and objectType != ''">object_type = #{objectType},</if>
<if test="objectId != null">object_id = #{objectId},</if>
<if test="action != null and action != ''">action = #{action},</if>
<if test="actorUserId != null">actor_user_id = #{actorUserId},</if>
<if test="nodeId != null">node_id = #{nodeId},</if>
<if test="detail != null">detail = #{detail},</if>
<if test="reason != null and reason != ''">reason = #{reason},</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="deleteRentEventById" parameterType="Long">
delete from rent_event where id = #{id}
</delete>
<delete id="deleteRentEventByIds" parameterType="String">
delete from rent_event where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,132 @@
<?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.RentLedgerMapper">
<resultMap type="RentLedger" id="RentLedgerResult">
<result property="id" column="id" />
<result property="accountId" column="account_id" />
<result property="businessKey" column="business_key" />
<result property="eventType" column="event_type" />
<result property="deltaAvailable" column="delta_available" />
<result property="deltaFrozen" column="delta_frozen" />
<result property="deltaSupplierPending" column="delta_supplier_pending" />
<result property="deltaPlatformFee" column="delta_platform_fee" />
<result property="afterAvailable" column="after_available" />
<result property="afterFrozen" column="after_frozen" />
<result property="afterSupplierPending" column="after_supplier_pending" />
<result property="orderId" column="order_id" />
<result property="settlementId" column="settlement_id" />
<result property="refundId" column="refund_id" />
<result property="reversalOfId" column="reversal_of_id" />
<result property="operatorUserId" column="operator_user_id" />
<result property="evidenceRef" column="evidence_ref" />
<result property="reason" column="reason" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentLedgerVo">
select id, account_id, business_key, event_type, delta_available, delta_frozen, delta_supplier_pending, delta_platform_fee, after_available, after_frozen, after_supplier_pending, order_id, settlement_id, refund_id, reversal_of_id, operator_user_id, evidence_ref, reason, version, created_at, updated_at from rent_ledger
</sql>
<select id="selectRentLedgerList" parameterType="RentLedger" resultMap="RentLedgerResult">
<include refid="selectRentLedgerVo"/>
<where>
<if test="reason != null and reason != ''"> and reason = #{reason}</if>
</where>
</select>
<select id="selectRentLedgerById" parameterType="Long" resultMap="RentLedgerResult">
<include refid="selectRentLedgerVo"/>
where id = #{id}
</select>
<insert id="insertRentLedger" parameterType="RentLedger" useGeneratedKeys="true" keyProperty="id">
insert into rent_ledger
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="accountId != null">account_id,</if>
<if test="businessKey != null and businessKey != ''">business_key,</if>
<if test="eventType != null and eventType != ''">event_type,</if>
<if test="deltaAvailable != null">delta_available,</if>
<if test="deltaFrozen != null">delta_frozen,</if>
<if test="deltaSupplierPending != null">delta_supplier_pending,</if>
<if test="deltaPlatformFee != null">delta_platform_fee,</if>
<if test="afterAvailable != null">after_available,</if>
<if test="afterFrozen != null">after_frozen,</if>
<if test="afterSupplierPending != null">after_supplier_pending,</if>
<if test="orderId != null">order_id,</if>
<if test="settlementId != null">settlement_id,</if>
<if test="refundId != null">refund_id,</if>
<if test="reversalOfId != null">reversal_of_id,</if>
<if test="operatorUserId != null">operator_user_id,</if>
<if test="evidenceRef != null">evidence_ref,</if>
<if test="reason != null and reason != ''">reason,</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="accountId != null">#{accountId},</if>
<if test="businessKey != null and businessKey != ''">#{businessKey},</if>
<if test="eventType != null and eventType != ''">#{eventType},</if>
<if test="deltaAvailable != null">#{deltaAvailable},</if>
<if test="deltaFrozen != null">#{deltaFrozen},</if>
<if test="deltaSupplierPending != null">#{deltaSupplierPending},</if>
<if test="deltaPlatformFee != null">#{deltaPlatformFee},</if>
<if test="afterAvailable != null">#{afterAvailable},</if>
<if test="afterFrozen != null">#{afterFrozen},</if>
<if test="afterSupplierPending != null">#{afterSupplierPending},</if>
<if test="orderId != null">#{orderId},</if>
<if test="settlementId != null">#{settlementId},</if>
<if test="refundId != null">#{refundId},</if>
<if test="reversalOfId != null">#{reversalOfId},</if>
<if test="operatorUserId != null">#{operatorUserId},</if>
<if test="evidenceRef != null">#{evidenceRef},</if>
<if test="reason != null and reason != ''">#{reason},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentLedger" parameterType="RentLedger">
update rent_ledger
<trim prefix="SET" suffixOverrides=",">
<if test="accountId != null">account_id = #{accountId},</if>
<if test="businessKey != null and businessKey != ''">business_key = #{businessKey},</if>
<if test="eventType != null and eventType != ''">event_type = #{eventType},</if>
<if test="deltaAvailable != null">delta_available = #{deltaAvailable},</if>
<if test="deltaFrozen != null">delta_frozen = #{deltaFrozen},</if>
<if test="deltaSupplierPending != null">delta_supplier_pending = #{deltaSupplierPending},</if>
<if test="deltaPlatformFee != null">delta_platform_fee = #{deltaPlatformFee},</if>
<if test="afterAvailable != null">after_available = #{afterAvailable},</if>
<if test="afterFrozen != null">after_frozen = #{afterFrozen},</if>
<if test="afterSupplierPending != null">after_supplier_pending = #{afterSupplierPending},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="settlementId != null">settlement_id = #{settlementId},</if>
<if test="refundId != null">refund_id = #{refundId},</if>
<if test="reversalOfId != null">reversal_of_id = #{reversalOfId},</if>
<if test="operatorUserId != null">operator_user_id = #{operatorUserId},</if>
<if test="evidenceRef != null">evidence_ref = #{evidenceRef},</if>
<if test="reason != null and reason != ''">reason = #{reason},</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="deleteRentLedgerById" parameterType="Long">
delete from rent_ledger where id = #{id}
</delete>
<delete id="deleteRentLedgerByIds" parameterType="String">
delete from rent_ledger where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,145 @@
<?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.RentNodeMapper">
<resultMap type="RentNode" id="RentNodeResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="nodeNo" column="node_no" />
<result property="name" column="name" />
<result property="status" column="status" />
<result property="agentVersion" column="agent_version" />
<result property="heartbeatAt" column="heartbeat_at" />
<result property="connectionStatus" column="connection_status" />
<result property="sessionId" column="session_id" />
<result property="sessionEpoch" column="session_epoch" />
<result property="serverInstanceId" column="server_instance_id" />
<result property="connectedAt" column="connected_at" />
<result property="disconnectedAt" column="disconnected_at" />
<result property="heartbeatIntervalSeconds" column="heartbeat_interval_seconds" />
<result property="heartbeatTimeoutSeconds" column="heartbeat_timeout_seconds" />
<result property="heartbeatExpiresAt" column="heartbeat_expires_at" />
<result property="lastClientSequence" column="last_client_sequence" />
<result property="createdBy" column="created_by" />
<result property="approvedBy" column="approved_by" />
<result property="approvedAt" column="approved_at" />
<result property="remark" column="remark" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentNodeVo">
select id, user_id, node_no, name, status, agent_version, heartbeat_at, connection_status, session_id, session_epoch, server_instance_id, connected_at, disconnected_at, heartbeat_interval_seconds, heartbeat_timeout_seconds, heartbeat_expires_at, last_client_sequence, created_by, approved_by, approved_at, remark, version, created_at, updated_at from rent_node
</sql>
<select id="selectRentNodeList" parameterType="RentNode" resultMap="RentNodeResult">
<include refid="selectRentNodeVo"/>
<where>
<if test="nodeNo != null and nodeNo != ''"> and node_no = #{nodeNo}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
</where>
</select>
<select id="selectRentNodeById" parameterType="Long" resultMap="RentNodeResult">
<include refid="selectRentNodeVo"/>
where id = #{id}
</select>
<insert id="insertRentNode" parameterType="RentNode" useGeneratedKeys="true" keyProperty="id">
insert into rent_node
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="nodeNo != null and nodeNo != ''">node_no,</if>
<if test="name != null and name != ''">name,</if>
<if test="status != null and status != ''">status,</if>
<if test="agentVersion != null and agentVersion != ''">agent_version,</if>
<if test="heartbeatAt != null">heartbeat_at,</if>
<if test="connectionStatus != null and connectionStatus != ''">connection_status,</if>
<if test="sessionId != null">session_id,</if>
<if test="sessionEpoch != null">session_epoch,</if>
<if test="serverInstanceId != null">server_instance_id,</if>
<if test="connectedAt != null">connected_at,</if>
<if test="disconnectedAt != null">disconnected_at,</if>
<if test="heartbeatIntervalSeconds != null">heartbeat_interval_seconds,</if>
<if test="heartbeatTimeoutSeconds != null">heartbeat_timeout_seconds,</if>
<if test="heartbeatExpiresAt != null">heartbeat_expires_at,</if>
<if test="lastClientSequence != null">last_client_sequence,</if>
<if test="createdBy != null">created_by,</if>
<if test="approvedBy != null">approved_by,</if>
<if test="approvedAt != null">approved_at,</if>
<if test="remark != null">remark,</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="userId != null">#{userId},</if>
<if test="nodeNo != null and nodeNo != ''">#{nodeNo},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="agentVersion != null and agentVersion != ''">#{agentVersion},</if>
<if test="heartbeatAt != null">#{heartbeatAt},</if>
<if test="connectionStatus != null and connectionStatus != ''">#{connectionStatus},</if>
<if test="sessionId != null">#{sessionId},</if>
<if test="sessionEpoch != null">#{sessionEpoch},</if>
<if test="serverInstanceId != null">#{serverInstanceId},</if>
<if test="connectedAt != null">#{connectedAt},</if>
<if test="disconnectedAt != null">#{disconnectedAt},</if>
<if test="heartbeatIntervalSeconds != null">#{heartbeatIntervalSeconds},</if>
<if test="heartbeatTimeoutSeconds != null">#{heartbeatTimeoutSeconds},</if>
<if test="heartbeatExpiresAt != null">#{heartbeatExpiresAt},</if>
<if test="lastClientSequence != null">#{lastClientSequence},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="approvedBy != null">#{approvedBy},</if>
<if test="approvedAt != null">#{approvedAt},</if>
<if test="remark != null">#{remark},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentNode" parameterType="RentNode">
update rent_node
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="nodeNo != null and nodeNo != ''">node_no = #{nodeNo},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="agentVersion != null and agentVersion != ''">agent_version = #{agentVersion},</if>
<if test="heartbeatAt != null">heartbeat_at = #{heartbeatAt},</if>
<if test="connectionStatus != null and connectionStatus != ''">connection_status = #{connectionStatus},</if>
<if test="sessionId != null">session_id = #{sessionId},</if>
<if test="sessionEpoch != null">session_epoch = #{sessionEpoch},</if>
<if test="serverInstanceId != null">server_instance_id = #{serverInstanceId},</if>
<if test="connectedAt != null">connected_at = #{connectedAt},</if>
<if test="disconnectedAt != null">disconnected_at = #{disconnectedAt},</if>
<if test="heartbeatIntervalSeconds != null">heartbeat_interval_seconds = #{heartbeatIntervalSeconds},</if>
<if test="heartbeatTimeoutSeconds != null">heartbeat_timeout_seconds = #{heartbeatTimeoutSeconds},</if>
<if test="heartbeatExpiresAt != null">heartbeat_expires_at = #{heartbeatExpiresAt},</if>
<if test="lastClientSequence != null">last_client_sequence = #{lastClientSequence},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="approvedBy != null">approved_by = #{approvedBy},</if>
<if test="approvedAt != null">approved_at = #{approvedAt},</if>
<if test="remark != null">remark = #{remark},</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="deleteRentNodeById" parameterType="Long">
delete from rent_node where id = #{id}
</delete>
<delete id="deleteRentNodeByIds" parameterType="String">
delete from rent_node where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,81 @@
<?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.RentNonceMapper">
<resultMap type="RentNonce" id="RentNonceResult">
<result property="id" column="id" />
<result property="apiKey" column="api_key" />
<result property="scope" column="scope" />
<result property="nonce" column="nonce" />
<result property="expiresAt" column="expires_at" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentNonceVo">
select id, api_key, scope, nonce, expires_at, version, created_at, updated_at from rent_nonce
</sql>
<select id="selectRentNonceList" parameterType="RentNonce" resultMap="RentNonceResult">
<include refid="selectRentNonceVo"/>
<where>
<if test="scope != null and scope != ''"> and scope = #{scope}</if>
<if test="nonce != null and nonce != ''"> and nonce = #{nonce}</if>
</where>
</select>
<select id="selectRentNonceById" parameterType="Long" resultMap="RentNonceResult">
<include refid="selectRentNonceVo"/>
where id = #{id}
</select>
<insert id="insertRentNonce" parameterType="RentNonce" useGeneratedKeys="true" keyProperty="id">
insert into rent_nonce
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="apiKey != null and apiKey != ''">api_key,</if>
<if test="scope != null and scope != ''">scope,</if>
<if test="nonce != null and nonce != ''">nonce,</if>
<if test="expiresAt != null">expires_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="apiKey != null and apiKey != ''">#{apiKey},</if>
<if test="scope != null and scope != ''">#{scope},</if>
<if test="nonce != null and nonce != ''">#{nonce},</if>
<if test="expiresAt != null">#{expiresAt},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentNonce" parameterType="RentNonce">
update rent_nonce
<trim prefix="SET" suffixOverrides=",">
<if test="apiKey != null and apiKey != ''">api_key = #{apiKey},</if>
<if test="scope != null and scope != ''">scope = #{scope},</if>
<if test="nonce != null and nonce != ''">nonce = #{nonce},</if>
<if test="expiresAt != null">expires_at = #{expiresAt},</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="deleteRentNonceById" parameterType="Long">
delete from rent_nonce where id = #{id}
</delete>
<delete id="deleteRentNonceByIds" parameterType="String">
delete from rent_nonce where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,212 @@
<?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.RentOrderMapper">
<resultMap type="RentOrder" id="RentOrderResult">
<result property="id" column="id" />
<result property="orderNo" column="order_no" />
<result property="appId" column="app_id" />
<result property="merchantOrderNo" column="merchant_order_no" />
<result property="requestHash" column="request_hash" />
<result property="packageId" column="package_id" />
<result property="network" column="network" />
<result property="receiverAddress" column="receiver_address" />
<result property="resourceType" column="resource_type" />
<result property="resourceQuantity" column="resource_quantity" />
<result property="redundancyPercent" column="redundancy_percent" />
<result property="targetResourceQuantity" column="target_resource_quantity" />
<result property="durationSeconds" column="duration_seconds" />
<result property="saleAmount" column="sale_amount" />
<result property="supplierAmount" column="supplier_amount" />
<result property="supplierFeePercent" column="supplier_fee_percent" />
<result property="supplierFeeAmount" column="supplier_fee_amount" />
<result property="supplierNetAmount" column="supplier_net_amount" />
<result property="supplierReversedAmount" column="supplier_reversed_amount" />
<result property="supplierFeeReversedAmount" column="supplier_fee_reversed_amount" />
<result property="supplierFeeReturnedAmount" column="supplier_fee_returned_amount" />
<result property="packageSnapshot" column="package_snapshot" />
<result property="status" column="status" />
<result property="walletId" column="wallet_id" />
<result property="supplierUserId" column="supplier_user_id" />
<result property="supplierAccountId" column="supplier_account_id" />
<result property="relationSlot" column="relation_slot" />
<result property="payerAccountId" column="payer_account_id" />
<result property="fundStatus" column="fund_status" />
<result property="refundedAmount" column="refunded_amount" />
<result property="dispatchDeadline" column="dispatch_deadline" />
<result property="serviceStartedAt" column="service_started_at" />
<result property="serviceExpiresAt" column="service_expires_at" />
<result property="reclaimStatus" column="reclaim_status" />
<result property="nextReclaimAt" column="next_reclaim_at" />
<result property="notifyUrl" column="notify_url" />
<result property="errorCode" column="error_code" />
<result property="remark" column="remark" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentOrderVo">
select id, order_no, app_id, merchant_order_no, request_hash, package_id, network, receiver_address, resource_type, resource_quantity, redundancy_percent, target_resource_quantity, duration_seconds, sale_amount, supplier_amount, supplier_fee_percent, supplier_fee_amount, supplier_net_amount, supplier_reversed_amount, supplier_fee_reversed_amount, supplier_fee_returned_amount, package_snapshot, status, wallet_id, supplier_user_id, supplier_account_id, relation_slot, payer_account_id, fund_status, refunded_amount, dispatch_deadline, service_started_at, service_expires_at, reclaim_status, next_reclaim_at, notify_url, error_code, remark, version, created_at, updated_at from rent_order
</sql>
<select id="selectRentOrderList" parameterType="RentOrder" resultMap="RentOrderResult">
<include refid="selectRentOrderVo"/>
<where>
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
</where>
</select>
<select id="selectRentOrderById" parameterType="Long" resultMap="RentOrderResult">
<include refid="selectRentOrderVo"/>
where id = #{id}
</select>
<insert id="insertRentOrder" parameterType="RentOrder" useGeneratedKeys="true" keyProperty="id">
insert into rent_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">order_no,</if>
<if test="appId != null">app_id,</if>
<if test="merchantOrderNo != null and merchantOrderNo != ''">merchant_order_no,</if>
<if test="requestHash != null and requestHash != ''">request_hash,</if>
<if test="packageId != null">package_id,</if>
<if test="network != null and network != ''">network,</if>
<if test="receiverAddress != null and receiverAddress != ''">receiver_address,</if>
<if test="resourceType != null and resourceType != ''">resource_type,</if>
<if test="resourceQuantity != null">resource_quantity,</if>
<if test="redundancyPercent != null">redundancy_percent,</if>
<if test="targetResourceQuantity != null">target_resource_quantity,</if>
<if test="durationSeconds != null">duration_seconds,</if>
<if test="saleAmount != null">sale_amount,</if>
<if test="supplierAmount != null">supplier_amount,</if>
<if test="supplierFeePercent != null">supplier_fee_percent,</if>
<if test="supplierFeeAmount != null">supplier_fee_amount,</if>
<if test="supplierNetAmount != null">supplier_net_amount,</if>
<if test="supplierReversedAmount != null">supplier_reversed_amount,</if>
<if test="supplierFeeReversedAmount != null">supplier_fee_reversed_amount,</if>
<if test="supplierFeeReturnedAmount != null">supplier_fee_returned_amount,</if>
<if test="packageSnapshot != null">package_snapshot,</if>
<if test="status != null and status != ''">status,</if>
<if test="walletId != null">wallet_id,</if>
<if test="supplierUserId != null">supplier_user_id,</if>
<if test="supplierAccountId != null">supplier_account_id,</if>
<if test="relationSlot != null">relation_slot,</if>
<if test="payerAccountId != null">payer_account_id,</if>
<if test="fundStatus != null and fundStatus != ''">fund_status,</if>
<if test="refundedAmount != null">refunded_amount,</if>
<if test="dispatchDeadline != null">dispatch_deadline,</if>
<if test="serviceStartedAt != null">service_started_at,</if>
<if test="serviceExpiresAt != null">service_expires_at,</if>
<if test="reclaimStatus != null and reclaimStatus != ''">reclaim_status,</if>
<if test="nextReclaimAt != null">next_reclaim_at,</if>
<if test="notifyUrl != null">notify_url,</if>
<if test="errorCode != null">error_code,</if>
<if test="remark != null">remark,</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="orderNo != null and orderNo != ''">#{orderNo},</if>
<if test="appId != null">#{appId},</if>
<if test="merchantOrderNo != null and merchantOrderNo != ''">#{merchantOrderNo},</if>
<if test="requestHash != null and requestHash != ''">#{requestHash},</if>
<if test="packageId != null">#{packageId},</if>
<if test="network != null and network != ''">#{network},</if>
<if test="receiverAddress != null and receiverAddress != ''">#{receiverAddress},</if>
<if test="resourceType != null and resourceType != ''">#{resourceType},</if>
<if test="resourceQuantity != null">#{resourceQuantity},</if>
<if test="redundancyPercent != null">#{redundancyPercent},</if>
<if test="targetResourceQuantity != null">#{targetResourceQuantity},</if>
<if test="durationSeconds != null">#{durationSeconds},</if>
<if test="saleAmount != null">#{saleAmount},</if>
<if test="supplierAmount != null">#{supplierAmount},</if>
<if test="supplierFeePercent != null">#{supplierFeePercent},</if>
<if test="supplierFeeAmount != null">#{supplierFeeAmount},</if>
<if test="supplierNetAmount != null">#{supplierNetAmount},</if>
<if test="supplierReversedAmount != null">#{supplierReversedAmount},</if>
<if test="supplierFeeReversedAmount != null">#{supplierFeeReversedAmount},</if>
<if test="supplierFeeReturnedAmount != null">#{supplierFeeReturnedAmount},</if>
<if test="packageSnapshot != null">#{packageSnapshot},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="walletId != null">#{walletId},</if>
<if test="supplierUserId != null">#{supplierUserId},</if>
<if test="supplierAccountId != null">#{supplierAccountId},</if>
<if test="relationSlot != null">#{relationSlot},</if>
<if test="payerAccountId != null">#{payerAccountId},</if>
<if test="fundStatus != null and fundStatus != ''">#{fundStatus},</if>
<if test="refundedAmount != null">#{refundedAmount},</if>
<if test="dispatchDeadline != null">#{dispatchDeadline},</if>
<if test="serviceStartedAt != null">#{serviceStartedAt},</if>
<if test="serviceExpiresAt != null">#{serviceExpiresAt},</if>
<if test="reclaimStatus != null and reclaimStatus != ''">#{reclaimStatus},</if>
<if test="nextReclaimAt != null">#{nextReclaimAt},</if>
<if test="notifyUrl != null">#{notifyUrl},</if>
<if test="errorCode != null">#{errorCode},</if>
<if test="remark != null">#{remark},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentOrder" parameterType="RentOrder">
update rent_order
<trim prefix="SET" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
<if test="appId != null">app_id = #{appId},</if>
<if test="merchantOrderNo != null and merchantOrderNo != ''">merchant_order_no = #{merchantOrderNo},</if>
<if test="requestHash != null and requestHash != ''">request_hash = #{requestHash},</if>
<if test="packageId != null">package_id = #{packageId},</if>
<if test="network != null and network != ''">network = #{network},</if>
<if test="receiverAddress != null and receiverAddress != ''">receiver_address = #{receiverAddress},</if>
<if test="resourceType != null and resourceType != ''">resource_type = #{resourceType},</if>
<if test="resourceQuantity != null">resource_quantity = #{resourceQuantity},</if>
<if test="redundancyPercent != null">redundancy_percent = #{redundancyPercent},</if>
<if test="targetResourceQuantity != null">target_resource_quantity = #{targetResourceQuantity},</if>
<if test="durationSeconds != null">duration_seconds = #{durationSeconds},</if>
<if test="saleAmount != null">sale_amount = #{saleAmount},</if>
<if test="supplierAmount != null">supplier_amount = #{supplierAmount},</if>
<if test="supplierFeePercent != null">supplier_fee_percent = #{supplierFeePercent},</if>
<if test="supplierFeeAmount != null">supplier_fee_amount = #{supplierFeeAmount},</if>
<if test="supplierNetAmount != null">supplier_net_amount = #{supplierNetAmount},</if>
<if test="supplierReversedAmount != null">supplier_reversed_amount = #{supplierReversedAmount},</if>
<if test="supplierFeeReversedAmount != null">supplier_fee_reversed_amount = #{supplierFeeReversedAmount},</if>
<if test="supplierFeeReturnedAmount != null">supplier_fee_returned_amount = #{supplierFeeReturnedAmount},</if>
<if test="packageSnapshot != null">package_snapshot = #{packageSnapshot},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="walletId != null">wallet_id = #{walletId},</if>
<if test="supplierUserId != null">supplier_user_id = #{supplierUserId},</if>
<if test="supplierAccountId != null">supplier_account_id = #{supplierAccountId},</if>
<if test="relationSlot != null">relation_slot = #{relationSlot},</if>
<if test="payerAccountId != null">payer_account_id = #{payerAccountId},</if>
<if test="fundStatus != null and fundStatus != ''">fund_status = #{fundStatus},</if>
<if test="refundedAmount != null">refunded_amount = #{refundedAmount},</if>
<if test="dispatchDeadline != null">dispatch_deadline = #{dispatchDeadline},</if>
<if test="serviceStartedAt != null">service_started_at = #{serviceStartedAt},</if>
<if test="serviceExpiresAt != null">service_expires_at = #{serviceExpiresAt},</if>
<if test="reclaimStatus != null and reclaimStatus != ''">reclaim_status = #{reclaimStatus},</if>
<if test="nextReclaimAt != null">next_reclaim_at = #{nextReclaimAt},</if>
<if test="notifyUrl != null">notify_url = #{notifyUrl},</if>
<if test="errorCode != null">error_code = #{errorCode},</if>
<if test="remark != null">remark = #{remark},</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="deleteRentOrderById" parameterType="Long">
delete from rent_order where id = #{id}
</delete>
<delete id="deleteRentOrderByIds" parameterType="String">
delete from rent_order where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,124 @@
<?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.RentPackageMapper">
<resultMap type="RentPackage" id="RentPackageResult">
<result property="id" column="id" />
<result property="packageCode" column="package_code" />
<result property="revision" column="revision" />
<result property="name" column="name" />
<result property="network" column="network" />
<result property="resourceType" column="resource_type" />
<result property="resourceQuantity" column="resource_quantity" />
<result property="redundancyPercent" column="redundancy_percent" />
<result property="durationSeconds" column="duration_seconds" />
<result property="saleAmount" column="sale_amount" />
<result property="supplierAmount" column="supplier_amount" />
<result property="supplierFeePercent" column="supplier_fee_percent" />
<result property="feeLimitSun" column="fee_limit_sun" />
<result property="delegateLock" column="delegate_lock" />
<result property="status" column="status" />
<result property="rules" column="rules" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentPackageVo">
select id, package_code, revision, name, network, resource_type, resource_quantity, redundancy_percent, duration_seconds, sale_amount, supplier_amount, supplier_fee_percent, fee_limit_sun, delegate_lock, status, rules, version, created_at, updated_at from rent_package
</sql>
<select id="selectRentPackageList" parameterType="RentPackage" resultMap="RentPackageResult">
<include refid="selectRentPackageVo"/>
<where>
<if test="packageCode != null and packageCode != ''"> and package_code = #{packageCode}</if>
</where>
</select>
<select id="selectRentPackageById" parameterType="Long" resultMap="RentPackageResult">
<include refid="selectRentPackageVo"/>
where id = #{id}
</select>
<insert id="insertRentPackage" parameterType="RentPackage" useGeneratedKeys="true" keyProperty="id">
insert into rent_package
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="packageCode != null and packageCode != ''">package_code,</if>
<if test="revision != null">revision,</if>
<if test="name != null and name != ''">name,</if>
<if test="network != null and network != ''">network,</if>
<if test="resourceType != null and resourceType != ''">resource_type,</if>
<if test="resourceQuantity != null">resource_quantity,</if>
<if test="redundancyPercent != null">redundancy_percent,</if>
<if test="durationSeconds != null">duration_seconds,</if>
<if test="saleAmount != null">sale_amount,</if>
<if test="supplierAmount != null">supplier_amount,</if>
<if test="supplierFeePercent != null">supplier_fee_percent,</if>
<if test="feeLimitSun != null">fee_limit_sun,</if>
<if test="delegateLock != null">delegate_lock,</if>
<if test="status != null and status != ''">status,</if>
<if test="rules != null">rules,</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="packageCode != null and packageCode != ''">#{packageCode},</if>
<if test="revision != null">#{revision},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="network != null and network != ''">#{network},</if>
<if test="resourceType != null and resourceType != ''">#{resourceType},</if>
<if test="resourceQuantity != null">#{resourceQuantity},</if>
<if test="redundancyPercent != null">#{redundancyPercent},</if>
<if test="durationSeconds != null">#{durationSeconds},</if>
<if test="saleAmount != null">#{saleAmount},</if>
<if test="supplierAmount != null">#{supplierAmount},</if>
<if test="supplierFeePercent != null">#{supplierFeePercent},</if>
<if test="feeLimitSun != null">#{feeLimitSun},</if>
<if test="delegateLock != null">#{delegateLock},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="rules != null">#{rules},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentPackage" parameterType="RentPackage">
update rent_package
<trim prefix="SET" suffixOverrides=",">
<if test="packageCode != null and packageCode != ''">package_code = #{packageCode},</if>
<if test="revision != null">revision = #{revision},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="network != null and network != ''">network = #{network},</if>
<if test="resourceType != null and resourceType != ''">resource_type = #{resourceType},</if>
<if test="resourceQuantity != null">resource_quantity = #{resourceQuantity},</if>
<if test="redundancyPercent != null">redundancy_percent = #{redundancyPercent},</if>
<if test="durationSeconds != null">duration_seconds = #{durationSeconds},</if>
<if test="saleAmount != null">sale_amount = #{saleAmount},</if>
<if test="supplierAmount != null">supplier_amount = #{supplierAmount},</if>
<if test="supplierFeePercent != null">supplier_fee_percent = #{supplierFeePercent},</if>
<if test="feeLimitSun != null">fee_limit_sun = #{feeLimitSun},</if>
<if test="delegateLock != null">delegate_lock = #{delegateLock},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="rules != null">rules = #{rules},</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="deleteRentPackageById" parameterType="Long">
delete from rent_package where id = #{id}
</delete>
<delete id="deleteRentPackageByIds" parameterType="String">
delete from rent_package where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,116 @@
<?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.RentRefundMapper">
<resultMap type="RentRefund" id="RentRefundResult">
<result property="id" column="id" />
<result property="refundNo" column="refund_no" />
<result property="orderId" column="order_id" />
<result property="requestNo" column="request_no" />
<result property="requestHash" column="request_hash" />
<result property="refundAmount" column="refund_amount" />
<result property="supplierReverseAmount" column="supplier_reverse_amount" />
<result property="platformFeeReverseAmount" column="platform_fee_reverse_amount" />
<result property="feeReturnTo" column="fee_return_to" />
<result property="status" column="status" />
<result property="createdBy" column="created_by" />
<result property="approvedBy" column="approved_by" />
<result property="appliedAt" column="applied_at" />
<result property="reason" column="reason" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentRefundVo">
select id, refund_no, order_id, request_no, request_hash, refund_amount, supplier_reverse_amount, platform_fee_reverse_amount, fee_return_to, status, created_by, approved_by, applied_at, reason, version, created_at, updated_at from rent_refund
</sql>
<select id="selectRentRefundList" parameterType="RentRefund" resultMap="RentRefundResult">
<include refid="selectRentRefundVo"/>
<where>
<if test="requestNo != null and requestNo != ''"> and request_no = #{requestNo}</if>
</where>
</select>
<select id="selectRentRefundById" parameterType="Long" resultMap="RentRefundResult">
<include refid="selectRentRefundVo"/>
where id = #{id}
</select>
<insert id="insertRentRefund" parameterType="RentRefund" useGeneratedKeys="true" keyProperty="id">
insert into rent_refund
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="refundNo != null and refundNo != ''">refund_no,</if>
<if test="orderId != null">order_id,</if>
<if test="requestNo != null and requestNo != ''">request_no,</if>
<if test="requestHash != null and requestHash != ''">request_hash,</if>
<if test="refundAmount != null">refund_amount,</if>
<if test="supplierReverseAmount != null">supplier_reverse_amount,</if>
<if test="platformFeeReverseAmount != null">platform_fee_reverse_amount,</if>
<if test="feeReturnTo != null and feeReturnTo != ''">fee_return_to,</if>
<if test="status != null and status != ''">status,</if>
<if test="createdBy != null">created_by,</if>
<if test="approvedBy != null">approved_by,</if>
<if test="appliedAt != null">applied_at,</if>
<if test="reason != null and reason != ''">reason,</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="refundNo != null and refundNo != ''">#{refundNo},</if>
<if test="orderId != null">#{orderId},</if>
<if test="requestNo != null and requestNo != ''">#{requestNo},</if>
<if test="requestHash != null and requestHash != ''">#{requestHash},</if>
<if test="refundAmount != null">#{refundAmount},</if>
<if test="supplierReverseAmount != null">#{supplierReverseAmount},</if>
<if test="platformFeeReverseAmount != null">#{platformFeeReverseAmount},</if>
<if test="feeReturnTo != null and feeReturnTo != ''">#{feeReturnTo},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="approvedBy != null">#{approvedBy},</if>
<if test="appliedAt != null">#{appliedAt},</if>
<if test="reason != null and reason != ''">#{reason},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentRefund" parameterType="RentRefund">
update rent_refund
<trim prefix="SET" suffixOverrides=",">
<if test="refundNo != null and refundNo != ''">refund_no = #{refundNo},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="requestNo != null and requestNo != ''">request_no = #{requestNo},</if>
<if test="requestHash != null and requestHash != ''">request_hash = #{requestHash},</if>
<if test="refundAmount != null">refund_amount = #{refundAmount},</if>
<if test="supplierReverseAmount != null">supplier_reverse_amount = #{supplierReverseAmount},</if>
<if test="platformFeeReverseAmount != null">platform_fee_reverse_amount = #{platformFeeReverseAmount},</if>
<if test="feeReturnTo != null and feeReturnTo != ''">fee_return_to = #{feeReturnTo},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="approvedBy != null">approved_by = #{approvedBy},</if>
<if test="appliedAt != null">applied_at = #{appliedAt},</if>
<if test="reason != null and reason != ''">reason = #{reason},</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="deleteRentRefundById" parameterType="Long">
delete from rent_refund where id = #{id}
</delete>
<delete id="deleteRentRefundByIds" parameterType="String">
delete from rent_refund where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,80 @@
<?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.RentSettlementItemMapper">
<resultMap type="RentSettlementItem" id="RentSettlementItemResult">
<result property="id" column="id" />
<result property="settlementId" column="settlement_id" />
<result property="orderId" column="order_id" />
<result property="amount" column="amount" />
<result property="activeSlot" column="active_slot" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentSettlementItemVo">
select id, settlement_id, order_id, amount, active_slot, version, created_at, updated_at from rent_settlement_item
</sql>
<select id="selectRentSettlementItemList" parameterType="RentSettlementItem" resultMap="RentSettlementItemResult">
<include refid="selectRentSettlementItemVo"/>
<where>
<if test="version != null "> and version = #{version}</if>
</where>
</select>
<select id="selectRentSettlementItemById" parameterType="Long" resultMap="RentSettlementItemResult">
<include refid="selectRentSettlementItemVo"/>
where id = #{id}
</select>
<insert id="insertRentSettlementItem" parameterType="RentSettlementItem" useGeneratedKeys="true" keyProperty="id">
insert into rent_settlement_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="settlementId != null">settlement_id,</if>
<if test="orderId != null">order_id,</if>
<if test="amount != null">amount,</if>
<if test="activeSlot != null">active_slot,</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="settlementId != null">#{settlementId},</if>
<if test="orderId != null">#{orderId},</if>
<if test="amount != null">#{amount},</if>
<if test="activeSlot != null">#{activeSlot},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentSettlementItem" parameterType="RentSettlementItem">
update rent_settlement_item
<trim prefix="SET" suffixOverrides=",">
<if test="settlementId != null">settlement_id = #{settlementId},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="amount != null">amount = #{amount},</if>
<if test="activeSlot != null">active_slot = #{activeSlot},</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="deleteRentSettlementItemById" parameterType="Long">
delete from rent_settlement_item where id = #{id}
</delete>
<delete id="deleteRentSettlementItemByIds" parameterType="String">
delete from rent_settlement_item where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,112 @@
<?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.RentSettlementMapper">
<resultMap type="RentSettlement" id="RentSettlementResult">
<result property="id" column="id" />
<result property="settlementNo" column="settlement_no" />
<result property="accountId" column="account_id" />
<result property="amount" column="amount" />
<result property="status" column="status" />
<result property="payoutNo" column="payout_no" />
<result property="paymentStartedAt" column="payment_started_at" />
<result property="paymentEvidence" column="payment_evidence" />
<result property="paymentReference" column="payment_reference" />
<result property="createdBy" column="created_by" />
<result property="approvedBy" column="approved_by" />
<result property="paidAt" column="paid_at" />
<result property="remark" column="remark" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentSettlementVo">
select id, settlement_no, account_id, amount, status, payout_no, payment_started_at, payment_evidence, payment_reference, created_by, approved_by, paid_at, remark, version, created_at, updated_at from rent_settlement
</sql>
<select id="selectRentSettlementList" parameterType="RentSettlement" resultMap="RentSettlementResult">
<include refid="selectRentSettlementVo"/>
<where>
<if test="payoutNo != null and payoutNo != ''"> and payout_no = #{payoutNo}</if>
</where>
</select>
<select id="selectRentSettlementById" parameterType="Long" resultMap="RentSettlementResult">
<include refid="selectRentSettlementVo"/>
where id = #{id}
</select>
<insert id="insertRentSettlement" parameterType="RentSettlement" useGeneratedKeys="true" keyProperty="id">
insert into rent_settlement
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="settlementNo != null and settlementNo != ''">settlement_no,</if>
<if test="accountId != null">account_id,</if>
<if test="amount != null">amount,</if>
<if test="status != null and status != ''">status,</if>
<if test="payoutNo != null">payout_no,</if>
<if test="paymentStartedAt != null">payment_started_at,</if>
<if test="paymentEvidence != null">payment_evidence,</if>
<if test="paymentReference != null">payment_reference,</if>
<if test="createdBy != null">created_by,</if>
<if test="approvedBy != null">approved_by,</if>
<if test="paidAt != null">paid_at,</if>
<if test="remark != null">remark,</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="settlementNo != null and settlementNo != ''">#{settlementNo},</if>
<if test="accountId != null">#{accountId},</if>
<if test="amount != null">#{amount},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="payoutNo != null">#{payoutNo},</if>
<if test="paymentStartedAt != null">#{paymentStartedAt},</if>
<if test="paymentEvidence != null">#{paymentEvidence},</if>
<if test="paymentReference != null">#{paymentReference},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="approvedBy != null">#{approvedBy},</if>
<if test="paidAt != null">#{paidAt},</if>
<if test="remark != null">#{remark},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentSettlement" parameterType="RentSettlement">
update rent_settlement
<trim prefix="SET" suffixOverrides=",">
<if test="settlementNo != null and settlementNo != ''">settlement_no = #{settlementNo},</if>
<if test="accountId != null">account_id = #{accountId},</if>
<if test="amount != null">amount = #{amount},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="payoutNo != null">payout_no = #{payoutNo},</if>
<if test="paymentStartedAt != null">payment_started_at = #{paymentStartedAt},</if>
<if test="paymentEvidence != null">payment_evidence = #{paymentEvidence},</if>
<if test="paymentReference != null">payment_reference = #{paymentReference},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="approvedBy != null">approved_by = #{approvedBy},</if>
<if test="paidAt != null">paid_at = #{paidAt},</if>
<if test="remark != null">remark = #{remark},</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="deleteRentSettlementById" parameterType="Long">
delete from rent_settlement where id = #{id}
</delete>
<delete id="deleteRentSettlementByIds" parameterType="String">
delete from rent_settlement where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,216 @@
<?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.RentTaskMapper">
<resultMap type="RentTask" id="RentTaskResult">
<result property="id" column="id" />
<result property="taskNo" column="task_no" />
<result property="orderId" column="order_id" />
<result property="walletId" column="wallet_id" />
<result property="nodeId" column="node_id" />
<result property="network" column="network" />
<result property="sourceTransactionId" column="source_transaction_id" />
<result property="walletExecutionSlot" column="wallet_execution_slot" />
<result property="taskType" column="task_type" />
<result property="resourceType" column="resource_type" />
<result property="resourceQuantity" column="resource_quantity" />
<result property="targetResourceQuantity" column="target_resource_quantity" />
<result property="conversionTotalLimit" column="conversion_total_limit" />
<result property="conversionTotalWeight" column="conversion_total_weight" />
<result property="conversionBlockHeight" column="conversion_block_height" />
<result property="conversionAt" column="conversion_at" />
<result property="estimatedResourceQuantity" column="estimated_resource_quantity" />
<result property="attemptNo" column="attempt_no" />
<result property="activeSlot" column="active_slot" />
<result property="delegateSun" column="delegate_sun" />
<result property="feeLimitSun" column="fee_limit_sun" />
<result property="credentialId" column="credential_id" />
<result property="nonce" column="nonce" />
<result property="signedAt" column="signed_at" />
<result property="deadline" column="deadline" />
<result property="intent" column="intent" />
<result property="signature" column="signature" />
<result property="status" column="status" />
<result property="reservationStatus" column="reservation_status" />
<result property="leaseOwner" column="lease_owner" />
<result property="leaseUntil" column="lease_until" />
<result property="acceptedAt" column="accepted_at" />
<result property="deliveryMessageId" column="delivery_message_id" />
<result property="deliverySessionEpoch" column="delivery_session_epoch" />
<result property="deliveryCount" column="delivery_count" />
<result property="lastSentAt" column="last_sent_at" />
<result property="deliveryAckedAt" column="delivery_acked_at" />
<result property="nextCheckAt" column="next_check_at" />
<result property="error" column="error" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentTaskVo">
select id, task_no, order_id, wallet_id, node_id, network, source_transaction_id, wallet_execution_slot, task_type, resource_type, resource_quantity, target_resource_quantity, conversion_total_limit, conversion_total_weight, conversion_block_height, conversion_at, estimated_resource_quantity, attempt_no, active_slot, delegate_sun, fee_limit_sun, credential_id, nonce, signed_at, deadline, intent, signature, status, reservation_status, lease_owner, lease_until, accepted_at, delivery_message_id, delivery_session_epoch, delivery_count, last_sent_at, delivery_acked_at, next_check_at, error, version, created_at, updated_at from rent_task
</sql>
<select id="selectRentTaskList" parameterType="RentTask" resultMap="RentTaskResult">
<include refid="selectRentTaskVo"/>
<where>
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
</where>
</select>
<select id="selectRentTaskById" parameterType="Long" resultMap="RentTaskResult">
<include refid="selectRentTaskVo"/>
where id = #{id}
</select>
<insert id="insertRentTask" parameterType="RentTask" useGeneratedKeys="true" keyProperty="id">
insert into rent_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskNo != null and taskNo != ''">task_no,</if>
<if test="orderId != null">order_id,</if>
<if test="walletId != null">wallet_id,</if>
<if test="nodeId != null">node_id,</if>
<if test="network != null and network != ''">network,</if>
<if test="sourceTransactionId != null">source_transaction_id,</if>
<if test="walletExecutionSlot != null">wallet_execution_slot,</if>
<if test="taskType != null and taskType != ''">task_type,</if>
<if test="resourceType != null and resourceType != ''">resource_type,</if>
<if test="resourceQuantity != null">resource_quantity,</if>
<if test="targetResourceQuantity != null">target_resource_quantity,</if>
<if test="conversionTotalLimit != null">conversion_total_limit,</if>
<if test="conversionTotalWeight != null">conversion_total_weight,</if>
<if test="conversionBlockHeight != null">conversion_block_height,</if>
<if test="conversionAt != null">conversion_at,</if>
<if test="estimatedResourceQuantity != null">estimated_resource_quantity,</if>
<if test="attemptNo != null">attempt_no,</if>
<if test="activeSlot != null">active_slot,</if>
<if test="delegateSun != null">delegate_sun,</if>
<if test="feeLimitSun != null">fee_limit_sun,</if>
<if test="credentialId != null">credential_id,</if>
<if test="nonce != null and nonce != ''">nonce,</if>
<if test="signedAt != null">signed_at,</if>
<if test="deadline != null">deadline,</if>
<if test="intent != null and intent != ''">intent,</if>
<if test="signature != null and signature != ''">signature,</if>
<if test="status != null and status != ''">status,</if>
<if test="reservationStatus != null and reservationStatus != ''">reservation_status,</if>
<if test="leaseOwner != null">lease_owner,</if>
<if test="leaseUntil != null">lease_until,</if>
<if test="acceptedAt != null">accepted_at,</if>
<if test="deliveryMessageId != null">delivery_message_id,</if>
<if test="deliverySessionEpoch != null">delivery_session_epoch,</if>
<if test="deliveryCount != null">delivery_count,</if>
<if test="lastSentAt != null">last_sent_at,</if>
<if test="deliveryAckedAt != null">delivery_acked_at,</if>
<if test="nextCheckAt != null">next_check_at,</if>
<if test="error != null">error,</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="taskNo != null and taskNo != ''">#{taskNo},</if>
<if test="orderId != null">#{orderId},</if>
<if test="walletId != null">#{walletId},</if>
<if test="nodeId != null">#{nodeId},</if>
<if test="network != null and network != ''">#{network},</if>
<if test="sourceTransactionId != null">#{sourceTransactionId},</if>
<if test="walletExecutionSlot != null">#{walletExecutionSlot},</if>
<if test="taskType != null and taskType != ''">#{taskType},</if>
<if test="resourceType != null and resourceType != ''">#{resourceType},</if>
<if test="resourceQuantity != null">#{resourceQuantity},</if>
<if test="targetResourceQuantity != null">#{targetResourceQuantity},</if>
<if test="conversionTotalLimit != null">#{conversionTotalLimit},</if>
<if test="conversionTotalWeight != null">#{conversionTotalWeight},</if>
<if test="conversionBlockHeight != null">#{conversionBlockHeight},</if>
<if test="conversionAt != null">#{conversionAt},</if>
<if test="estimatedResourceQuantity != null">#{estimatedResourceQuantity},</if>
<if test="attemptNo != null">#{attemptNo},</if>
<if test="activeSlot != null">#{activeSlot},</if>
<if test="delegateSun != null">#{delegateSun},</if>
<if test="feeLimitSun != null">#{feeLimitSun},</if>
<if test="credentialId != null">#{credentialId},</if>
<if test="nonce != null and nonce != ''">#{nonce},</if>
<if test="signedAt != null">#{signedAt},</if>
<if test="deadline != null">#{deadline},</if>
<if test="intent != null and intent != ''">#{intent},</if>
<if test="signature != null and signature != ''">#{signature},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="reservationStatus != null and reservationStatus != ''">#{reservationStatus},</if>
<if test="leaseOwner != null">#{leaseOwner},</if>
<if test="leaseUntil != null">#{leaseUntil},</if>
<if test="acceptedAt != null">#{acceptedAt},</if>
<if test="deliveryMessageId != null">#{deliveryMessageId},</if>
<if test="deliverySessionEpoch != null">#{deliverySessionEpoch},</if>
<if test="deliveryCount != null">#{deliveryCount},</if>
<if test="lastSentAt != null">#{lastSentAt},</if>
<if test="deliveryAckedAt != null">#{deliveryAckedAt},</if>
<if test="nextCheckAt != null">#{nextCheckAt},</if>
<if test="error != null">#{error},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentTask" parameterType="RentTask">
update rent_task
<trim prefix="SET" suffixOverrides=",">
<if test="taskNo != null and taskNo != ''">task_no = #{taskNo},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="walletId != null">wallet_id = #{walletId},</if>
<if test="nodeId != null">node_id = #{nodeId},</if>
<if test="network != null and network != ''">network = #{network},</if>
<if test="sourceTransactionId != null">source_transaction_id = #{sourceTransactionId},</if>
<if test="walletExecutionSlot != null">wallet_execution_slot = #{walletExecutionSlot},</if>
<if test="taskType != null and taskType != ''">task_type = #{taskType},</if>
<if test="resourceType != null and resourceType != ''">resource_type = #{resourceType},</if>
<if test="resourceQuantity != null">resource_quantity = #{resourceQuantity},</if>
<if test="targetResourceQuantity != null">target_resource_quantity = #{targetResourceQuantity},</if>
<if test="conversionTotalLimit != null">conversion_total_limit = #{conversionTotalLimit},</if>
<if test="conversionTotalWeight != null">conversion_total_weight = #{conversionTotalWeight},</if>
<if test="conversionBlockHeight != null">conversion_block_height = #{conversionBlockHeight},</if>
<if test="conversionAt != null">conversion_at = #{conversionAt},</if>
<if test="estimatedResourceQuantity != null">estimated_resource_quantity = #{estimatedResourceQuantity},</if>
<if test="attemptNo != null">attempt_no = #{attemptNo},</if>
<if test="activeSlot != null">active_slot = #{activeSlot},</if>
<if test="delegateSun != null">delegate_sun = #{delegateSun},</if>
<if test="feeLimitSun != null">fee_limit_sun = #{feeLimitSun},</if>
<if test="credentialId != null">credential_id = #{credentialId},</if>
<if test="nonce != null and nonce != ''">nonce = #{nonce},</if>
<if test="signedAt != null">signed_at = #{signedAt},</if>
<if test="deadline != null">deadline = #{deadline},</if>
<if test="intent != null and intent != ''">intent = #{intent},</if>
<if test="signature != null and signature != ''">signature = #{signature},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="reservationStatus != null and reservationStatus != ''">reservation_status = #{reservationStatus},</if>
<if test="leaseOwner != null">lease_owner = #{leaseOwner},</if>
<if test="leaseUntil != null">lease_until = #{leaseUntil},</if>
<if test="acceptedAt != null">accepted_at = #{acceptedAt},</if>
<if test="deliveryMessageId != null">delivery_message_id = #{deliveryMessageId},</if>
<if test="deliverySessionEpoch != null">delivery_session_epoch = #{deliverySessionEpoch},</if>
<if test="deliveryCount != null">delivery_count = #{deliveryCount},</if>
<if test="lastSentAt != null">last_sent_at = #{lastSentAt},</if>
<if test="deliveryAckedAt != null">delivery_acked_at = #{deliveryAckedAt},</if>
<if test="nextCheckAt != null">next_check_at = #{nextCheckAt},</if>
<if test="error != null">error = #{error},</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="deleteRentTaskById" parameterType="Long">
delete from rent_task where id = #{id}
</delete>
<delete id="deleteRentTaskByIds" parameterType="String">
delete from rent_task where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -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>
@@ -0,0 +1,200 @@
<?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.RentWalletMapper">
<resultMap type="RentWallet" id="RentWalletResult">
<result property="id" column="id" />
<result property="nodeId" column="node_id" />
<result property="network" column="network" />
<result property="address" column="address" />
<result property="status" column="status" />
<result property="permissionId" column="permission_id" />
<result property="ownershipMethod" column="ownership_method" />
<result property="ownershipChallenge" column="ownership_challenge" />
<result property="ownershipMessage" column="ownership_message" />
<result property="ownershipSignature" column="ownership_signature" />
<result property="ownershipVerifiedAddress" column="ownership_verified_address" />
<result property="challengeIssuedAt" column="challenge_issued_at" />
<result property="challengeExpiresAt" column="challenge_expires_at" />
<result property="challengeConsumedAt" column="challenge_consumed_at" />
<result property="ownershipVerifiedAt" column="ownership_verified_at" />
<result property="ownershipEvidence" column="ownership_evidence" />
<result property="energyAvailable" column="energy_available" />
<result property="bandwidthAvailable" column="bandwidth_available" />
<result property="energyEnabled" column="energy_enabled" />
<result property="bandwidthEnabled" column="bandwidth_enabled" />
<result property="energyDelegatableSun" column="energy_delegatable_sun" />
<result property="energyReservedSun" column="energy_reserved_sun" />
<result property="energyRetainSun" column="energy_retain_sun" />
<result property="bandwidthDelegatableSun" column="bandwidth_delegatable_sun" />
<result property="bandwidthReservedSun" column="bandwidth_reserved_sun" />
<result property="bandwidthRetainSun" column="bandwidth_retain_sun" />
<result property="totalEnergyLimit" column="total_energy_limit" />
<result property="totalEnergyWeight" column="total_energy_weight" />
<result property="totalBandwidthLimit" column="total_bandwidth_limit" />
<result property="totalBandwidthWeight" column="total_bandwidth_weight" />
<result property="snapshotAt" column="snapshot_at" />
<result property="snapshotExpiresAt" column="snapshot_expires_at" />
<result property="snapshotBlockHeight" column="snapshot_block_height" />
<result property="snapshotMinBlockHeight" column="snapshot_min_block_height" />
<result property="policy" column="policy" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentWalletVo">
select id, node_id, network, address, status, permission_id, ownership_method, ownership_challenge, ownership_message, ownership_signature, ownership_verified_address, challenge_issued_at, challenge_expires_at, challenge_consumed_at, ownership_verified_at, ownership_evidence, energy_available, bandwidth_available, energy_enabled, bandwidth_enabled, energy_delegatable_sun, energy_reserved_sun, energy_retain_sun, bandwidth_delegatable_sun, bandwidth_reserved_sun, bandwidth_retain_sun, total_energy_limit, total_energy_weight, total_bandwidth_limit, total_bandwidth_weight, snapshot_at, snapshot_expires_at, snapshot_block_height, snapshot_min_block_height, policy, version, created_at, updated_at from rent_wallet
</sql>
<select id="selectRentWalletList" parameterType="RentWallet" resultMap="RentWalletResult">
<include refid="selectRentWalletVo"/>
<where>
<if test="address != null and address != ''"> and address = #{address}</if>
</where>
</select>
<select id="selectRentWalletById" parameterType="Long" resultMap="RentWalletResult">
<include refid="selectRentWalletVo"/>
where id = #{id}
</select>
<insert id="insertRentWallet" parameterType="RentWallet" useGeneratedKeys="true" keyProperty="id">
insert into rent_wallet
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="nodeId != null">node_id,</if>
<if test="network != null and network != ''">network,</if>
<if test="address != null and address != ''">address,</if>
<if test="status != null and status != ''">status,</if>
<if test="permissionId != null">permission_id,</if>
<if test="ownershipMethod != null">ownership_method,</if>
<if test="ownershipChallenge != null">ownership_challenge,</if>
<if test="ownershipMessage != null">ownership_message,</if>
<if test="ownershipSignature != null">ownership_signature,</if>
<if test="ownershipVerifiedAddress != null">ownership_verified_address,</if>
<if test="challengeIssuedAt != null">challenge_issued_at,</if>
<if test="challengeExpiresAt != null">challenge_expires_at,</if>
<if test="challengeConsumedAt != null">challenge_consumed_at,</if>
<if test="ownershipVerifiedAt != null">ownership_verified_at,</if>
<if test="ownershipEvidence != null">ownership_evidence,</if>
<if test="energyAvailable != null">energy_available,</if>
<if test="bandwidthAvailable != null">bandwidth_available,</if>
<if test="energyEnabled != null">energy_enabled,</if>
<if test="bandwidthEnabled != null">bandwidth_enabled,</if>
<if test="energyDelegatableSun != null">energy_delegatable_sun,</if>
<if test="energyReservedSun != null">energy_reserved_sun,</if>
<if test="energyRetainSun != null">energy_retain_sun,</if>
<if test="bandwidthDelegatableSun != null">bandwidth_delegatable_sun,</if>
<if test="bandwidthReservedSun != null">bandwidth_reserved_sun,</if>
<if test="bandwidthRetainSun != null">bandwidth_retain_sun,</if>
<if test="totalEnergyLimit != null">total_energy_limit,</if>
<if test="totalEnergyWeight != null">total_energy_weight,</if>
<if test="totalBandwidthLimit != null">total_bandwidth_limit,</if>
<if test="totalBandwidthWeight != null">total_bandwidth_weight,</if>
<if test="snapshotAt != null">snapshot_at,</if>
<if test="snapshotExpiresAt != null">snapshot_expires_at,</if>
<if test="snapshotBlockHeight != null">snapshot_block_height,</if>
<if test="snapshotMinBlockHeight != null">snapshot_min_block_height,</if>
<if test="policy != null">policy,</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="nodeId != null">#{nodeId},</if>
<if test="network != null and network != ''">#{network},</if>
<if test="address != null and address != ''">#{address},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="permissionId != null">#{permissionId},</if>
<if test="ownershipMethod != null">#{ownershipMethod},</if>
<if test="ownershipChallenge != null">#{ownershipChallenge},</if>
<if test="ownershipMessage != null">#{ownershipMessage},</if>
<if test="ownershipSignature != null">#{ownershipSignature},</if>
<if test="ownershipVerifiedAddress != null">#{ownershipVerifiedAddress},</if>
<if test="challengeIssuedAt != null">#{challengeIssuedAt},</if>
<if test="challengeExpiresAt != null">#{challengeExpiresAt},</if>
<if test="challengeConsumedAt != null">#{challengeConsumedAt},</if>
<if test="ownershipVerifiedAt != null">#{ownershipVerifiedAt},</if>
<if test="ownershipEvidence != null">#{ownershipEvidence},</if>
<if test="energyAvailable != null">#{energyAvailable},</if>
<if test="bandwidthAvailable != null">#{bandwidthAvailable},</if>
<if test="energyEnabled != null">#{energyEnabled},</if>
<if test="bandwidthEnabled != null">#{bandwidthEnabled},</if>
<if test="energyDelegatableSun != null">#{energyDelegatableSun},</if>
<if test="energyReservedSun != null">#{energyReservedSun},</if>
<if test="energyRetainSun != null">#{energyRetainSun},</if>
<if test="bandwidthDelegatableSun != null">#{bandwidthDelegatableSun},</if>
<if test="bandwidthReservedSun != null">#{bandwidthReservedSun},</if>
<if test="bandwidthRetainSun != null">#{bandwidthRetainSun},</if>
<if test="totalEnergyLimit != null">#{totalEnergyLimit},</if>
<if test="totalEnergyWeight != null">#{totalEnergyWeight},</if>
<if test="totalBandwidthLimit != null">#{totalBandwidthLimit},</if>
<if test="totalBandwidthWeight != null">#{totalBandwidthWeight},</if>
<if test="snapshotAt != null">#{snapshotAt},</if>
<if test="snapshotExpiresAt != null">#{snapshotExpiresAt},</if>
<if test="snapshotBlockHeight != null">#{snapshotBlockHeight},</if>
<if test="snapshotMinBlockHeight != null">#{snapshotMinBlockHeight},</if>
<if test="policy != null">#{policy},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentWallet" parameterType="RentWallet">
update rent_wallet
<trim prefix="SET" suffixOverrides=",">
<if test="nodeId != null">node_id = #{nodeId},</if>
<if test="network != null and network != ''">network = #{network},</if>
<if test="address != null and address != ''">address = #{address},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="permissionId != null">permission_id = #{permissionId},</if>
<if test="ownershipMethod != null">ownership_method = #{ownershipMethod},</if>
<if test="ownershipChallenge != null">ownership_challenge = #{ownershipChallenge},</if>
<if test="ownershipMessage != null">ownership_message = #{ownershipMessage},</if>
<if test="ownershipSignature != null">ownership_signature = #{ownershipSignature},</if>
<if test="ownershipVerifiedAddress != null">ownership_verified_address = #{ownershipVerifiedAddress},</if>
<if test="challengeIssuedAt != null">challenge_issued_at = #{challengeIssuedAt},</if>
<if test="challengeExpiresAt != null">challenge_expires_at = #{challengeExpiresAt},</if>
<if test="challengeConsumedAt != null">challenge_consumed_at = #{challengeConsumedAt},</if>
<if test="ownershipVerifiedAt != null">ownership_verified_at = #{ownershipVerifiedAt},</if>
<if test="ownershipEvidence != null">ownership_evidence = #{ownershipEvidence},</if>
<if test="energyAvailable != null">energy_available = #{energyAvailable},</if>
<if test="bandwidthAvailable != null">bandwidth_available = #{bandwidthAvailable},</if>
<if test="energyEnabled != null">energy_enabled = #{energyEnabled},</if>
<if test="bandwidthEnabled != null">bandwidth_enabled = #{bandwidthEnabled},</if>
<if test="energyDelegatableSun != null">energy_delegatable_sun = #{energyDelegatableSun},</if>
<if test="energyReservedSun != null">energy_reserved_sun = #{energyReservedSun},</if>
<if test="energyRetainSun != null">energy_retain_sun = #{energyRetainSun},</if>
<if test="bandwidthDelegatableSun != null">bandwidth_delegatable_sun = #{bandwidthDelegatableSun},</if>
<if test="bandwidthReservedSun != null">bandwidth_reserved_sun = #{bandwidthReservedSun},</if>
<if test="bandwidthRetainSun != null">bandwidth_retain_sun = #{bandwidthRetainSun},</if>
<if test="totalEnergyLimit != null">total_energy_limit = #{totalEnergyLimit},</if>
<if test="totalEnergyWeight != null">total_energy_weight = #{totalEnergyWeight},</if>
<if test="totalBandwidthLimit != null">total_bandwidth_limit = #{totalBandwidthLimit},</if>
<if test="totalBandwidthWeight != null">total_bandwidth_weight = #{totalBandwidthWeight},</if>
<if test="snapshotAt != null">snapshot_at = #{snapshotAt},</if>
<if test="snapshotExpiresAt != null">snapshot_expires_at = #{snapshotExpiresAt},</if>
<if test="snapshotBlockHeight != null">snapshot_block_height = #{snapshotBlockHeight},</if>
<if test="snapshotMinBlockHeight != null">snapshot_min_block_height = #{snapshotMinBlockHeight},</if>
<if test="policy != null">policy = #{policy},</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="deleteRentWalletById" parameterType="Long">
delete from rent_wallet where id = #{id}
</delete>
<delete id="deleteRentWalletByIds" parameterType="String">
delete from rent_wallet where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,115 @@
<?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.RentWebhookMapper">
<resultMap type="RentWebhook" id="RentWebhookResult">
<result property="id" column="id" />
<result property="eventNo" column="event_no" />
<result property="orderId" column="order_id" />
<result property="eventType" column="event_type" />
<result property="eventKey" column="event_key" />
<result property="orderEventSequence" column="order_event_sequence" />
<result property="payload" column="payload" />
<result property="status" column="status" />
<result property="attemptCount" column="attempt_count" />
<result property="credentialId" column="credential_id" />
<result property="nextAttemptAt" column="next_attempt_at" />
<result property="lockOwner" column="lock_owner" />
<result property="lockUntil" column="lock_until" />
<result property="lastError" column="last_error" />
<result property="version" column="version" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectRentWebhookVo">
select id, event_no, order_id, event_type, event_key, order_event_sequence, payload, status, attempt_count, credential_id, next_attempt_at, lock_owner, lock_until, last_error, version, created_at, updated_at from rent_webhook
</sql>
<select id="selectRentWebhookList" parameterType="RentWebhook" resultMap="RentWebhookResult">
<include refid="selectRentWebhookVo"/>
<where>
</where>
</select>
<select id="selectRentWebhookById" parameterType="Long" resultMap="RentWebhookResult">
<include refid="selectRentWebhookVo"/>
where id = #{id}
</select>
<insert id="insertRentWebhook" parameterType="RentWebhook" useGeneratedKeys="true" keyProperty="id">
insert into rent_webhook
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="eventNo != null and eventNo != ''">event_no,</if>
<if test="orderId != null">order_id,</if>
<if test="eventType != null and eventType != ''">event_type,</if>
<if test="eventKey != null and eventKey != ''">event_key,</if>
<if test="orderEventSequence != null">order_event_sequence,</if>
<if test="payload != null and payload != ''">payload,</if>
<if test="status != null and status != ''">status,</if>
<if test="attemptCount != null">attempt_count,</if>
<if test="credentialId != null">credential_id,</if>
<if test="nextAttemptAt != null">next_attempt_at,</if>
<if test="lockOwner != null">lock_owner,</if>
<if test="lockUntil != null">lock_until,</if>
<if test="lastError != null">last_error,</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="eventNo != null and eventNo != ''">#{eventNo},</if>
<if test="orderId != null">#{orderId},</if>
<if test="eventType != null and eventType != ''">#{eventType},</if>
<if test="eventKey != null and eventKey != ''">#{eventKey},</if>
<if test="orderEventSequence != null">#{orderEventSequence},</if>
<if test="payload != null and payload != ''">#{payload},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="attemptCount != null">#{attemptCount},</if>
<if test="credentialId != null">#{credentialId},</if>
<if test="nextAttemptAt != null">#{nextAttemptAt},</if>
<if test="lockOwner != null">#{lockOwner},</if>
<if test="lockUntil != null">#{lockUntil},</if>
<if test="lastError != null">#{lastError},</if>
<if test="version != null">#{version},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateRentWebhook" parameterType="RentWebhook">
update rent_webhook
<trim prefix="SET" suffixOverrides=",">
<if test="eventNo != null and eventNo != ''">event_no = #{eventNo},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="eventType != null and eventType != ''">event_type = #{eventType},</if>
<if test="eventKey != null and eventKey != ''">event_key = #{eventKey},</if>
<if test="orderEventSequence != null">order_event_sequence = #{orderEventSequence},</if>
<if test="payload != null and payload != ''">payload = #{payload},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="attemptCount != null">attempt_count = #{attemptCount},</if>
<if test="credentialId != null">credential_id = #{credentialId},</if>
<if test="nextAttemptAt != null">next_attempt_at = #{nextAttemptAt},</if>
<if test="lockOwner != null">lock_owner = #{lockOwner},</if>
<if test="lockUntil != null">lock_until = #{lockUntil},</if>
<if test="lastError != null">last_error = #{lastError},</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="deleteRentWebhookById" parameterType="Long">
delete from rent_webhook where id = #{id}
</delete>
<delete id="deleteRentWebhookByIds" parameterType="String">
delete from rent_webhook where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>