From 658e843113e09d1bf319a29e40a17a2d11ffabab Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Tue, 06 Aug 2024 00:05:49 +0800
Subject: [PATCH] 1
---
websocketSerivce/src/main/java/org/example/pojo/Log.java | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/websocketSerivce/src/main/java/org/example/pojo/Log.java b/websocketSerivce/src/main/java/org/example/pojo/Log.java
index c8bf1c0..865be1b 100644
--- a/websocketSerivce/src/main/java/org/example/pojo/Log.java
+++ b/websocketSerivce/src/main/java/org/example/pojo/Log.java
@@ -1,5 +1,10 @@
package org.example.pojo;
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@@ -11,15 +16,21 @@
**/
@Data
public class Log {
-
+ @TableId(type = IdType.AUTO)
private Integer id;
+ //账号
private String account;
+ //登录时间
+ @TableField(fill = FieldFill.INSERT)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //指定格式
private Date loginTime;
+ //登录ip
private String ip;
+ //登录地址
private String address;
--
Gitblit v1.9.3