xlsView 체크 제거

master
mjkhan21 7 months ago
parent ccdc719e0c
commit 49ec1c9c0f

@ -7,12 +7,11 @@ import java.util.function.Predicate;
import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.file.web.DownloadView;
import cokr.xit.base.file.web.XLSView;
import cokr.xit.base.syslog.ServiceLog;
import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject;
import cokr.xit.foundation.web.DownloadView;
/** .
* , .
@ -107,7 +106,7 @@ public class LogFilter extends AbstractComponent {
* <li> </li>
* </ul>
* . ModelAndView
* <ul><li>viewName 'downloadView' 'xlsView'</li>
* <ul><li>viewName 'downloadView'</li>
* <li> 'downloadData'</li>
* <li> 'dataNames'</li>
* </ul>
@ -121,16 +120,20 @@ public class LogFilter extends AbstractComponent {
protected boolean downloadFilter(ServiceLog log) {
Object returned = log.getReturned();
if (returned instanceof ModelAndView) {
Map<String, Object> model = ((ModelAndView)returned).getModel();
ModelAndView mav = (ModelAndView)returned;
if (!"downloadView".equals(mav.getViewName())) return false;
String filename = ifEmpty(DownloadView.getFilename(model), () -> XLSView.getFilename(model));
if (!isEmpty(filename)) {
log.setType(ServiceLog.DOWNLOAD);
log.setFileName(filename);
setDownloadData(log, model);
}
Map<String, Object> model = mav.getModel();
String filename = DownloadView.getFilename(model);
if (isEmpty(filename)) return false;
log.setType(ServiceLog.DOWNLOAD);
log.setFileName(filename);
setDownloadData(log, model);
return true;
}
return true;
return false;
}
/**ModelAndView 'downloadData'

Loading…
Cancel
Save