Commit aac547aa authored by 赵啸非's avatar 赵啸非

添加设备日志类型筛选

parent 16ab9592
......@@ -4,11 +4,15 @@ import com.mortals.framework.model.OperateLogPdu;
import com.mortals.framework.service.ILogService;
import com.mortals.framework.service.IMessageProduceService;
import com.mortals.framework.service.impl.FileLogServiceImpl;
import com.mortals.xhx.base.system.oper.model.OperLogEntity;
import com.mortals.xhx.base.system.oper.service.OperLogService;
import com.mortals.xhx.module.operate.model.OperateLogEntity;
import com.mortals.xhx.module.operate.service.OperateLogService;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -34,15 +38,17 @@ public class OperlogAspect extends FileLogServiceImpl implements ILogService {
private OperLogService operLogService;
@Autowired
private IMessageProduceService messageProducer;
@Autowired
private OperateLogService operateLogService;
@Override
public void doHandlerLog(String platformMark, Long userId, String userName, String loginName, String requestUrl,
String content, String ip, Date logDate) {
super.doHandlerLog(platformMark, userId, userName, loginName, requestUrl, content, ip, logDate);
operLogService.insertOperLog(ip, requestUrl, userId, userName, loginName, content);
OperateLogPdu operateLogPdu = new OperateLogPdu();
//operateLogPdu.initAttrValue();
//直接调用本地保存一份
// OperateLogPdu operateLogPdu = new OperateLogPdu();
// operateLogPdu.initAttrValue();
// operateLogPdu.setIp(ip);
// operateLogPdu.setRequestUrl(requestUrl);
// operateLogPdu.setUserId(userId);
......@@ -52,7 +58,20 @@ public class OperlogAspect extends FileLogServiceImpl implements ILogService {
// operateLogPdu.setLogDate(logDate);
// operateLogPdu.setContent(content);
// operateLogPdu.setOperType(1);
messageProducer.syncOperSend(operateLogPdu);
// messageProducer.syncOperSend(operateLogPdu);
OperateLogEntity operLogEntity = new OperateLogEntity();
operLogEntity.initAttrValue();
operLogEntity.setIp(ip);
operLogEntity.setRequestUrl(requestUrl);
operLogEntity.setUserId(userId);
operLogEntity.setUserName(userName);
operLogEntity.setLoginName(loginName);
operLogEntity.setPlatformMark(platformMark);
operLogEntity.setLogDate(logDate);
operLogEntity.setContent(content);
operLogEntity.setOperType(1);
operateLogService.save(operLogEntity, null);
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment