fix: 交易记录问题修复。
This commit is contained in:
@@ -165,4 +165,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="batchPlusCurrentBalance" >
|
||||
update accounts_deal_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="currentBalance != null ">current_balance = current_balance+#{currentBalance},</if>
|
||||
</trim>
|
||||
where account_id = #{accountId}
|
||||
<if test="startDateTime!=null">
|
||||
and create_time>=#{startDateTime}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="batchMinusCurrentBalance" >
|
||||
update accounts_deal_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="currentBalance != null ">current_balance = current_balance-#{currentBalance},</if>
|
||||
</trim>
|
||||
where account_id = #{accountId}
|
||||
<if test="startDateTime!=null">
|
||||
and create_time>=#{startDateTime}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<select id="getLastOneAccountsDealRecordByMap" resultMap="AccountsDealRecordResult">
|
||||
<include refid="selectAccountsDealRecordVo"/>
|
||||
where a.account_id = #{accountId}
|
||||
and a.del_flag='0'
|
||||
<if test="startDateTime!=null">
|
||||
and #{startDateTime}>=a.create_time
|
||||
</if>
|
||||
order by a.create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user