浏览代码

feat: 增加获取送货记录的接口,用对象封装返回体

suntg 6 年之前
父节点
当前提交
05057f5420
共有 1 个文件被更改,包括 19 次插入1 次删除
  1. 19 1
      src/main/java/com/uas/platform/b2b/mall2/controller/SaleNoticeController.java

+ 19 - 1
src/main/java/com/uas/platform/b2b/mall2/controller/SaleNoticeController.java

@@ -1,15 +1,18 @@
 package com.uas.platform.b2b.mall2.controller;
 package com.uas.platform.b2b.mall2.controller;
 
 
-import com.uas.platform.b2b.model.SearchFilter;
+import com.uas.platform.b2b.model.SaleSendItem;
 import com.uas.platform.b2b.service.PurchaseNoticeService;
 import com.uas.platform.b2b.service.PurchaseNoticeService;
 import com.uas.platform.b2b.support.SystemSession;
 import com.uas.platform.b2b.support.SystemSession;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 
+import java.util.List;
+
 
 
 /**
 /**
  * 提供给新商城的送货提醒接口
  * 提供给新商城的送货提醒接口
@@ -36,4 +39,19 @@ public class SaleNoticeController {
         modelMap.put("todo", purchaseNoticeService.countTodo(vendUU));
         modelMap.put("todo", purchaseNoticeService.countTodo(vendUU));
         return modelMap;
         return modelMap;
     }
     }
+
+    /**
+     * 根据送货提醒id,获取送货单明细记录
+     *
+     * @param noticeId
+     * @return
+     */
+    @RequestMapping(value = "/{noticeId}/sendItems", method = RequestMethod.GET)
+    @ResponseBody
+    public ModelMap getSendItemsNoticeById(@PathVariable("noticeId") Long noticeId) {
+        ModelMap modelMap = new ModelMap();
+        List<SaleSendItem> sendItems = purchaseNoticeService.findSendById(noticeId);
+        modelMap.put("sendItems", sendItems);
+        return modelMap;
+    }
 }
 }