Commit c650f98a by 章家宝

feat:新增审计字段填充

1 parent f5f249c8
package com.glsx.usedcar.security;
import com.glsx.usedcar.context.InspectorContext;
import com.glsx.usedcar.module.inspect.entity.Inspector;
import org.springframework.data.domain.AuditorAware;
import java.util.Optional;
public class SpringSecurityAuditor implements AuditorAware<String> {
@Override
public Optional<String> getCurrentAuditor() {
Inspector inspector = InspectorContext.getInspector();
if (inspector == null) {
return Optional.of("系统默认");
}
return Optional.of(inspector.getName());
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!