소스 검색

group: add pasture_id

Yi 1 년 전
부모
커밋
60ab7c7493
2개의 변경된 파일8개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      model/group_pasture.go
  2. 2 0
      module/backend/feed_service.go

+ 6 - 4
model/group_pasture.go

@@ -4,15 +4,16 @@ import (
 	"bytes"
 	"encoding/json"
 	"fmt"
-	operationPb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/operation"
-	"gitee.com/xuyiping_admin/pkg/logger/zaplog"
-	"gitee.com/xuyiping_admin/pkg/tool"
-	"gitee.com/xuyiping_admin/pkg/xerr"
 	"io/ioutil"
 	"net/http"
 	"strings"
 	"time"
 
+	operationPb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/operation"
+	"gitee.com/xuyiping_admin/pkg/logger/zaplog"
+	"gitee.com/xuyiping_admin/pkg/tool"
+	"gitee.com/xuyiping_admin/pkg/xerr"
+
 	"go.uber.org/zap"
 )
 
@@ -256,6 +257,7 @@ func (g GroupPastureSlice) ToPB() []*operationPb.AddPastureRequest {
 			IsShow:          v.IsShow,
 			CreatedAt:       int32(v.CreatedAt),
 			CreatedAtFormat: time.Unix(v.CreatedAt, 0).Format(LayoutTime),
+			PastureId:       int32(v.PastureId),
 		}
 	}
 	return res

+ 2 - 0
module/backend/feed_service.go

@@ -752,6 +752,8 @@ func (s *StoreEntry) DistributeFeedFormula(ctx context.Context, req *operationPb
 					if err = s.DB.Create(feedFormulaDistributeLog).Error; err != nil {
 						zaplog.Error("DistributeFeedFormula", zap.Any("feedFormulaDistributeLog", feedFormulaDistributeLog), zap.Any("err", err))
 					}
+				} else {
+					muError = multierr.Append(muError, err)
 				}
 			}()