|
@@ -9,12 +9,15 @@ import com.lantone.common.vo.GetAbnormalWayAndIpVO;
|
|
import com.lantone.common.vo.GetLoginLogVO;
|
|
import com.lantone.common.vo.GetLoginLogVO;
|
|
import com.lantone.common.vo.GetLoginNameAndIpVO;
|
|
import com.lantone.common.vo.GetLoginNameAndIpVO;
|
|
import com.lantone.common.vo.GetOperationLogVO;
|
|
import com.lantone.common.vo.GetOperationLogVO;
|
|
|
|
+import com.lantone.dblayermbg.entity.OperationLog;
|
|
import com.lantone.dblayermbg.facade.AbnormalLogFacade;
|
|
import com.lantone.dblayermbg.facade.AbnormalLogFacade;
|
|
import com.lantone.dblayermbg.facade.LoginLogFacade;
|
|
import com.lantone.dblayermbg.facade.LoginLogFacade;
|
|
import com.lantone.dblayermbg.facade.OperationLogFacade;
|
|
import com.lantone.dblayermbg.facade.OperationLogFacade;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @Description:日志管理
|
|
* @Description:日志管理
|
|
@@ -38,7 +41,7 @@ public class LogManagementFacade {
|
|
* @Date: 2021/9/8
|
|
* @Date: 2021/9/8
|
|
*/
|
|
*/
|
|
public IPage<LoginLogDTO> getLoginLog(GetLoginLogVO getLoginLogVO) {
|
|
public IPage<LoginLogDTO> getLoginLog(GetLoginLogVO getLoginLogVO) {
|
|
- return loginLogFacade.getLoginLog(getLoginLogVO);
|
|
|
|
|
|
+ return loginLogFacade.getBaseMapper().getLoginLog(getLoginLogVO);
|
|
}
|
|
}
|
|
|
|
|
|
/**查看登录日志登录用户|登录ip地址
|
|
/**查看登录日志登录用户|登录ip地址
|
|
@@ -49,7 +52,7 @@ public class LogManagementFacade {
|
|
* @Date: 2021/9/8
|
|
* @Date: 2021/9/8
|
|
*/
|
|
*/
|
|
public List<String> getLoginLogNameAndIp(GetLoginNameAndIpVO getLoginNameAndIpVO) {
|
|
public List<String> getLoginLogNameAndIp(GetLoginNameAndIpVO getLoginNameAndIpVO) {
|
|
- return loginLogFacade.getLoginLogNameAndIp(getLoginNameAndIpVO);
|
|
|
|
|
|
+ return loginLogFacade.getBaseMapper().getLoginLogNameAndIp(getLoginNameAndIpVO);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -60,7 +63,7 @@ public class LogManagementFacade {
|
|
* @Date: 2021/9/8
|
|
* @Date: 2021/9/8
|
|
*/
|
|
*/
|
|
public IPage<OperationLogDTO> getOperationLog(GetOperationLogVO getOperationLogVO) {
|
|
public IPage<OperationLogDTO> getOperationLog(GetOperationLogVO getOperationLogVO) {
|
|
- return operationLogFacade.getOperationLog(getOperationLogVO);
|
|
|
|
|
|
+ return operationLogFacade.getBaseMapper().getOperationLog(getOperationLogVO);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -71,7 +74,10 @@ public class LogManagementFacade {
|
|
* @Date: 2021/9/8
|
|
* @Date: 2021/9/8
|
|
*/
|
|
*/
|
|
public List<String> getOperationLogName(String operationName) {
|
|
public List<String> getOperationLogName(String operationName) {
|
|
- return operationLogFacade.getOperationLogName(operationName);
|
|
|
|
|
|
+ return operationLogFacade.lambdaQuery()
|
|
|
|
+ .like(StringUtils.isNotBlank(operationName), OperationLog::getOperationName, operationName)
|
|
|
|
+ .select(OperationLog::getOperationName)
|
|
|
|
+ .list().stream().map(OperationLog::getOperationName).collect(Collectors.toList());
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -82,7 +88,7 @@ public class LogManagementFacade {
|
|
* @Date: 2021/9/8
|
|
* @Date: 2021/9/8
|
|
*/
|
|
*/
|
|
public IPage<AbnormalLogDTO> getAbnormalLog(GetAbnormalLogVO getAbnormalLogVO) {
|
|
public IPage<AbnormalLogDTO> getAbnormalLog(GetAbnormalLogVO getAbnormalLogVO) {
|
|
- return abnormalLogFacade.getAbnormalLog(getAbnormalLogVO);
|
|
|
|
|
|
+ return abnormalLogFacade.getBaseMapper().getAbnormalLog(getAbnormalLogVO);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -93,6 +99,6 @@ public class LogManagementFacade {
|
|
* @Date: 2021/9/8
|
|
* @Date: 2021/9/8
|
|
*/
|
|
*/
|
|
public List<String> getAbnormalLogWayAndIp(GetAbnormalWayAndIpVO getAbnormalWayAndIpVO) {
|
|
public List<String> getAbnormalLogWayAndIp(GetAbnormalWayAndIpVO getAbnormalWayAndIpVO) {
|
|
- return abnormalLogFacade.getAbnormalLogWayAndIp(getAbnormalWayAndIpVO);
|
|
|
|
|
|
+ return abnormalLogFacade.getBaseMapper().getAbnormalLogWayAndIp(getAbnormalWayAndIpVO);
|
|
}
|
|
}
|
|
}
|
|
}
|