2018-08-29 21:58:56 +08:00
|
|
|
package com.nis.web.controller.configuration;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
|
|
|
|
|
|
|
|
import com.nis.domain.log.BaseLogEntity;
|
|
|
|
|
import com.nis.web.controller.BaseController;
|
|
|
|
|
|
|
|
|
|
@Controller
|
|
|
|
|
@RequestMapping("${adminPath}/toLogSearch")
|
|
|
|
|
public class LogSearchController extends BaseController{
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = {"list",""})
|
2018-09-13 16:46:56 +08:00
|
|
|
public String LogSearch(BaseLogEntity<Object> entity, RedirectAttributes attr, HttpServletRequest request,
|
|
|
|
|
HttpServletResponse response) {
|
2018-08-29 21:58:56 +08:00
|
|
|
/**
|
|
|
|
|
* url: logUrl
|
|
|
|
|
* searchCfgId: compileId
|
|
|
|
|
* searchService: serviceId
|
|
|
|
|
*/
|
|
|
|
|
// 获取相应日志检索菜单URL
|
|
|
|
|
String logUrl = menuService.getLogUrl(entity.getFunctionId());
|
|
|
|
|
Integer serviceId = menuService.getServiceId(entity.getFunctionId(),entity.getAction());
|
|
|
|
|
|
|
|
|
|
attr.addAttribute("service", serviceId);
|
2018-09-13 16:46:56 +08:00
|
|
|
attr.addAttribute("cfgId", entity.getCfgId());
|
2018-08-29 21:58:56 +08:00
|
|
|
attr.addAttribute("functionId", entity.getFunctionId());
|
2018-09-03 12:37:46 +08:00
|
|
|
attr.addAttribute("date", entity.getDate());
|
2018-09-13 16:46:56 +08:00
|
|
|
attr.addAttribute("isLogTotalSearch", entity.getIsLogTotalSearch());
|
2018-08-29 21:58:56 +08:00
|
|
|
return "redirect:"+adminPath+logUrl;
|
|
|
|
|
}
|
|
|
|
|
}
|