Browse Source

Merge branch 'feature/bug-list' of xuyiping/kpt-tmr-group into develop

xuyiping 1 year ago
parent
commit
ad5b359a54
2 changed files with 5 additions and 3 deletions
  1. 2 2
      model/feed_formula_detail.go
  2. 3 1
      module/backend/pasture_sync_service.go

+ 2 - 2
model/feed_formula_detail.go

@@ -8,7 +8,7 @@ type FeedFormulaDetail struct {
 	PastureName     string                  `json:"pasture_name"`
 	PastureDataId   int64                   `json:"pasture_data_id"`
 	FeedFormulaId   int64                   `json:"feed_formula_id"`
-	ForgeId         int64                   `json:"forge_id"`
+	ForageId        int64                   `json:"forage_id"`
 	ForageName      string                  `json:"forage_name"`
 	ForageGroupName string                  `json:"forage_group_name"`
 	Weight          int32                   `json:"weight"`
@@ -20,6 +20,6 @@ type FeedFormulaDetail struct {
 	UpdatedAt       int64                   `json:"updated_at"`
 }
 
-func (f *FeedTemplateDetail) TableName() string {
+func (f *FeedFormulaDetail) TableName() string {
 	return "feed_formula_detail"
 }

+ 3 - 1
module/backend/pasture_sync_service.go

@@ -341,14 +341,16 @@ func (s *StoreEntry) FeedFormulaDetailInsert(ctx context.Context, groupPasture *
 		if data.Id <= 0 {
 			continue
 		}
+
 		res = append(res, &model.FeedFormulaDetail{
 			PastureId:       groupPasture.PastureId,
 			PastureName:     groupPasture.Name,
 			PastureDataId:   data.Id,
-			ForgeId:         data.FId,
+			ForageId:        data.FId,
 			FeedFormulaId:   data.FtId,
 			Weight:          int32(data.FWeight * 100),
 			ForageGroupName: data.FeedGroup,
+			ForageName:      data.FName,
 			StirDelay:       data.AutoSecond,
 			AllowError:      data.Deviation,
 			IsShow:          operationPb.IsShow_OK,