Commit 7eb166c9 authored by unset's avatar unset

Merge branch 'dev-chw-vehicle' into dev-chw

parents 7837591c e458606c
...@@ -74,7 +74,7 @@ public class OrderViolationController extends BaseController<OrderViolationBiz, ...@@ -74,7 +74,7 @@ public class OrderViolationController extends BaseController<OrderViolationBiz,
* @return * @return
*/ */
@GetMapping("/getOne/{detailId}") @GetMapping("/getOne/{detailId}")
public ObjectRestResponse<OrderViolation> getOne(@PathVariable Integer detailId) { public ObjectRestResponse<List<OrderViolation>> getOne(@PathVariable Integer detailId) {
Example exa = Example.builder(OrderViolation.class) Example exa = Example.builder(OrderViolation.class)
.where(WeekendSqls.<OrderViolation>custom().andEqualTo(OrderViolation::getDetailId, detailId) .where(WeekendSqls.<OrderViolation>custom().andEqualTo(OrderViolation::getDetailId, detailId)
.andEqualTo(OrderViolation::getIsDel, 0)).build(); .andEqualTo(OrderViolation::getIsDel, 0)).build();
...@@ -82,9 +82,7 @@ public class OrderViolationController extends BaseController<OrderViolationBiz, ...@@ -82,9 +82,7 @@ public class OrderViolationController extends BaseController<OrderViolationBiz,
if (orderViolations.size() > 1) { if (orderViolations.size() > 1) {
throw new BaseException("The database has multiple records"); throw new BaseException("The database has multiple records");
} }
OrderViolation orderViolation = new OrderViolation(); return ObjectRestResponse.succ(orderViolations);
orderViolation = (orderViolations.size() == 0) ? null : orderViolations.get(0);
return ObjectRestResponse.succ(orderViolation);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment