|
|
@@ -19,9 +19,70 @@
|
|
|
<result column="currency" property="currency" />
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap id="RefundVoMap" type="com.kym.entity.miniapp.vo.RefundVo">
|
|
|
+ <result column="id" property="refundLogId" />
|
|
|
+ <result column="user_id" property="userId" />
|
|
|
+ <result column="mobile_phone" property="mobilePhone" />
|
|
|
+ <result column="balance" property="balance" />
|
|
|
+ <result column="frozenAmount" property="frozenAmount" />
|
|
|
+ <result column="out_refund_no" property="outRefundNo" />
|
|
|
+ <result column="out_trade_no" property="outTradeNo" />
|
|
|
+ <result column="channel" property="channel" />
|
|
|
+ <result column="user_received_account" property="userReceivedAccount" />
|
|
|
+ <result column="success_time" property="successTime" />
|
|
|
+ <result column="status" property="status" />
|
|
|
+ <result column="total" property="total" />
|
|
|
+ <result column="refund" property="refund" />
|
|
|
+ <result column="currency" property="currency" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<!-- 通用查询结果列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
- user_id, refund_id, out_refund_no, transaction_id, out_trade_no, channel, user_received_account, success_time, status, funds_account, total, refund, currency
|
|
|
+ id,user_id, refund_id, out_refund_no, transaction_id, out_trade_no, channel, user_received_account, success_time, status, funds_account, total, refund, currency,create_time,update_time
|
|
|
</sql>
|
|
|
|
|
|
+
|
|
|
+ <select id="listRefundLog" resultMap="RefundVoMap" parameterType="com.kym.entity.admin.queryParams.CommonQueryParam">
|
|
|
+ SELECT
|
|
|
+ t1.id,
|
|
|
+ t4.user_id,
|
|
|
+ t4.mobile_phone,
|
|
|
+ t4.balance,
|
|
|
+ t4.frozen_amount,
|
|
|
+ t1.out_refund_no,
|
|
|
+ t1.out_trade_no,
|
|
|
+ t1.channel,
|
|
|
+ t1.user_received_account,
|
|
|
+ t1.success_time,
|
|
|
+ t1.`status`,
|
|
|
+ t1.`total`,
|
|
|
+ t1.`refund`,
|
|
|
+ t1.`channel`,
|
|
|
+ t1.`currency`
|
|
|
+ FROM
|
|
|
+ t_refund_log t1
|
|
|
+ LEFT JOIN
|
|
|
+ (SELECT
|
|
|
+ t2.id user_id,
|
|
|
+ t2.mobile_phone,
|
|
|
+ t3.balance,
|
|
|
+ t3.frozen_amount
|
|
|
+ FROM
|
|
|
+ t_user t2
|
|
|
+ LEFT JOIN t_account t3
|
|
|
+ ON t2.id = t3.user_id) t4
|
|
|
+ ON t1.user_id = t4.user_id
|
|
|
+ <where>
|
|
|
+ <if test="params.mobilePhone != null">
|
|
|
+ and t4.mobile_phone = #{params.mobilePhone}
|
|
|
+ </if>
|
|
|
+ <if test="params.status != null">
|
|
|
+ and t1.status = #{params.status}
|
|
|
+ </if>
|
|
|
+ <if test="params.id != null">
|
|
|
+ and t1.id = #{params.id}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|