-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from hiparker/development
v 1.6.3 申请合并
- Loading branch information
Showing
52 changed files
with
1,400 additions
and
633 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
opsli-api/src/main/java/org/opsli/api/web/system/logs/LoginLogsApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package org.opsli.api.web.system.logs; | ||
|
||
import org.opsli.api.base.result.ResultVo; | ||
import org.opsli.api.wrapper.system.logs.LogsModel; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
|
||
|
||
/** | ||
* 日志 API | ||
* | ||
* 对外 API 直接 暴露 @GetMapping 或者 @PostMapping | ||
* 对内也推荐 单机版 不需要设置 Mapping 但是调用方法得从Controller写起 | ||
* | ||
* 这样写法虽然比较绕,但是当单体项目想要改造微服务架构时 时非常容易的 | ||
* | ||
* @author Parker | ||
* @date 2020-09-13 17:40 | ||
*/ | ||
public interface LoginLogsApi { | ||
|
||
/** 标题 */ | ||
String TITLE = "登录日志管理"; | ||
/** 子标题 */ | ||
String SUB_TITLE = "登录日志"; | ||
|
||
|
||
/** | ||
* 日志 查询分页 | ||
* @param pageNo 当前页 | ||
* @param pageSize 每页条数 | ||
* @param request request | ||
* @return ResultVo | ||
*/ | ||
@GetMapping("/findPage") | ||
ResultVo<?> findPage( | ||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | ||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, | ||
HttpServletRequest request | ||
); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
opsli-api/src/main/java/org/opsli/api/wrapper/system/logs/LoginLogsModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/** | ||
* Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package org.opsli.api.wrapper.system.logs; | ||
|
||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import org.opsli.api.base.warpper.ApiWrapper; | ||
|
||
/** | ||
* 登录 日志表 | ||
* | ||
* @author Parker | ||
* @date 2020-09-16 17:33 | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = false) | ||
public class LoginLogsModel extends ApiWrapper { | ||
|
||
/** | ||
* 多租户字段 | ||
*/ | ||
private String tenantId; | ||
/** | ||
* 组织机构ID组 xxx,xxx | ||
*/ | ||
private String orgIds; | ||
|
||
/** | ||
* 用户名称 | ||
*/ | ||
@ApiModelProperty(value = "用户名称") | ||
private String username; | ||
|
||
/** | ||
* 真实姓名 | ||
*/ | ||
@ApiModelProperty(value = "真实姓名") | ||
private String realName; | ||
|
||
/** | ||
* 日志类型 | ||
* 1 : 登录 | ||
* 2 : 登出 | ||
*/ | ||
@ApiModelProperty(value = "日志类型") | ||
private String type; | ||
|
||
/** | ||
* 操作IP地址 | ||
*/ | ||
@ApiModelProperty(value = "操作IP地址") | ||
private String remoteAddr; | ||
|
||
/** | ||
* 用户代理 | ||
*/ | ||
@ApiModelProperty(value = "用户代理") | ||
private String userAgent; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
opsli-api/src/main/java/org/opsli/api/wrapper/system/user/UserAvatarModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package org.opsli.api.wrapper.system.user; | ||
|
||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import org.opsli.common.annotation.validator.Validator; | ||
import org.opsli.common.enums.ValidatorType; | ||
|
||
/** | ||
* 用户信息表 | ||
* | ||
* @author Parker | ||
* @date 2020-09-16 17:33 | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = false) | ||
public class UserAvatarModel { | ||
|
||
@ApiModelProperty(value = "图片地址") | ||
@Validator({ValidatorType.IS_NOT_NULL, ValidatorType.IS_URL}) | ||
private String imgUrl; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.