<?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="org.springblade.modules.pay.mapper.PaymentInfoMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="paymentInfoResultMap" type="org.springblade.modules.pay.entity.PaymentInfoEntity">
|
</resultMap>
|
|
|
<select id="selectPaymentInfoPage" resultMap="paymentInfoResultMap">
|
select * from jczz_payment_info where is_deleted = 0
|
</select>
|
|
<resultMap type="org.springblade.modules.pay.dto.PaymentInfoDTO" id="PaymentInfoDTOResult">
|
<result property="id" column="id" />
|
<result property="orderNo" column="order_no" />
|
<result property="transactionId" column="transaction_id" />
|
<result property="paymentType" column="payment_type" />
|
<result property="tradeType" column="trade_type" />
|
<result property="tradeState" column="trade_state" />
|
<result property="payerTotal" column="payer_total" />
|
<result property="content" column="content" />
|
<result property="createTime" column="create_time" />
|
<result property="updateTime" column="update_time" />
|
</resultMap>
|
|
<sql id="selectPaymentInfo">
|
select
|
id,
|
order_no,
|
transaction_id,
|
payment_type,
|
trade_type,
|
trade_state,
|
payer_total,
|
content,
|
create_time,
|
update_time
|
from
|
jczz_payment_info
|
</sql>
|
|
<select id="selectPaymentInfoById" parameterType="long" resultMap="PaymentInfoDTOResult">
|
<include refid="selectPaymentInfo"/>
|
where
|
id = #{id}
|
</select>
|
|
<select id="selectPaymentInfoList" parameterType="org.springblade.modules.pay.dto.PaymentInfoDTO" resultMap="PaymentInfoDTOResult">
|
<include refid="selectPaymentInfo"/>
|
<where>
|
<if test="id != null "> and id = #{id}</if>
|
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
|
<if test="transactionId != null and transactionId != ''"> and transaction_id = #{transactionId}</if>
|
<if test="paymentType != null and paymentType != ''"> and payment_type = #{paymentType}</if>
|
<if test="tradeType != null and tradeType != ''"> and trade_type = #{tradeType}</if>
|
<if test="tradeState != null and tradeState != ''"> and trade_state = #{tradeState}</if>
|
<if test="payerTotal != null and payerTotal != ''"> and payer_total = #{payerTotal}</if>
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
</where>
|
</select>
|
</mapper>
|