提交 fa916b93 编写于 作者: 查尔斯-BUG万象集's avatar 查尔斯-BUG万象集

refactor: 将时间戳单位从毫秒调整为秒

时间戳是指格林威治时间1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总秒数。通俗的讲,时间戳是一份能够表示一份数据在一个特定时间点已经存在的完整的可验证的数据。它的提出主要是为用户提供一份电子证据,以证明用户的某些数据的产生时间。在实际应用上,它可以使用在包括电子商务、金融活动的各个方面,尤其可以用来支撑公开密钥基础设施的“不可否认”服务。
上级 a61196cd
......@@ -26,6 +26,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.http.HttpStatus;
import cn.hutool.core.date.DateUtil;
/**
* 响应信息
*
......@@ -56,8 +58,8 @@ public class R<V> implements Serializable {
private V data;
/** 时间戳 */
@Schema(description = "时间戳", example = "1691453288000")
private long timestamp = System.currentTimeMillis();
@Schema(description = "时间戳", example = "1691453288")
private long timestamp = DateUtil.currentSeconds();
/** 成功状态码 */
private static final int SUCCESS_CODE = HttpStatus.OK.value();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册