图片上传
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
package com.fangjia.service.sql;
|
||||
import com.fangjia.dal.sql.model.ReportFileAttach;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ReportFileAttachService {
|
||||
|
||||
void save(ReportFileAttach reportFileAttach);
|
||||
|
||||
ReportFileAttach findFirstByParams(Integer evaluationId, String queryId, Integer userId, Integer fileClass, String fileName);
|
||||
|
||||
List<ReportFileAttach> findAllByParams(Integer evaluationId, String queryId, Integer userId);
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.fangjia.service.sql;
|
||||
|
||||
import com.fangjia.dal.QueryParam;
|
||||
import com.fangjia.dal.sql.fangjia.dao.ReportFileAttachDao;
|
||||
import com.fangjia.dal.sql.model.ReportFileAttach;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ReportFileAttachServiceImpl implements ReportFileAttachService{
|
||||
private ReportFileAttachDao reportFileAttachDao;
|
||||
|
||||
public ReportFileAttachDao getReportFileAttachDao() {
|
||||
return reportFileAttachDao;
|
||||
}
|
||||
|
||||
public void setReportFileAttachDao(ReportFileAttachDao reportFileAttachDao) {
|
||||
this.reportFileAttachDao = reportFileAttachDao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(ReportFileAttach reportFileAttach) {
|
||||
reportFileAttachDao.save(reportFileAttach);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReportFileAttach findFirstByParams(Integer evaluationId, String queryId, Integer userId, Integer fileClass, String fileName) {
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
params.add(new QueryParam("userId", userId));
|
||||
params.add(new QueryParam("evaluationId", evaluationId));
|
||||
params.add(new QueryParam("queryId", queryId));
|
||||
params.add(new QueryParam("fileClass", fileClass));
|
||||
params.add(new QueryParam("fileName", fileName));
|
||||
return reportFileAttachDao.findFirstByParams(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReportFileAttach> findAllByParams(Integer evaluationId, String queryId, Integer userId) {
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
params.add(new QueryParam("userId", userId));
|
||||
params.add(new QueryParam("evaluationId", evaluationId));
|
||||
params.add(new QueryParam("queryId", queryId));
|
||||
return reportFileAttachDao.findAllByParams(params);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user