shenzekai 1 ano atrás
pai
commit
50cd819662

+ 6 - 6
model/http_model/UpdateSelection.go

@@ -23,15 +23,15 @@ type UpdateSelectionRequest struct {
 }
 
 type SecBriefInfo struct {
-	PhotoUrl string `json:"photo_url"`
-	PhotoUid string `json:"photo_uid"`
-	Name     string `json:"name"`
+	FileUrl string `json:"file_url"`
+	FileUid string `json:"file_uid"`
+	Name    string `json:"name"`
 }
 
 type SecExampleInfo struct {
-	PhotoUrl string `json:"photo_url"`
-	PhotoUid string `json:"photo_uid"`
-	Name     string `json:"name"`
+	FileUrl string `json:"file_url"`
+	FileUid string `json:"file_uid"`
+	Name    string `json:"name"`
 }
 
 type UpdateSelectionData struct {

+ 4 - 4
service/selection_service/selection.go

@@ -171,9 +171,9 @@ func (*selection) Update(ctx context.Context, request http_model.UpdateSelection
 		for _, v := range request.SecBrief {
 			brief := gorm_model.YounggeeSecBrief{
 				SelectionID: selectionInfo.SelectionID,
-				FileUid:     conv.MustString(v.PhotoUid, ""),
+				FileUid:     conv.MustString(v.FileUid, ""),
 				FileName:    v.Name,
-				FileUrl:     v.PhotoUrl,
+				FileUrl:     v.FileUrl,
 				CreatedAt:   time.Now(),
 			}
 			err = db.CreateSecBrief(ctx, brief)
@@ -193,9 +193,9 @@ func (*selection) Update(ctx context.Context, request http_model.UpdateSelection
 		for _, v := range request.SecExample {
 			Example := gorm_model.YounggeeSecExample{
 				SelectionID: selectionInfo.SelectionID,
-				FileUid:     conv.MustString(v.PhotoUid, ""),
+				FileUid:     conv.MustString(v.FileUrl, ""),
 				FileName:    v.Name,
-				FileUrl:     v.PhotoUrl,
+				FileUrl:     v.FileUrl,
 				CreatedAt:   time.Now(),
 			}
 			err = db.CreateSecExample(ctx, Example)