Explorar el Código

feed_template: 修改配方详情记录

Yi hace 1 año
padre
commit
b386b78b6e
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      module/backend/feed_service.go

+ 4 - 0
module/backend/feed_service.go

@@ -121,6 +121,8 @@ func (s *StoreEntry) AddFeedByFeedFormula(ctx context.Context, req *operationPb.
 func (s *StoreEntry) addFeedFormulaDetailAddRecode(ctx context.Context, req *operationPb.GroupAddFeedFormulaDetail) {
 	editRecord, _ := s.GetEditRecordLastGroupId(ctx)
 	editRecordList := make([]*model.FeedFormulaEditRecord, 0)
+
+	operationName, _ := s.GetCurrentUserName(ctx)
 	for _, v := range req.List {
 		editRecordList = append(editRecordList, &model.FeedFormulaEditRecord{
 			FeedFormulaId: int64(req.FeedFormulaId),
@@ -128,6 +130,7 @@ func (s *StoreEntry) addFeedFormulaDetailAddRecode(ctx context.Context, req *ope
 			ForageName:    v.ForageName,
 			Status:        operationPb.FeedFormulaEditRecordType_INSERT,
 			GroupId:       editRecord.GroupId + 1,
+			OperationName: operationName,
 		})
 	}
 
@@ -1143,6 +1146,7 @@ func (s *StoreEntry) UpdatePastureFeedDetailVersionLog(ctx context.Context, dist
 		Data:           make([]*operationPb.AddFeedFormulaDetail, 0),
 	}
 
+	body.Data = list
 	zaplog.Info("UpdateFeedFormalVersion", zap.Any("body", body))
 	if err = s.PastureHttpClient(ctx, model.FeedFormulaVersionUpdateUrl, pastureId, body, response); err != nil {
 		zaplog.Error("UpdateFeedFormalVersion-http",