ソースを参照

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

xuyiping 1 年間 前
コミット
d9ba726c23
2 ファイル変更7 行追加3 行削除
  1. 1 1
      model/pasture_data.go
  2. 6 2
      module/backend/feed_service.go

+ 1 - 1
model/pasture_data.go

@@ -13,7 +13,7 @@ type PastureResponse struct {
 	Data interface{} `json:"data"`
 }
 
-type PastureSuccessResponse struct {
+type PastureSuccess struct {
 	Success bool `json:"success"`
 }
 

+ 6 - 2
module/backend/feed_service.go

@@ -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))