mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-16 12:05:07 +08:00
系统操作日志:集成 mzt-biz-log 4
This commit is contained in:
@ -21,11 +21,6 @@ public class AdminUserParseFunction implements IParseFunction {
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
@Override
|
||||
public boolean executeBefore() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String functionName() {
|
||||
return "getAdminUserById";
|
||||
|
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.system.framework.bizlog.function;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils;
|
||||
import com.mzt.logapi.service.IParseFunction;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 自定义函数-通过区域编号获取区域信息
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AreaParseFunction implements IParseFunction {
|
||||
|
||||
@Override
|
||||
public boolean executeBefore() {
|
||||
return true; // 先转换值后对比
|
||||
}
|
||||
|
||||
@Override
|
||||
public String functionName() {
|
||||
return "getAreaById";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String apply(Object value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
if (StrUtil.isEmpty(value.toString())) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return AreaUtils.format(Integer.parseInt(value.toString()));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user