mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-03 22:57:14 +08:00 
			
		
		
		
	refactor: 将时间戳单位从毫秒调整为秒
时间戳是指格林威治时间1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总秒数。通俗的讲,时间戳是一份能够表示一份数据在一个特定时间点已经存在的完整的可验证的数据。它的提出主要是为用户提供一份电子证据,以证明用户的某些数据的产生时间。在实际应用上,它可以使用在包括电子商务、金融活动的各个方面,尤其可以用来支撑公开密钥基础设施的“不可否认”服务。
This commit is contained in:
		@@ -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();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user