租电订单

This commit is contained in:
19173159168
2025-08-18 23:36:15 +08:00
parent 8a45487020
commit d25251405c
15 changed files with 766 additions and 59 deletions

View File

@ -0,0 +1,99 @@
<?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.baseUser.mapper.ZcBaseWalletChangeMapper">
<resultMap type="ZcBaseWalletChange" id="ZcBaseWalletChangeResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="changeType" column="change_type" />
<result property="payType" column="pay_type" />
<result property="changeTime" column="change_time" />
<result property="changeAmount" column="change_amount" />
<result property="referralOrderNo" column="referral_order_no" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="userName" column="userName" />
</resultMap>
<sql id="selectZcBaseWalletChangeVo">
select id, user_id, change_type, pay_type, change_time, change_amount, referral_order_no, del_flag, create_time, update_time from zc_base_wallet_change
</sql>
<select id="selectZcBaseWalletChangeList" parameterType="ZcBaseWalletChange" resultMap="ZcBaseWalletChangeResult">
select a.id, a.user_id, a.change_type, a.pay_type, a.change_time, a.change_amount, a.referral_order_no, a.del_flag, a.create_time, a.update_time,
b.user_name as userName
from zc_base_wallet_change a
left join zc_base_user b on a.user_id = b.id
<where>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="changeType != null and changeType != ''"> and a.change_type = #{changeType}</if>
<if test="payType != null and payType != ''"> and a.pay_type = #{payType}</if>
<if test="changeTime != null "> and a.change_time = #{changeTime}</if>
<if test="changeAmount != null "> and a.change_amount = #{changeAmount}</if>
<if test="referralOrderNo != null and referralOrderNo != ''"> and a.referral_order_no = #{referralOrderNo}</if>
<if test="userName != null and userName != ''"> and b.user_name = #{userName}</if>
</where>
</select>
<select id="selectZcBaseWalletChangeById" parameterType="Long" resultMap="ZcBaseWalletChangeResult">
<include refid="selectZcBaseWalletChangeVo"/>
where id = #{id}
</select>
<insert id="insertZcBaseWalletChange" parameterType="ZcBaseWalletChange" useGeneratedKeys="true" keyProperty="id">
insert into zc_base_wallet_change
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="changeType != null and changeType != ''">change_type,</if>
<if test="payType != null and payType != ''">pay_type,</if>
<if test="changeTime != null">change_time,</if>
<if test="changeAmount != null">change_amount,</if>
<if test="referralOrderNo != null">referral_order_no,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="changeType != null and changeType != ''">#{changeType},</if>
<if test="payType != null and payType != ''">#{payType},</if>
<if test="changeTime != null">#{changeTime},</if>
<if test="changeAmount != null">#{changeAmount},</if>
<if test="referralOrderNo != null">#{referralOrderNo},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateZcBaseWalletChange" parameterType="ZcBaseWalletChange">
update zc_base_wallet_change
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="changeType != null and changeType != ''">change_type = #{changeType},</if>
<if test="payType != null and payType != ''">pay_type = #{payType},</if>
<if test="changeTime != null">change_time = #{changeTime},</if>
<if test="changeAmount != null">change_amount = #{changeAmount},</if>
<if test="referralOrderNo != null">referral_order_no = #{referralOrderNo},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteZcBaseWalletChangeById" parameterType="Long">
delete from zc_base_wallet_change where id = #{id}
</delete>
<delete id="deleteZcBaseWalletChangeByIds" parameterType="String">
delete from zc_base_wallet_change where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>