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
+5 -5
View File
@@ -389,7 +389,7 @@ func (l *ActivateOrderLogic) handleCommission(ctx context.Context, userInfo *use
Type: commissionType,
Amount: amount,
OrderNo: orderInfo.OrderNo,
CreatedAt: orderInfo.CreatedAt.UnixMilli(),
Timestamp: orderInfo.CreatedAt.UnixMilli(),
}
content, _ := commissionLog.Marshal()
@@ -577,10 +577,10 @@ func (l *ActivateOrderLogic) ResetTraffic(ctx context.Context, orderInfo *order.
// insert reset traffic log
resetLog := &log.ResetSubscribe{
Type: log.ResetSubscribeTypePaid,
UserId: userInfo.Id,
OrderNo: orderInfo.OrderNo,
ResetAt: time.Now().UnixMilli(),
Type: log.ResetSubscribeTypePaid,
UserId: userInfo.Id,
OrderNo: orderInfo.OrderNo,
Timestamp: time.Now().UnixMilli(),
}
content, _ := resetLog.Marshal()
+3 -3
View File
@@ -602,9 +602,9 @@ func (l *ResetTrafficLogic) clearCache(ctx context.Context, list []*user.Subscri
// insertLog inserts a reset traffic log entry
func (l *ResetTrafficLogic) insertLog(ctx context.Context, subId, userId int64) {
trafficLog := log.ResetSubscribe{
Type: log.ResetSubscribeTypeAuto,
UserId: userId,
ResetAt: time.Now().UnixMilli(),
Type: log.ResetSubscribeTypeAuto,
UserId: userId,
Timestamp: time.Now().UnixMilli(),
}
content, _ := trafficLog.Marshal()
if err := l.svc.DB.WithContext(ctx).Model(&log.SystemLog{}).Create(&log.SystemLog{