提交一版日志的action查询和展示
This commit is contained in:
@@ -473,21 +473,31 @@ public class BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
public void initLogServiceType(Model model, BaseLogEntity log) {
|
||||
public void setLogAction(BaseLogEntity log) {
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
for (FunctionServiceDict dict : serviceList) {
|
||||
if (dict.getServiceId().intValue() == log.getServiceType().intValue()) {
|
||||
log.setAction(dict.getAction());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//初始化查询值判断
|
||||
public void initLogSearchValue(BaseLogEntity entry,Map<String, Object> params){
|
||||
|
||||
params.put("operator", entry.getCurrentUser().getName());
|
||||
params.put("opTime", DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
params.put("opAction", 4);
|
||||
|
||||
if (StringUtils.isNotBlank(entry.getSearchFoundStartTime())&&StringUtils.isNotBlank(entry.getSearchFoundEndTime())) {
|
||||
params.put("searchFoundStartTime", entry.getSearchFoundStartTime());
|
||||
params.put("searchFoundEndTime", entry.getSearchFoundEndTime());
|
||||
}else{
|
||||
//设置默认查询当前时间及前五分钟
|
||||
String startTime = DateUtils.getDateTime();
|
||||
Date dateEnd = new Date(new Date().getTime()-Constants.LOG_TIME_RANGE);
|
||||
String endTime = DateUtils.formatDateTime(dateEnd);
|
||||
String endTime = DateUtils.getDateTime();
|
||||
Date dateStart = new Date(new Date().getTime() - Constants.LOG_TIME_RANGE);
|
||||
String startTime = DateUtils.formatDateTime(dateStart);
|
||||
params.put("searchFoundStartTime", startTime);
|
||||
params.put("searchFoundEndTime",endTime );
|
||||
entry.setSearchFoundStartTime(startTime);
|
||||
|
||||
Reference in New Issue
Block a user