|
@@ -40,10 +40,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="tranType3" column="tran_type3" />
|
|
<result property="tranType3" column="tran_type3" />
|
|
<result property="uid" column="uid" />
|
|
<result property="uid" column="uid" />
|
|
<result property="withdrawFlag" column="withdraw_flag" />
|
|
<result property="withdrawFlag" column="withdraw_flag" />
|
|
|
|
+ <result property="withdrawTime" column="withdraw_time" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFinTranRecordVo">
|
|
<sql id="selectFinTranRecordVo">
|
|
- select id, after_coin, after_money, after_ticket, after_diamond_coin, agent_id, coin_change, diamond_coin_change, commission_related_uid, consumption_coin, consumption_money, create_time, currency_type, from_uid, goods_id, guild_id, manager_co_id, manager_id, money_change, order_id, perc, pro_count, pro_id, remarks, scene_id1, scene_id2, scene_type, ticket_change, to_uid, tran_group_id, tran_type1, tran_type2, tran_type3, uid,withdraw_flag from fin_tran_record
|
|
|
|
|
|
+ select id, after_coin, after_money, after_ticket, after_diamond_coin, agent_id, coin_change, diamond_coin_change, commission_related_uid, consumption_coin, consumption_money, create_time, currency_type, from_uid, goods_id, guild_id, manager_co_id, manager_id, money_change, order_id, perc, pro_count, pro_id, remarks, scene_id1, scene_id2, scene_type, ticket_change, to_uid, tran_group_id, tran_type1, tran_type2, tran_type3, uid,withdraw_flag,withdraw_time from fin_tran_record
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectFinTranRecordList" parameterType="com.game.business.domain.FinTranRecord" resultMap="FinTranRecordResult">
|
|
<select id="selectFinTranRecordList" parameterType="com.game.business.domain.FinTranRecord" resultMap="FinTranRecordResult">
|
|
@@ -131,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="tranType3 != null">tran_type3,</if>
|
|
<if test="tranType3 != null">tran_type3,</if>
|
|
<if test="uid != null">uid,</if>
|
|
<if test="uid != null">uid,</if>
|
|
<if test="withdrawFlag != null">withdraw_flag,</if>
|
|
<if test="withdrawFlag != null">withdraw_flag,</if>
|
|
|
|
+ <if test="withdrawTime != null">withdraw_time,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="id != null">#{id},</if>
|
|
@@ -168,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="tranType3 != null">#{tranType3},</if>
|
|
<if test="tranType3 != null">#{tranType3},</if>
|
|
<if test="uid != null">#{uid},</if>
|
|
<if test="uid != null">#{uid},</if>
|
|
<if test="withdrawFlag != null">#{withdrawFlag},</if>
|
|
<if test="withdrawFlag != null">#{withdrawFlag},</if>
|
|
|
|
+ <if test="withdrawTime != null">#{withdrawTime},</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -208,6 +211,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="tranType3 != null">tran_type3 = #{tranType3},</if>
|
|
<if test="tranType3 != null">tran_type3 = #{tranType3},</if>
|
|
<if test="uid != null">uid = #{uid},</if>
|
|
<if test="uid != null">uid = #{uid},</if>
|
|
<if test="withdrawFlag != null">withdraw_flag = #{withdrawFlag},</if>
|
|
<if test="withdrawFlag != null">withdraw_flag = #{withdrawFlag},</if>
|
|
|
|
+ <if test="withdrawTime != null">withdraw_time = #{withdrawTime},</if>
|
|
</trim>
|
|
</trim>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</update>
|
|
</update>
|
|
@@ -447,6 +451,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="withdrawFlag != null">
|
|
<if test="withdrawFlag != null">
|
|
AND a.withdraw_flag = #{withdrawFlag}
|
|
AND a.withdraw_flag = #{withdrawFlag}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="withdrawFlag == null">
|
|
|
|
+ AND a.withdraw_flag != -1
|
|
|
|
+ </if>
|
|
AND a.uid = #{userId}
|
|
AND a.uid = #{userId}
|
|
AND a.currency_type = 4
|
|
AND a.currency_type = 4
|
|
ORDER BY
|
|
ORDER BY
|
|
@@ -470,4 +477,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
a.create_time DESC
|
|
a.create_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="sumCoinByType" resultType="java.lang.Double">
|
|
|
|
+ SELECT
|
|
|
|
+ ifnull( sum( diamond_coin_change ), 0 )
|
|
|
|
+ FROM
|
|
|
|
+ fin_tran_record
|
|
|
|
+ WHERE
|
|
|
|
+ uid = #{userId}
|
|
|
|
+ and currency_type = 4
|
|
|
|
+ <if test="type3s != null">
|
|
|
|
+ and tran_type3 IN
|
|
|
|
+ <foreach item="id" collection="type3s" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateTime != null and dateTime != ''">
|
|
|
|
+ AND create_time >= #{dateTime}
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|