<?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.zsElectric.boot.business.mapper.UserOrderInfoMapper">

    <!-- 获取用户支付订单信息分页列表 -->
    <select id="getUserOrderInfoPage" resultType="com.zsElectric.boot.business.model.vo.UserOrderInfoVO">
        SELECT
        id,
        user_id,
        order_no,
        order_money,
        last_money,
        pay_time,
        level_id,
        out_trade_no,
        order_status,
        order_type,
        app_id,
        refund_money,
        refund_time,
        remark,
        version,
        create_time,
        update_time,
        is_deleted
        FROM
        c_user_order_info
        <where> is_deleted = 0
        <if test="queryParams.userId != null">
            AND user_id = #{queryParams.userId}
        </if>
        </where>
        ORDER BY create_time DESC
    </select>

</mapper>
