feat(api): standardize timestamp field across log structures

This commit is contained in:
Chang lue Tsen
2025-08-26 14:39:54 -04:00
parent 88cbfbb7d6
commit 82fd674ae4
23 changed files with 78 additions and 78 deletions
@@ -102,7 +102,7 @@ func (l *CloseOrderLogic) CloseOrder(req *types.CloseOrderRequest) error {
Amount: orderInfo.GiftAmount,
Balance: deduction,
Remark: "Order cancellation refund",
CreatedAt: time.Now().UnixMilli(),
Timestamp: time.Now().UnixMilli(),
}
content, _ := giftLog.Marshal()
+1 -1
View File
@@ -204,7 +204,7 @@ func (l *PurchaseLogic) Purchase(req *types.PurchaseOrderRequest) (resp *types.P
Amount: orderInfo.GiftAmount,
Balance: u.GiftAmount,
Remark: "Purchase order deduction",
CreatedAt: time.Now().UnixMilli(),
Timestamp: time.Now().UnixMilli(),
}
content, _ := giftLog.Marshal()
+1 -1
View File
@@ -171,7 +171,7 @@ func (l *RenewalLogic) Renewal(req *types.RenewalOrderRequest) (resp *types.Rene
Amount: orderInfo.GiftAmount,
Balance: u.GiftAmount,
Remark: "Renewal order deduction",
CreatedAt: time.Now().UnixMilli(),
Timestamp: time.Now().UnixMilli(),
}
content, _ := giftLog.Marshal()
@@ -112,7 +112,7 @@ func (l *ResetTrafficLogic) ResetTraffic(req *types.ResetTrafficOrderRequest) (r
Amount: orderInfo.GiftAmount,
Balance: u.GiftAmount,
Remark: "Renewal order deduction",
CreatedAt: time.Now().UnixMilli(),
Timestamp: time.Now().UnixMilli(),
}
content, _ := giftLog.Marshal()
@@ -59,7 +59,7 @@ func (l *GetLoginLogLogic) GetLoginLog(req *types.GetLoginLogRequest) (resp *typ
LoginIP: content.LoginIP,
UserAgent: content.UserAgent,
Success: content.Success,
CreatedAt: datum.CreatedAt.UnixMilli(),
Timestamp: datum.CreatedAt.UnixMilli(),
})
}
@@ -60,7 +60,7 @@ func (l *GetSubscribeLogLogic) GetSubscribeLog(req *types.GetSubscribeLogRequest
Token: content.Token,
IP: content.ClientIP,
UserAgent: content.UserAgent,
CreatedAt: item.CreatedAt.UnixMilli(),
Timestamp: item.CreatedAt.UnixMilli(),
})
}
@@ -58,7 +58,7 @@ func (l *QueryUserCommissionLogLogic) QueryUserCommissionLog(req *types.QueryUse
Type: content.Type,
Amount: content.Amount,
OrderNo: content.OrderNo,
CreatedAt: content.CreatedAt,
Timestamp: content.Timestamp,
})
}