|
|
@@ -300,17 +300,29 @@ public class LawyerConsultationOrderController {
|
|
|
@ApiImplicitParam(name = "size", value = "页容(默认10)", dataType = "int", paramType = "query"),
|
|
|
@ApiImplicitParam(name = "startDate", value = "开始时间", dataType = "String", paramType = "query"),
|
|
|
@ApiImplicitParam(name = "endDate", value = "结束时间", dataType = "String", paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "lawyerId", value = "律师ID", dataType = "String", paramType = "query")
|
|
|
+ @ApiImplicitParam(name = "lawyerId", value = "律师ID", dataType = "String", paramType = "query", required = true)
|
|
|
})
|
|
|
@GetMapping("/getLawyerConsultationOrderList")
|
|
|
- public R<IPage<LawyerConsultationOrderVO>> getLawyerConsultationOrderList(@RequestParam(defaultValue = "1") int page,
|
|
|
- @RequestParam(defaultValue = "10") int size,
|
|
|
- @RequestParam(required = false) String startDate,
|
|
|
- @RequestParam(required = false) String endDate,
|
|
|
- @RequestParam(required = true) String lawyerId) {
|
|
|
- log.info("LawyerConsultationOrderController.getLawyerConsultationOrderList?pageNum={},pageSize={},startDate={},endDate={},lawyerId={}",
|
|
|
+ public R<IPage<LawyerConsultationOrderVO>> getLawyerConsultationOrderList(
|
|
|
+ @RequestParam(defaultValue = "1") int page,
|
|
|
+ @RequestParam(defaultValue = "10") int size,
|
|
|
+ @RequestParam(required = false) String startDate,
|
|
|
+ @RequestParam(required = false) String endDate,
|
|
|
+ @RequestParam(required = true) String lawyerId) {
|
|
|
+ log.info("查询咨询订单(律师端)- page={}, size={}, startDate={}, endDate={}, lawyerId={}",
|
|
|
page, size, startDate, endDate, lawyerId);
|
|
|
- return consultationOrderService.getLawyerConsultationOrderList(page, size, startDate, endDate, lawyerId);
|
|
|
+
|
|
|
+ // 参数校验:分页参数
|
|
|
+ int pageNum = page > 0 ? page : 1;
|
|
|
+ int pageSize = size > 0 ? size : 10;
|
|
|
+
|
|
|
+ // 参数校验:律师ID不能为空
|
|
|
+ if (lawyerId == null || lawyerId.trim().isEmpty()) {
|
|
|
+ log.warn("查询咨询订单失败:律师ID为空");
|
|
|
+ return R.fail("律师ID不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ return consultationOrderService.getLawyerConsultationOrderList(pageNum, pageSize, startDate, endDate, lawyerId);
|
|
|
}
|
|
|
|
|
|
}
|