Skip to content

Commit 120afdf

Browse files
authored
feat: Change upload logs systemType to AppFramework. (#2927)
* feat: change upload logs systemType to AppFramework * feat: change upload logs systemType to AppFramework * Merge: main
1 parent 42136c6 commit 120afdf

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

internal/rpc/third/log.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ func (t *thirdServer) UploadLogs(ctx context.Context, req *third.UploadLogsReq)
5050
platform := constant.PlatformID2Name[int(req.Platform)]
5151
for _, fileURL := range req.FileURLs {
5252
log := relationtb.Log{
53-
Platform: platform,
54-
UserID: userID,
55-
CreateTime: time.Now(),
56-
Url: fileURL.URL,
57-
FileName: fileURL.Filename,
58-
SystemType: req.AppFramework,
59-
Version: req.Version,
60-
Ex: req.Ex,
53+
Platform: platform,
54+
UserID: userID,
55+
CreateTime: time.Now(),
56+
Url: fileURL.URL,
57+
FileName: fileURL.Filename,
58+
AppFramework: req.AppFramework,
59+
Version: req.Version,
60+
Ex: req.Ex,
6161
}
6262
for i := 0; i < 20; i++ {
6363
id := genLogID()

pkg/common/storage/model/log.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ import (
1919
)
2020

2121
type Log struct {
22-
LogID string `bson:"log_id"`
23-
Platform string `bson:"platform"`
24-
UserID string `bson:"user_id"`
25-
CreateTime time.Time `bson:"create_time"`
26-
Url string `bson:"url"`
27-
FileName string `bson:"file_name"`
28-
SystemType string `bson:"system_type"`
29-
Version string `bson:"version"`
30-
Ex string `bson:"ex"`
22+
LogID string `bson:"log_id"`
23+
Platform string `bson:"platform"`
24+
UserID string `bson:"user_id"`
25+
CreateTime time.Time `bson:"create_time"`
26+
Url string `bson:"url"`
27+
FileName string `bson:"file_name"`
28+
SystemType string `bson:"system_type"`
29+
AppFramework string `bson:"app_framework"`
30+
Version string `bson:"version"`
31+
Ex string `bson:"ex"`
3132
}

0 commit comments

Comments
 (0)