|
|
|
@ -181,17 +181,20 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
return count; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<HighChildOrder> getChildOrderByOrder(Long orderId) { |
|
|
|
|
HighChildOrderExample example = new HighChildOrderExample(); |
|
|
|
|
example.createCriteria().andOrderIdEqualTo(orderId); |
|
|
|
|
return highChildOrderMapper.selectByExample(example); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public HighOrder getOrderById(Long id) { |
|
|
|
|
HighOrder order = highOrderMapper.selectByPrimaryKey(id); |
|
|
|
|
if (order == null) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
HighChildOrderExample example = new HighChildOrderExample(); |
|
|
|
|
example.createCriteria().andOrderIdEqualTo(order.getId()); |
|
|
|
|
order.setHighChildOrderList(highChildOrderMapper.selectByExample(example)); |
|
|
|
|
|
|
|
|
|
order.setHighChildOrderList(getChildOrderByOrder(order.getId())); |
|
|
|
|
return order; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -230,7 +233,13 @@ public class HighOrderServiceImpl implements HighOrderService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
example.setOrderByClause("create_time desc"); |
|
|
|
|
return highOrderMapper.selectByExample(example); |
|
|
|
|
List<HighOrder> list = highOrderMapper.selectByExample(example); |
|
|
|
|
if (list.size() > 0) { |
|
|
|
|
for (HighOrder order : list) { |
|
|
|
|
order.setHighChildOrderList(getChildOrderByOrder(order.getId())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return new ArrayList<>(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|