commit
e85019a665
@ -0,0 +1,33 @@
|
||||
package com.engine.organization.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/07/04
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum LogModuleNameEnum {
|
||||
SCHEME("等级方案"),
|
||||
LEVEL("职等"),
|
||||
GRADE("职级"),
|
||||
SEQUENCE("岗位序列"),
|
||||
POST("职务分类"),
|
||||
POSTINFO("职务管理"),
|
||||
GROUP("集团管理"),
|
||||
COMPANY("公司/分部"),
|
||||
DEPARTMENT("部门管理"),
|
||||
JOB("岗位管理"),
|
||||
RESOURCE("人员管理"),
|
||||
STAFFPLAN("编制方案"),
|
||||
STAFF("编制上报"),
|
||||
OTHER("其他模块");
|
||||
|
||||
private String value;
|
||||
|
||||
LogModuleNameEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.engine.organization.util;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.LoggerContext;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/07/04
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class OrganizationWrapper extends Service {
|
||||
|
||||
|
||||
/**
|
||||
* 记录操作日志
|
||||
*
|
||||
* @param clazz
|
||||
* @param message
|
||||
*/
|
||||
public void writeOperateLog(Class clazz,
|
||||
String message) {
|
||||
Method method = clazz.getEnclosingMethod();
|
||||
LoggerContext loggerContext = LoggerContext.builder().operatorId(user.getUID()).clientIp(user.getLoginip()).operatorName(user.getLastname()).message(message).build();
|
||||
LogAspect logAspect = new LogAspect(clazz, method, loggerContext);
|
||||
logAspect.start();
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue