diff --git a/dao/src/main/java/cn/bunny/dao/entity/log/UserLoginLog.java b/dao/src/main/java/cn/bunny/dao/entity/log/UserLoginLog.java new file mode 100644 index 0000000..22885b5 --- /dev/null +++ b/dao/src/main/java/cn/bunny/dao/entity/log/UserLoginLog.java @@ -0,0 +1,44 @@ +package cn.bunny.dao.entity.log; + +import cn.bunny.dao.entity.BaseEntity; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Accessors; + +/** + *
+ * 用户登录日志 + *
+ * + * @author Bunny + * @since 2024-10-18 + */ +@Getter +@Setter +@Accessors(chain = true) +@TableName("log_user_login") +@ApiModel(value = "UserLogin对象", description = "用户登录日志") +public class UserLoginLog extends BaseEntity { + + @ApiModelProperty("用户Id") + private Long userId; + + @ApiModelProperty("用户名") + private String username; + + @ApiModelProperty("登录token") + private String token; + + @ApiModelProperty("登录Ip") + private String ip; + + @ApiModelProperty("登录Ip地点") + private String ipAddress; + + @ApiModelProperty("登录时代理") + private String userAgent; + +} diff --git a/service/src/main/java/cn/bunny/services/controller/UserLoginLogController.java b/service/src/main/java/cn/bunny/services/controller/UserLoginLogController.java new file mode 100644 index 0000000..d5fe09c --- /dev/null +++ b/service/src/main/java/cn/bunny/services/controller/UserLoginLogController.java @@ -0,0 +1,18 @@ +package cn.bunny.services.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 用户登录日志 前端控制器 + *
+ * + * @author Bunny + * @since 2024-10-18 + */ +@RestController +@RequestMapping("/userLogin") +public class UserLoginLogController { + +} diff --git a/service/src/main/java/cn/bunny/services/mapper/UserLoginLogMapper.java b/service/src/main/java/cn/bunny/services/mapper/UserLoginLogMapper.java new file mode 100644 index 0000000..406fda2 --- /dev/null +++ b/service/src/main/java/cn/bunny/services/mapper/UserLoginLogMapper.java @@ -0,0 +1,18 @@ +package cn.bunny.services.mapper; + +import cn.bunny.dao.entity.log.UserLoginLog; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + *+ * 用户登录日志 Mapper 接口 + *
+ * + * @author Bunny + * @since 2024-10-18 + */ +@Mapper +public interface UserLoginLogMapper extends BaseMapper+ * 用户登录日志 服务类 + *
+ * + * @author Bunny + * @since 2024-10-18 + */ +public interface UserLoginLogService extends IService+ * 用户登录日志 服务实现类 + *
+ * + * @author Bunny + * @since 2024-10-18 + */ +@Service +public class UserLoginLogServiceImpl extends ServiceImpl