use of com.tale.model.entity.Logs in project tale by otale.
the class BaseWebHook method after.
@Override
public boolean after(RouteContext context) {
if (null != TaleUtils.getLoginUser()) {
SysLog sysLog = context.routeAction().getAnnotation(SysLog.class);
if (null != sysLog) {
Logs logs = new Logs();
logs.setAction(sysLog.value());
logs.setAuthorId(TaleUtils.getLoginUser().getUid());
logs.setIp(context.request().address());
if (!context.request().uri().contains("upload")) {
logs.setData(context.request().bodyToString());
}
logs.setCreated(DateKit.nowUnix());
logs.save();
}
}
return true;
}