This commit is contained in:
邹宗楠
2023-09-22 10:20:53 +08:00
parent c20d32e975
commit f5c35458c3
4 changed files with 21 additions and 6 deletions

View File

@@ -17,9 +17,20 @@ func TestOrderViewStatus(t *testing.T) {
}
t.Log(result)
}
func TestTimne(t *testing.T) {
fmt.Println(utils.Interface2Int64WithDefault(1695292241, 0))
fmt.Println(getTimeFromTimestamp(utils.Interface2Int64WithDefault(1695292241, 0)))
}
func getTimeFromTimestamp(timeStamp int64) time.Time {
if timeStamp < 1538103149 { // 立即达订单给的是1而不是空01538103149不是特殊值只是一个任意之前的时间这样写可以处理
return utils.DefaultTimeValue
}
return utils.Timestamp2Time(timeStamp)
}
func TestOrderGetOrderDetail(t *testing.T) {
result, err := api.OrderGetOrderDetail(1100692033635137950, false)
result, err := api.OrderGetOrderDetail(1000732590328335860, false)
if err != nil {
t.Fatal(err)
}