租电订单
This commit is contained in:
@ -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>
|
||||
@ -111,7 +111,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="overdueFee != null "> and a.overdue_fee = #{overdueFee}</if>
|
||||
<if test="isDepositFree != null "> and a.is_deposit_free = #{isDepositFree}</if>
|
||||
<if test="isAutoDeduct != null "> and a.is_auto_deduct = #{isAutoDeduct}</if>
|
||||
<if test="firstOrderTime != null "> and a.first_order_time = #{firstOrderTime}</if>
|
||||
<if test="startRentTime != null "> and a.start_rent_time = #{startRentTime}</if>
|
||||
<if test="overdueDays != null "> and a.overdue_days = #{overdueDays}</if>
|
||||
<if test="renewalTimes != null "> and a.renewal_times = #{renewalTimes}</if>
|
||||
@ -121,6 +120,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<if test="storeName != null and storeName!= '' "> and s.name = #{storeName}</if>
|
||||
<if test="licensePlate != null and licensePlate!= '' "> and zc.license_plate = #{licensePlate}</if>
|
||||
<if test="params.beginFirstOrderTime != null and params.beginFirstOrderTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(a.first_order_time,'%y%m%d') >= date_format(#{params.beginFirstOrderTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endFirstOrderTime != null and params.endFirstOrderTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(a.first_order_time,'%y%m%d') <= date_format(#{params.endFirstOrderTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
order by a.update_time desc
|
||||
</select>
|
||||
|
||||
@ -37,6 +37,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||
<if test="paymentId != null and paymentId != ''"> and payment_id = #{paymentId}</if>
|
||||
<if test="paidAt != null "> and paid_at = #{paidAt}</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user