这是postman上的运行结果
public OrderGroupDto selectOrderGroupById(String id) throws ScExtException {
List<OrderGroupEntity> orderGroupEntityList = new ArrayList<>();
OrderGroupEntity orderEntity = orderGroupMapper.selectByPrimaryKey(id);
if (orderEntity == null){
throw new ScExtException("该订单组不存在");
}
orderGroupEntityList.add(orderEntity);
return orderGroupEntity2OrderGroupDto(orderGroupEntityList).get(0);
}
上面是这个接口的service层,想使用selectByPrimaryKey的方法,但结果总是Index 0 out of bounds for length 0,求解