package com.bowintek.practice.services.impl.system; import com.bowintek.practice.mapper.SysLogMapper; import com.bowintek.practice.mapper.cquery.SysLogCQuery; import com.bowintek.practice.model.SysLog; import com.bowintek.practice.services.service.system.LogService; import com.bowintek.practice.vo.system.LogModel; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Date; import java.util.List; import java.util.UUID; @Service("logService") public class LogServiceImpl implements LogService { @Autowired private SysLogMapper sysLogMapper; @Autowired private SysLogCQuery sysLogCQuery; @Override public PageInfo getList(Integer page, Integer rows, String loginID, String userName, Date startDate, Date endDate,List idList){ PageHelper.startPage(page, rows); List dataList = sysLogCQuery.selectLogList(loginID, userName, startDate,endDate,idList); PageInfo result = new PageInfo(dataList); return result; } public Integer save(String pageName, String pageUrl, String actionName, String userID) { try{ SysLog sysLog = new SysLog(); sysLog.setLogID(UUID.randomUUID().toString()); sysLog.setPageName(pageName); sysLog.setPageUrl(pageUrl); sysLog.setActionName(actionName); sysLog.setUserID(userID); sysLog.setLogTime(new Date()); sysLogMapper.insert(sysLog); } catch (Exception ex){ } return 1; } }