public class UserLogUtil {
@Autowired
private static UserLogService userLogService;
/**
* 记录用户日志
* @param userId
* @param toolName
*/
public static void wirteLog(Integer userId,String toolName,String url){
UserLog log = new UserLog();
log.setUserId(userId);
log.setToolName(toolName);
log.setUrl(url.substring(1,url.length()));
userLogService.save(log);
}
}