|
@@ -579,10 +579,16 @@ func (s *StoreEntry) EditRecodeFeedFormula(ctx context.Context, req *operationPb
|
|
|
}
|
|
|
|
|
|
func (s *StoreEntry) FeedFormulaDetailList(ctx context.Context, req *operationPb.FeedFormulaDetailRequest) (*operationPb.FeedFormulaDetailResponse, error) {
|
|
|
+ res := &operationPb.FeedFormulaDetailResponse{
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: make([]*operationPb.AddFeedFormulaDetail, 0),
|
|
|
+ }
|
|
|
feedFormula, err := s.SearchFeedFormulaById(ctx, int64(req.FeedFormulaId))
|
|
|
if err != nil {
|
|
|
return nil, xerr.WithStack(err)
|
|
|
}
|
|
|
+
|
|
|
feedFormulaId := feedFormula.Id
|
|
|
if feedFormula.PastureDataId > 0 {
|
|
|
feedFormulaId = feedFormula.PastureDataId
|
|
@@ -593,11 +599,8 @@ func (s *StoreEntry) FeedFormulaDetailList(ctx context.Context, req *operationPb
|
|
|
return nil, xerr.WithStack(err)
|
|
|
}
|
|
|
|
|
|
- return &operationPb.FeedFormulaDetailResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Msg: "ok",
|
|
|
- Data: model.FeedFormulaDetailSlice(list).ToPB(),
|
|
|
- }, nil
|
|
|
+ res.Data = model.FeedFormulaDetailSlice(list).ToPB()
|
|
|
+ return res, nil
|
|
|
}
|
|
|
|
|
|
// FeedFormulaUsage 配方使用概况
|