|
@@ -1,20 +1,22 @@
|
|
|
package com.qmth.themis.business.bean.admin;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
+
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
@ApiModel("报表-考生日志明细返回对象")
|
|
|
public class ExamStudentLogDetailListBean {
|
|
|
|
|
|
-
|
|
|
- @ApiModelProperty(name = "发生时间")
|
|
|
+ @ApiModelProperty(name = "发生时间")
|
|
|
private Long createTime;
|
|
|
-
|
|
|
- @ApiModelProperty(name = "事件类型")
|
|
|
+
|
|
|
+ @ApiModelProperty(name = "事件类型")
|
|
|
private String type;
|
|
|
-
|
|
|
- @ApiModelProperty(name = "详情")
|
|
|
+
|
|
|
+ @ApiModelProperty(name = "详情")
|
|
|
private String remark;
|
|
|
|
|
|
@ApiModelProperty(value = "ip地址")
|
|
@@ -38,6 +40,21 @@ public class ExamStudentLogDetailListBean {
|
|
|
@ApiModelProperty(value = "ip是否改变")
|
|
|
private Boolean ipChange;
|
|
|
|
|
|
+ public IPage<ExamStudentLogDetailListBean> ipChange(IPage<ExamStudentLogDetailListBean> examStudentLogDetailListBeanIPage) {
|
|
|
+ String currentIp = examStudentLogDetailListBeanIPage.getRecords().get(0).getIp();
|
|
|
+ for (int i = 1; i < examStudentLogDetailListBeanIPage.getRecords().size(); i++) {
|
|
|
+ String ip = examStudentLogDetailListBeanIPage.getRecords().get(i).getIp();
|
|
|
+ if (Objects.isNull(currentIp) || Objects.equals(currentIp.trim(), "")) {
|
|
|
+ currentIp = ip;
|
|
|
+ continue;
|
|
|
+ } else if (Objects.nonNull(currentIp) && !Objects.equals(currentIp.trim(), "") && !Objects.equals(currentIp, ip)) {
|
|
|
+ examStudentLogDetailListBeanIPage.getRecords().get(i).setIpChange(true);
|
|
|
+ currentIp = ip;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return examStudentLogDetailListBeanIPage;
|
|
|
+ }
|
|
|
+
|
|
|
public String getIp() {
|
|
|
return ip;
|
|
|
}
|
|
@@ -95,30 +112,28 @@ public class ExamStudentLogDetailListBean {
|
|
|
}
|
|
|
|
|
|
public Long getCreateTime() {
|
|
|
- return createTime;
|
|
|
- }
|
|
|
+ return createTime;
|
|
|
+ }
|
|
|
|
|
|
- public void setCreateTime(Long createTime) {
|
|
|
- this.createTime = createTime;
|
|
|
- }
|
|
|
+ public void setCreateTime(Long createTime) {
|
|
|
+ this.createTime = createTime;
|
|
|
+ }
|
|
|
|
|
|
- public String getType() {
|
|
|
- return type;
|
|
|
- }
|
|
|
+ public String getType() {
|
|
|
+ return type;
|
|
|
+ }
|
|
|
|
|
|
- public void setType(String type) {
|
|
|
- this.type = type;
|
|
|
- }
|
|
|
+ public void setType(String type) {
|
|
|
+ this.type = type;
|
|
|
+ }
|
|
|
|
|
|
- public String getRemark() {
|
|
|
- return remark;
|
|
|
- }
|
|
|
+ public String getRemark() {
|
|
|
+ return remark;
|
|
|
+ }
|
|
|
|
|
|
- public void setRemark(String remark) {
|
|
|
- this.remark = remark;
|
|
|
- }
|
|
|
+ public void setRemark(String remark) {
|
|
|
+ this.remark = remark;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|