|
@@ -732,10 +732,14 @@ func (s *StoreEntry) DistributeFeedFormula(ctx context.Context, req *operationPb
|
|
|
request, response := &operationPb.DistributeDataRequest{
|
|
|
PastureId: p.Id,
|
|
|
FeedFormulaList: newDistributeFeedRequest,
|
|
|
- }, &model.PastureSuccessResponse{}
|
|
|
+ }, &model.PastureResponse{
|
|
|
+ Code: 0,
|
|
|
+ Msg: "",
|
|
|
+ Data: &model.PastureSuccess{Success: false},
|
|
|
+ }
|
|
|
|
|
|
defer func() {
|
|
|
- if response.Success == true {
|
|
|
+ if response.Code == http.StatusOK {
|
|
|
feedFormulaDistributeLog := model.NewFeedFormulaDistributeLogList(distributeData.FeedFormulaList, int64(p.Id), p.Name, operationPb.IsShow_OK)
|
|
|
if err = s.DB.Create(feedFormulaDistributeLog).Error; err != nil {
|
|
|
zaplog.Error("DistributeFeedFormula", zap.Any("feedFormulaDistributeLog", feedFormulaDistributeLog), zap.Any("err", err))
|