strava 的安全认证方式
java bean
activityPO
@Data
@Entity
@Table(name = "t_activity")
@EntityListeners(AuditingEntityListener.class)
@NoArgsConstructor
@SQLDelete(sql = "update t_activity set IS_DEL = 1 where id = ?")
@Where(clause = "IS_DEL = 0")
public class ActivityPO {
public ActivityPO(Activity activity) {
this.resource_state = activity.getResource_state();
this.athlete_id = activity.getAthlete().getId();
this.athlete_resource_state = activity.getAthlete().getResource_state();
this.name = activity.getName();
this.distance = activity.getDistance();
this.moving_time = activity.getMoving_time();
this.elapsed_time = activity.getElapsed_time();
this.total_elevation_gain = activity.getTotal_elevation_gain();
this.type = activity.getType();
this.workout_type = activity.getWorkout_type();
this.id = activity.getId();
this.startDate = activity.getStart_date();
this.startDateLocal = activity.getStart_date_local();
this.timezone = activity.getTimezone();
this.utc_offset = activity.getUtc_offset();
this.location_city = activity.getLocation_city();
this.location_state = activity.getLocation_state();
this.location_country = activity.getLocation_country();
this.achievement_count = activity.getAchievement_count();
this.kudos_count = activity.getKudos_count();
this.comment_count = activity.getComment_count();
this.athlete_count = activity.getAthlete_count();
this.photo_count = activity.getPhoto_count();
this.map_id = activity.getMap().getId();
this.map_summary_polyline = activity.getMap().getSummary_polyline();
this.map_resource_state = activity.getMap().getResource_state();
this.trainer = activity.getTrainer();
this.commute = activity.getCommute();
this.manual = activity.getManual();
this.pri = activity.getPri();
this.visibility = activity.getVisibility();
this.flagged = activity.getFlagged();
this.gear_id = activity.getGear_id();
this.start_latlng = JSON.toJSONString(activity.getStart_latlng());
this.end_latlng = JSON.toJSONString(activity.getEnd_latlng());
this.start_latitude = activity.getStart_latitude();
this.start_longitude = activity.getStart_longitude();
this.average_speed = activity.getAverage_speed();
this.max_speed = activity.getMax_speed();
this.has_heartrate = activity.getHas_heartrate();
this.average_heartrate = activity.getAverage_heartrate();
this.max_heartrate = activity.getMax_heartrate();
this.heartrate_opt_out = activity.getHeartrate_opt_out();
this.display_hide_heartrate_option = activity.getDisplay_hide_heartrate_option();
this.elev_high = activity.getElev_high();
this.elev_low = activity.getElev_low();
this.upload_id = activity.getUpload_id();
this.upload_id_str = activity.getUpload_id_str();
this.external_id = activity.getExternal_id();
this.from_accepted_tag = activity.getFrom_accepted_tag();
this.pr_count = activity.getPr_count();
this.total_photo_count = activity.getTotal_photo_count();
this.has_kudoed = activity.getHas_kudoed();
this.suffer_score = activity.getSuffer_score();
}
private Integer resource_state;
private Long athlete_id;
private Integer athlete_resource_state;
private String name;
private Double distance;
private Long moving_time;
private Long elapsed_time;
private Double total_elevation_gain;
private String type;
private String workout_type;
@Id
private Long id;
private String startDate;
private String startDateLocal;
private String timezone;
private Long utc_offset;
private String location_city;
private String location_state;
private String location_country;
private Long achievement_count;
private Long kudos_count;
private Long comment_count;
private Long athlete_count;
private Long photo_count;
private String map_id;
@Column(columnDefinition = "text")
private String map_summary_polyline;
private Integer map_resource_state;
private Boolean trainer;
private Boolean commute;
private Boolean manual;
@JSONField(name = "private")
private Boolean pri;
private String visibility;
private Boolean flagged;
private String gear_id;
private String start_latlng;
private String end_latlng;
private Double start_latitude;
private Double start_longitude;
private Double average_speed;
private Double max_speed;
private Boolean has_heartrate;
private Double average_heartrate;
private Integer max_heartrate;
private Boolean heartrate_opt_out;
private Boolean display_hide_heartrate_option;
private Double elev_high;
private Double elev_low;
private Long upload_id;
private String upload_id_str;
private String external_id;
private Boolean from_accepted_tag;
private Integer pr_count;
private Integer total_photo_count;
private Boolean has_kudoed;
private Integer suffer_score;
@CreatedDate
@Column(name = "create_time")
private Date createTime;
@UpdateTimestamp
@Column(name = "update_time")
private Date updateTime;
@Type(type = "org.hibernate.type.NumericBooleanType")
@Column(name = "IS_DEL")
private boolean isDel = false;
}
参考