phpcjl
2024-12-16 8c2a413d2574151a2bc762aa0779f766de48160b
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/RefundPassMapper.xml
@@ -1,7 +1,38 @@
<?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.ruoyi.account.mapper.RefundPassMapper">
<mapper namespace="com.ruoyi.order.mapper.RefundPassMapper">
   <select id="getOrderRefundPassList" resultType="com.ruoyi.order.vo.OrderRefundPassList">
      select
         a.id,
         b.order_number as orderNumber,
         b.app_user_id as appUserId,
         DATE_FORMAT(a.create_time, '%Y-%m-%d %H:%m:%s') as createTime,
         a.refund_method as refundMethod,
         a.refund_reason as refundReason,
         a.pass_status as passStatus
      from t_refund_pass a
      left join t_order b on (a.order_id = b.id)
      where a.del_flag = 0
      <if test="null != code and '' != code">
         and b.order_number like CONCAT('%', #{code}, '%')
      </if>
      <if test="null != appUserIds and appUserIds.size() > 0">
         and b.app_user_id in
         <foreach collection="appUserIds" item="item" index="index" open="(" separator="," close=")">
            #{item}
         </foreach>
      </if>
      <if test="null != refundMethod">
         and a.refund_method = #{refundMethod}
      </if>
      <if test="null != status">
         and a.status = #{status}
      </if>
      <if test="null != shopId">
         and b.shop_id = #{shopId} and b.order_type = 1
      </if>
      order by a.create_time desc
   </select>
</mapper>