图片上传

This commit is contained in:
2021-11-15 19:01:59 +08:00
parent d8b38f053f
commit e2b9754a5b
16 changed files with 787 additions and 24 deletions
@@ -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);
}
@@ -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);
}
}