|
@@ -1,16 +1,13 @@
|
|
|
package com.usky.park.controller.web;
|
|
|
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.usky.common.core.bean.ApiResult;
|
|
|
import com.usky.common.core.bean.CommonPage;
|
|
|
import com.usky.park.domain.DataStHistory;
|
|
|
import com.usky.park.service.DataStHistoryService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
/**
|
|
|
* <p>
|
|
|
* 无人驿站历史数据 前端控制器
|
|
@@ -31,6 +28,7 @@ public class DataStHistoryController {
|
|
|
* 新增
|
|
|
*
|
|
|
* @param dataStHistory
|
|
|
+ * @param appKey
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/add")
|
|
@@ -40,15 +38,17 @@ public class DataStHistoryController {
|
|
|
}
|
|
|
/**
|
|
|
* 分页查询
|
|
|
- *
|
|
|
+ * @param pickupStatus
|
|
|
+ * @param pageNum
|
|
|
+ * @param pageSize
|
|
|
* @return
|
|
|
*/
|
|
|
- @PostMapping("/pageQuery")
|
|
|
- public CommonPage<DataStHistory> pageQuery(@RequestBody String requestBody) {
|
|
|
- JSONObject params = JSONObject.parseObject(requestBody);
|
|
|
- Integer pageNum = (Integer) params.getOrDefault("pageNum", 1);
|
|
|
- Integer pageSize = (Integer) params.getOrDefault("pageSize", 10);
|
|
|
- return dataStHistoryService.pageList(pageNum, pageSize);
|
|
|
+ @GetMapping("/pageQuery")
|
|
|
+ public ApiResult<CommonPage<DataStHistory>> pageQuery(
|
|
|
+ @RequestParam(value = "pickupStatus", required = false, defaultValue = "-1") Integer pickupStatus,//设置默认值为-1,则查询所有包裹(未取件优先展示)
|
|
|
+ @RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
|
|
+ @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) {
|
|
|
+ return ApiResult.success(dataStHistoryService.pageList(pickupStatus, pageNum, pageSize));
|
|
|
}
|
|
|
}
|
|
|
|