package com.tofly.gpsboot.service.maintain;

import java.util.ArrayList;
import java.util.List;

public interface ViewConversion<T,V>  {

    public default List<T> viewConversion(List<V> list){
        List<T> voList = new ArrayList<>();
        if(list!=null &&list.size()>0){
            list.forEach(li->{
                voList.add((T) entityToVo(li));
            });
        }
        return voList;
    }

    public T entityToVo(V v);
}
