根据前端返回值返回不同类型的List对象

        返回泛型List对象 

public  List findProjectAndOrganPage(String type) {
        if (type.equals(PROJECT)){
            List allList = projectInfoMapper.findAllList(new ProjectInfo());
            return (List) allList;
        }else {
            List allList = organInfoMapper.findAllList(new OrganInfo());
            return (List) allList;
        }
    }

 返回泛型对象 

  public  T transformers(Class type) {
        
    }

 

你可能感兴趣的:(windows,linux,服务器)