Forráskód Böngészése

供应商子订单详情

chao 3 éve
szülő
commit
c987a8154d

+ 20 - 1
src/main/java/com/caimei365/order/controller/ShipApi.java

@@ -50,6 +50,19 @@ public class ShipApi {
         return shipService.getShopOrderList(shopId, sendOutStatus, payStatus, shopOrderNo, receiver, pageNum, pageSize);
     }
 
+    /**
+     * 供应商子订单详情
+     */
+    @ApiOperation("供应商子订单详情(旧:/supplier/shopOrderDetails)")
+    @ApiImplicitParam(required = true, name = "shopOrderId", value = "子订单Id")
+    @GetMapping("/detail")
+    public ResponseJson<Map<String, Object>> getShopOrderDetail(Integer shopOrderId) {
+        if (null == shopOrderId) {
+            return ResponseJson.error("参数不能为空!", null);
+        }
+        return shipService.getShopOrderDetail(shopOrderId);
+    }
+
     /**
      * 发货页面子订单数据
      */
@@ -66,7 +79,7 @@ public class ShipApi {
     /**
      * 物流公司
      */
-    @ApiOperation("供应商订单列表(旧:/supplier/logisticsCompany)")
+    @ApiOperation("物流公司(旧:/supplier/logisticsCompany)")
     @ApiImplicitParam(required = true, name = "value", value = "快递公司代码")
     @GetMapping("/ship/company")
     public ResponseJson<List<CompanyVo>> getLogisticsCompany(String value) {
@@ -143,6 +156,12 @@ public class ShipApi {
         return shipService.getLogisticsInfo(shopOrderId, logisticsBatchId);
     }
 
+
+
+
+
+
+
     /**
      * 删除物流信息
      */

+ 6 - 0
src/main/java/com/caimei365/order/mapper/ShipMapper.java

@@ -3,6 +3,7 @@ package com.caimei365.order.mapper;
 import com.caimei365.order.model.po.LogisticsBatchPo;
 import com.caimei365.order.model.po.LogisticsInformationPo;
 import com.caimei365.order.model.po.LogisticsRecordPo;
+import com.caimei365.order.model.po.PayShopRecordPo;
 import com.caimei365.order.model.vo.*;
 import org.apache.ibatis.annotations.Mapper;
 
@@ -115,4 +116,9 @@ public interface ShipMapper {
      * @param logisticsBatchId 发货物流批次Id
      */
     void deleteLogisticsInfoByBatchId(Integer logisticsBatchId);
+    /**
+     * 结算记录
+     * @param shopOrderId 子订单Id
+     */
+    List<PayShopRecordPo> getPayShopRecordList(Integer shopOrderId);
 }

+ 7 - 0
src/main/java/com/caimei365/order/service/ShipService.java

@@ -27,6 +27,11 @@ public interface ShipService {
      * @param pageSize       每页数量
      */
     ResponseJson<PageInfo<ShopOrderVo>> getShopOrderList(Integer shopId, Integer sendOutStatus, Integer payStatus, String shopOrderNo, String receiver, int pageNum, int pageSize);
+    /**
+     * 供应商子订单详情
+     * @param shopOrderId 子订单Id
+     */
+    ResponseJson<Map<String, Object>> getShopOrderDetail(Integer shopOrderId);
     /**
      * 发货页面子订单数据
      * @param shopOrderId 子订单Id
@@ -78,4 +83,6 @@ public interface ShipService {
      * @param logisticsBatchId 发货物流批次Id
      */
     ResponseJson<Void> cancelDelivery(Integer logisticsBatchId);
+
+
 }

+ 21 - 0
src/main/java/com/caimei365/order/service/impl/ShipServiceImpl.java

@@ -11,6 +11,7 @@ import com.caimei365.order.model.dto.LogisticsDto;
 import com.caimei365.order.model.po.LogisticsBatchPo;
 import com.caimei365.order.model.po.LogisticsInformationPo;
 import com.caimei365.order.model.po.LogisticsRecordPo;
+import com.caimei365.order.model.po.PayShopRecordPo;
 import com.caimei365.order.model.vo.*;
 import com.caimei365.order.service.RemoteCallService;
 import com.caimei365.order.service.ShipService;
@@ -78,6 +79,26 @@ public class ShipServiceImpl implements ShipService {
         return ResponseJson.success(pageInfo);
     }
 
+    /**
+     * 供应商子订单详情
+     *
+     * @param shopOrderId 子订单Id
+     */
+    @Override
+    public ResponseJson<Map<String, Object>> getShopOrderDetail(Integer shopOrderId) {
+        ShopOrderVo shopOrder = shipMapper.getShopOrder(shopOrderId);
+        if (null == shopOrder) {
+            return ResponseJson.error("子订单异常,shopOrderId:" + shopOrderId, null);
+        }
+        setShopOrderInfo(shopOrder);
+        Map<String, Object> map = new HashMap<>(2);
+        map.put("shopOrder", shopOrder);
+        // 结算记录
+        List<PayShopRecordPo> payShopRecord = shipMapper.getPayShopRecordList(shopOrderId);
+        map.put("payShopRecord", payShopRecord);
+        return ResponseJson.success(map);
+    }
+
     /**
      * 发货页面子订单数据
      *

+ 18 - 0
src/main/resources/mapper/ShipMapper.xml

@@ -217,4 +217,22 @@
         remark
         FROM cm_logistics_batch WHERE id= #{logisticsBatchId}
     </select>
+    <select id="getPayShopRecordList" resultType="com.caimei365.order.model.po.PayShopRecordPo">
+        SELECT
+            id,
+            shopID AS shopId,
+            shopOrderID AS shopOrderId,
+            shopOrderNo,
+            payAmount,
+            wipePayment,
+            payType,
+            payTime,
+            payShopID AS payShopId,
+            status,
+            delFlag
+        FROM cm_pay_shop_record
+        WHERE delFlag = '0'
+        AND shopOrderID = #{shopOrderId}
+        ORDER BY payTime desc
+    </select>
 </mapper>