我的类结构的这样的.
public interface CommonUploadService {
public void add(List excelDatalist);
public List sameList(List excelDatalist) throws UploadException;
public void deleteSame(List excelDataList);
public void setLog(String userName,String fileName) throws UploadException;
}
public interface CityDayService extends CommonUploadService{
public List findByCityAndDate(String city,Date date);
}
public interface ZhbTCityDayForecastService extends CommonUploadService {
public List findByCityAndDate(String city, Date date);
}
其中,CommonUploadService 中setLog方法,在CityDayService 实现类和ZhbTCityDayForecastService 实现类是一样的.如何调整结构,能重用 setLog方法.我想继承一个BaseService,它里面写setLog方法,来达到重用.但又不知道写到哪里?
我的结构图的这样的.