game-api/ff-game/src/main/resources/mapper/game/GameExchangeMoneyBizMapper.xml

115 lines
4.4 KiB
XML
Raw Normal View History

<?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.ff.game.mapper.GameExchangeMoneyMapper">
<resultMap type="com.ff.game.dto.GameExchangeMoneyDTO" id="GameExchangeMoneyDTOResult">
<result property="id" column="id"/>
<result property="tenantKey" column="tenant_key"/>
<result property="orderId" column="order_id"/>
<result property="currencyCode" column="currency_code"/>
<result property="transactionId" column="transaction_id"/>
<result property="memberId" column="member_id"/>
<result property="platformCode" column="platform_code"/>
<result property="balance" column="balance"/>
<result property="quota" column="quota"/>
<result property="coinBefore" column="coin_before"/>
<result property="coinAfter" column="coin_after"/>
<result property="currencyBefore" column="currency_before"/>
<result property="currencyAfter" column="currency_after"/>
<result property="exchangeType" column="exchange_type"/>
<result property="status" column="status"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="memberAccount" column="member_account"/>
<result property="gameAccount" column="game_account"/>
<result property="step" column="step"/>
<result property="stepStatus" column="step_status"/>
</resultMap>
<select id="selectGameExchangeMoneyDTOList" parameterType="com.ff.game.dto.GameExchangeMoneyDTO"
resultMap="GameExchangeMoneyDTOResult">
select e.id,
e.tenant_key,
e.currency_code,
e.transaction_id,
e.member_id,
e.platform_code,
e.balance,
e.quota,
e.coin_before,
e.coin_after,
e.currency_before,
e.currency_after,
e.exchange_type,
e.status,
e.order_id,
e.create_by,
e.create_time,
e.update_by,
e.update_time,
m.member_account,
m.game_account
from ff_game_exchange_money e
inner join ff_member m on e.member_id = m.id
<where>
<if test="tenantKey != null and tenantKey != ''">
and e.tenant_key = #{tenantKey}
</if>
<if test="orderId != null and orderId != ''">
and e.order_id = #{orderId}
</if>
<if test="currencyCode != null and currencyCode != ''">
and e.currency_code = #{currencyCode}
</if>
<if test="transactionId != null and transactionId != ''">
and e.transaction_id = #{transactionId}
</if>
<if test="memberId != null ">
and e.member_id = #{memberId}
</if>
<if test="platformCode != null and platformCode != ''">
and e.platform_code = #{platformCode}
</if>
<if test="balance != null ">
and e.balance = #{balance}
</if>
<if test="quota != null ">
and e.quota = #{quota}
</if>
<if test="coinBefore != null ">
and e.coin_before = #{coinBefore}
</if>
<if test="coinAfter != null ">
and e.coin_after = #{coinAfter}
</if>
<if test="currencyBefore != null ">
and e.currency_before = #{currencyBefore}
</if>
<if test="currencyAfter != null ">
and e.currency_after = #{currencyAfter}
</if>
<if test="exchangeType != null ">
and e.exchange_type = #{exchangeType}
</if>
<if test="status != null ">
and e.status = #{status}
</if>
<if test="params.beginTime != null">
AND e.create_time &gt;= #{params.beginTime}
</if>
<if test="params.endTime != null">
AND e.create_time &lt;= #{params.endTime}
</if>
<if test="memberAccount != null and memberAccount != ''">
AND m.member_account &lt;= #{memberAccount}
</if>
</where>
</select>
</mapper>