手表数据修改
This commit is contained in:
+9
-2
@@ -19,8 +19,8 @@ public class WatchH5IndexItemNewVo {
|
||||
@Schema(title = "数据类型名称")
|
||||
private String wdTypeName;
|
||||
@Schema(title = "最新数据日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date dataDate;
|
||||
/**
|
||||
* 注意 当wdType=sleep时此字段返回长睡时长
|
||||
@@ -83,4 +83,11 @@ public class WatchH5IndexItemNewVo {
|
||||
this.setWdType(watchH5IndexItemVo.getWdType());
|
||||
this.setWdTypeName(watchH5IndexItemVo.getWdTypeName());
|
||||
}
|
||||
|
||||
public void sleepCopy(WatchH5IndexItemVo watchH5IndexItemVo){
|
||||
this.setWarnMax(watchH5IndexItemVo.getWarnMax());
|
||||
this.setWarnMin(watchH5IndexItemVo.getWarnMin());
|
||||
this.setWdType(watchH5IndexItemVo.getWdType());
|
||||
this.setWdTypeName(watchH5IndexItemVo.getWdTypeName());
|
||||
}
|
||||
}
|
||||
|
||||
+13
-5
@@ -49,11 +49,19 @@ public class UserStat {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this.latest = parseSafe(watchH5IndexItemNewVo.getDataValue());
|
||||
this.max = parseSafe(watchH5IndexItemNewVo.getDataMax());
|
||||
this.min = parseSafe(watchH5IndexItemNewVo.getDataMin());
|
||||
this.avg = parseSafe(watchH5IndexItemNewVo.getDataAvg());
|
||||
this.latestTime = watchH5IndexItemNewVo.getDataDate();
|
||||
if (watchH5IndexItemNewVo.getWdType().equals("sleep")) {
|
||||
this.latest = parseSafe(watchH5IndexItemNewVo.getDataMax());// 总时长
|
||||
this.max = parseSafe(watchH5IndexItemNewVo.getDataMax());
|
||||
this.min = parseSafe(watchH5IndexItemNewVo.getDataMin());
|
||||
this.avg = parseSafe(watchH5IndexItemNewVo.getDataAvg());
|
||||
this.latestTime = watchH5IndexItemNewVo.getDataDate();
|
||||
}else {
|
||||
this.latest = parseSafe(watchH5IndexItemNewVo.getDataValue());
|
||||
this.max = parseSafe(watchH5IndexItemNewVo.getDataMax());
|
||||
this.min = parseSafe(watchH5IndexItemNewVo.getDataMin());
|
||||
this.avg = parseSafe(watchH5IndexItemNewVo.getDataAvg());
|
||||
this.latestTime = watchH5IndexItemNewVo.getDataDate();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user