feat(api): standardize timestamp field across log structures
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user