Bladeren bron

订单查询接口逻辑

zhang song 6 jaren geleden
bovenliggende
commit
e34e16fbfb

+ 6 - 0
pine-admin/src/main/java/com/pine/admin/modules/business/entity/CarOrder.java

@@ -286,4 +286,10 @@ public class CarOrder implements Serializable {
      */
     @ApiModelProperty(value = "搜索条件  查询首付/尾款0 未支付 1 已线下支付  2 已经在线支付",name = "offlinePayType")
     private String offlinePayType;
+
+    /**
+     * 退单状态 1 待审核 2 审核通过 3 审核不通过 4 已退款
+     */
+    @ApiModelProperty(value = "退单状态 1 待审核 2 审核通过 3 审核不通过 4 已退款", name = "status")
+    private String backStatus;
 }

+ 5 - 7
pine-admin/src/main/resources/mapper/business/CarOrderDao.xml

@@ -391,16 +391,17 @@
             <if test="record.offlinePayType == 2">
                 and status = 3
             </if>
-            and loan_status != 2
+--             and loan_status != 2
             and status != 1
         </where>
         order by id desc
     </select>
     <!-- 查询退订订单  -->
     <select id="queryBackByPage" parameterType="java.util.Map"  resultMap="offlinePayments">
-        select lco.* from ls_car_order lco JOIN ls_car_back_order lcbo on lco.`code` =
+        select lco.*, lcbo.status backStatus from ls_car_order lco JOIN ls_car_back_order lcbo on lco.`code` =
         lcbo.order_code
         <where>
+            and lco.status != 1 and lco.status !=4
             <if test="record.code != null and !&quot;&quot;.equals(record.code)">
                 and lco.code = #{record.code}
             </if>
@@ -452,8 +453,6 @@
             <if test="record.cancelReason != null and !&quot;&quot;.equals(record.cancelReason)">
                 and lco.cancel_reason = #{record.cancelReason}
             </if>
-            and lco.loan_status != 2
-            and lco.status != 1
         </where>
         order by lco.id desc
     </select>
@@ -466,6 +465,8 @@
         from ls_car_order lco
         LEFT JOIN ls_offline_payments lof ON lco.id = lof.car_order_id
         <where>
+            and lco.status != 1 and lco.status !=4
+
             <if test="record.code != null and !&quot;&quot;.equals(record.code)">
                 and lco.code = #{record.code}
             </if>
@@ -561,9 +562,6 @@
                 and lof.car_order_id is null
                 AND lco.status !=3
             </if>
-
-            and lco.loan_status != 2
-            and lco.status != 1
         </where>
         order by lco.id desc
     </select>