You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.5 KiB

<?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.qniao.dam.infrastructure.persistent.dao.view.WalletAccountViewDao">
<select id="pageWalletAccountRecord"
resultType="com.qniao.dam.api.query.walletaccount.user.response.UserGetWalletAccountRecordVo">
SELECT
dwar.id,
dwar.create_time,
dwar.wallet_account_id,
dwar.trade_type,
dwar.trade_amount,
dwar.is_income,
dwar.content,
dwar.remark
FROM da_wallet_account_record as dwar
INNER JOIN da_wallet_account as dwa on dwa.id=dwar.wallet_account_id
where dwa.is_delete=0 and dwa.user_id=#{userId}
<if test="queryParam.tradeType != null">
and dwar.trade_type = #{queryParam.tradeType}
</if>
order by dwar.create_time desc
</select>
<select id="listAssociateOrderRecordBy"
resultType="com.qniao.dam.api.query.walletaccount.user.response.WalletAccountAssociateOrderRecordVo">
select
wallet_account_record_id,
associate_order_id,
associate_order_amount
FROM da_wallet_account_associate_order_record
where wallet_account_record_id in
<foreach collection="recordIdList" item="recordId" open="(" close=")" separator=",">
#{recordId}
</foreach>
</select>
</mapper>