Browse Source

pasture: 账号下发

Yi 1 year ago
parent
commit
f64f6286c8

+ 15 - 0
backend/operation/feed_formula.proto

@@ -72,6 +72,21 @@ message DistributeFeedFormulaRequest {
   repeated int32 feed_formula_ids = 2;     // 配方ids集合
 }
 
+// 配方使用概况
 message FeedFormulaUsageRequest {
     int32 feed_formula_id = 1;        // 饲料配方id
+    string start_time = 2;            // 开始时间
+    string end_time = 3;              // 结束时间
+}
+
+// 配方使用概况
+message FeedFormulaUsageResponse {
+  repeated FeedFormulaUsageList list = 1;
+}
+
+// 配方使用概况
+message FeedFormulaUsageList {
+  int32 pasture_id = 1;
+  string pasture_name = 2;
+
 }

+ 15 - 0
backend/operation/pasture.proto

@@ -170,6 +170,21 @@ message SearchForageListRequest {
   PaginationModel pagination = 8; // 分页
 }
 
+message ForageListSortRequest {
+  repeated ForageListSort list = 1;
+}
+
+message ForageListSort {
+  int64 id = 1;
+  int64 sort = 2;
+}
+
+message SmallMaterialRequest {
+  string api_name = 1;        // 牧场端接口标识名称
+  int32 pasture_id = 2;       // 牧场id
+  string info_name = 3;       //
+}
+
 message SearchForageListResponse {
  int32 code = 1;
  string msg = 2;

+ 15 - 0
http/handler/feed/feed_formula.go

@@ -277,5 +277,20 @@ func DistributeFeedFormula(c *gin.Context) {
 
 // Usage 配方使用情况
 func Usage(c *gin.Context) {
+	req := &operationPb.FeedFormulaUsageRequest{}
+	if err := ginutil.BindProto(c, req); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
 
+	if err := middleware.BackendOperation(c).OpsService.FeedFormulaUsage(c, req); err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+
+	ginutil.JSONResp(c, &operationPb.CommonOK{
+		Code: http.StatusOK,
+		Msg:  "ok",
+		Data: &operationPb.Success{Success: true},
+	})
 }

+ 34 - 0
http/handler/pasture/forage_list.go

@@ -101,6 +101,40 @@ func SearchForageList(c *gin.Context) {
 	ginutil.JSONResp(c, res)
 }
 
+func ForageListSort(c *gin.Context) {
+	req := &operationPb.ForageListSortRequest{}
+	if err := ginutil.BindProto(c, req); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := middleware.BackendOperation(c).OpsService.ForageListSort(c, req); err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+
+	ginutil.JSONResp(c, &operationPb.CommonOK{
+		Code: http.StatusOK,
+		Msg:  "ok",
+		Data: &operationPb.Success{Success: true},
+	})
+}
+
+// SmallMaterial 小料字段是否展示
+func SmallMaterial(c *gin.Context) {
+	var req operationPb.SmallMaterialRequest
+	if err := ginutil.BindProto(c, &req); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+	res, err := middleware.BackendOperation(c).OpsService.SmallMaterial(c, &req)
+	if err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+	c.JSON(http.StatusOK, res)
+}
+
 // SearchForageEnumList 饲料列表公共枚举
 func SearchForageEnumList(c *gin.Context) {
 	res := middleware.BackendOperation(c).OpsService.ForageEnumList(c)

+ 2 - 0
http/route/ops_api.go

@@ -47,6 +47,8 @@ func OpsAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
 		opsRoute.POST("forage/excel_import", pasture.ExcelImportForage)
 		opsRoute.POST("forage/excel_export", pasture.ExcelExportForage)
 		opsRoute.POST("forage/excel_template", pasture.ExcelTemplateForage)
+		opsRoute.POST("/forage/small_material", pasture.SmallMaterial)
+		opsRoute.POST("/forage/sort", pasture.ForageListSort)
 		opsRoute.GET("/forage/enum/list", pasture.SearchForageEnumList)
 
 		// 饲料配方

+ 3 - 1
model/feed_formula_distribute_log.go

@@ -6,6 +6,7 @@ type FeedFormulaDistributeLog struct {
 	Id            int64                   `json:"id"`
 	FeedFormulaId int64                   `json:"feed_formula_id"`
 	PastureId     int64                   `json:"pasture_id"`
+	PastureName   string                  `json:"pasture_name"`
 	IsShow        operationPb.IsShow_Kind `json:"is_show"`
 	CreatedAt     int64                   `json:"created_at"`
 	UpdatedAt     int64                   `json:"updated_at"`
@@ -23,12 +24,13 @@ func NewFeedFormulaDistributeLog(feedFormulaId, pastureId int64, isShow operatio
 	}
 }
 
-func NewFeedFormulaDistributeLogList(feedFormulaList []*FeedFormula, pastureId int64, isShow operationPb.IsShow_Kind) []*FeedFormulaDistributeLog {
+func NewFeedFormulaDistributeLogList(feedFormulaList []*FeedFormula, pastureId int64, pastureName string, isShow operationPb.IsShow_Kind) []*FeedFormulaDistributeLog {
 	res := make([]*FeedFormulaDistributeLog, 0)
 	for _, v := range feedFormulaList {
 		res = append(res, &FeedFormulaDistributeLog{
 			FeedFormulaId: v.Id,
 			PastureId:     pastureId,
+			PastureName:   pastureName,
 			IsShow:        isShow,
 		})
 	}

+ 1 - 0
model/forage.go

@@ -28,6 +28,7 @@ type Forage struct {
 	RelayLocations     int64                           `json:"relay_locations"`
 	Jmp                operationPb.IsShow_Kind         `json:"jmp"`
 	DataSource         operationPb.DataSource_Kind     `json:"data_source"`
+	Sort               int64                           `json:"sort"`
 	Backup1            string                          `json:"backup1"`
 	Backup2            string                          `json:"backup2"`
 	Backup3            string                          `json:"backup3"`

+ 4 - 3
model/formula_estimate.go

@@ -2,10 +2,10 @@ package model
 
 type PastureCommonRequest struct {
 	Name       string      `json:"name"`
-	Page       int32       `json:"page"`
+	Page       int32       `json:"page,omitempty"`
 	Offset     int32       `json:"offset"`
-	PageCount  int32       `json:"pagecount"`
-	ReturnType string      `json:"returntype"`
+	PageCount  int32       `json:"pagecount,omitempty"`
+	ReturnType string      `json:"returntype,omitempty"`
 	Checked    int32       `json:"checked,omitempty"`
 	ParamMaps  interface{} `json:"parammaps"`
 }
@@ -17,6 +17,7 @@ type FormulaEstimateParams struct {
 	Search    string `json:"search"`
 	TempletId string `json:"templetid"`
 	Barid     string `json:"barid"`
+	ImforName string `json:"inforname,omitempty"`
 }
 
 type PastureCommonResponse struct {

+ 7 - 5
model/pasture_data.go

@@ -44,11 +44,13 @@ type PastureAnalysisAccuracyDataValue struct {
 }
 
 type AccountDistribution struct {
-	Account   string `json:"account"`
-	UserName  string `json:"user_name"`
-	Password  string `json:"password"`
-	Phone     string `json:"phone"`
-	PastureId int32  `json:"pasture_id"`
+	Account     string `json:"account"`
+	UserName    string `json:"user_name"`
+	Password    string `json:"password"`
+	Phone       string `json:"phone"`
+	PastureId   int32  `json:"pasture_id"`
+	PastureName string `json:"pasture_name"`
+	Address     string `json:"address"`
 }
 
 type CategoryRequest struct {

+ 25 - 1
module/backend/feed_service.go

@@ -370,7 +370,7 @@ func (s *StoreEntry) DistributeFeedFormula(ctx context.Context, req *operationPb
 			response := &model.PastureResponse{}
 			defer func() {
 				if response.Code == http.StatusOK {
-					s.DB.Create(model.NewFeedFormulaDistributeLogList(distributeData.FeedFormulaList, p.Id, operationPb.IsShow_OK))
+					s.DB.Create(model.NewFeedFormulaDistributeLogList(distributeData.FeedFormulaList, p.Id, p.Name, operationPb.IsShow_OK))
 				} else {
 					muError = multierr.Append(muError, xerr.Custom(response.Msg))
 				}
@@ -391,6 +391,30 @@ func (s *StoreEntry) DistributeFeedFormula(ctx context.Context, req *operationPb
 	return muError
 }
 
+// FeedFormulaUsage 配方使用概况
+func (s *StoreEntry) FeedFormulaUsage(ctx context.Context, req *operationPb.FeedFormulaUsageRequest) error {
+	feedFormulaDistributeLogList := make([]*model.FeedFormulaDistributeLog, 0)
+	if err := s.DB.Model(new(model.FeedFormulaDistributeLog)).
+		Where("feed_formula_id = ?", req.FeedFormulaId).
+		Where("is_show = ?", operationPb.IsShow_OK).
+		Find(&feedFormulaDistributeLogList).Error; err != nil {
+		return xerr.WithStack(err)
+	}
+
+	wg := sync.WaitGroup{}
+	wg.Add(len(feedFormulaDistributeLogList))
+
+	for _, list := range feedFormulaDistributeLogList {
+		go func(l *model.FeedFormulaDistributeLog) {
+
+			wg.Done()
+		}(list)
+	}
+
+	wg.Wait()
+	return nil
+}
+
 func (s *StoreEntry) PastureFeedFormulaIsModify(ctx context.Context, feedFormulaId int32, isModify operationPb.IsShow_Kind) {
 	feedFormulaDistributeLogList := make([]*model.FeedFormulaDistributeLog, 0)
 	if err := s.DB.Where("is_show = ?", operationPb.IsShow_OK).

+ 3 - 0
module/backend/interface.go

@@ -76,12 +76,14 @@ type PastureService interface {
 	CreateForage(ctx context.Context, req *operationPb.AddForageRequest) error
 	EditForage(ctx context.Context, req *operationPb.AddForageRequest) error
 	SearchForageList(ctx context.Context, req *operationPb.SearchForageListRequest) (*operationPb.SearchForageListResponse, error)
+	ForageListSort(ctx context.Context, req *operationPb.ForageListSortRequest) error
 	ForageEnumList(ctx context.Context) *operationPb.ForageEnumListResponse
 	DeleteForageList(ctx context.Context, ids []int64) error
 	IsShowForage(ctx context.Context, req *operationPb.IsShowForage) error
 	ExcelImportForage(ctx context.Context, req io.Reader) error
 	ExcelExportForage(ctx context.Context, req *operationPb.SearchForageListRequest) (*bytes.Buffer, error)
 	ExcelTemplateForage(ctx context.Context) (*bytes.Buffer, error)
+	SmallMaterial(ctx context.Context, req *operationPb.SmallMaterialRequest) (*model.PastureCommonResponse, error)
 
 	// CreateFeedFormula 饲料配方
 	CreateFeedFormula(ctx context.Context, req *operationPb.AddFeedFormulaRequest) error
@@ -94,6 +96,7 @@ type PastureService interface {
 	ExcelTemplateFeedFormula(ctx context.Context) (*bytes.Buffer, error)
 	EncodeNumber(ctx context.Context) string
 	DistributeFeedFormula(ctx context.Context, req *operationPb.DistributeFeedFormulaRequest) error
+	FeedFormulaUsage(ctx context.Context, req *operationPb.FeedFormulaUsageRequest) error
 }
 
 type SystemService interface {

+ 37 - 6
module/backend/pasture_service.go

@@ -44,11 +44,13 @@ func (s *StoreEntry) PastureAccountDistribution(ctx context.Context, groupPastur
 		return nil
 	}
 	body := &model.AccountDistribution{
-		Account:   groupPasture.Account,
-		UserName:  groupPasture.ManagerUser,
-		Password:  groupPasture.Password,
-		Phone:     groupPasture.ManagerPhone,
-		PastureId: int32(groupPasture.Id),
+		Account:     groupPasture.Account,
+		UserName:    groupPasture.ManagerUser,
+		Password:    groupPasture.Password,
+		Phone:       groupPasture.ManagerPhone,
+		PastureId:   int32(groupPasture.Id),
+		PastureName: groupPasture.Name,
+		Address:     groupPasture.Address,
 	}
 	res := &model.PastureCommonResponse{}
 	if err := s.PastureHttpClient(ctx, model.PastureAccountDistributionURl, groupPasture.Id, body, res); err != nil {
@@ -599,7 +601,7 @@ func (s *StoreEntry) SearchForageList(ctx context.Context, req *operationPb.Sear
 		pref.Where("jump_delay = ?", req.JumpDelay)
 	}
 
-	if err := pref.Order("id desc").Count(&count).Limit(int(req.Pagination.PageSize)).Offset(int(req.Pagination.PageOffset)).
+	if err := pref.Order("sort").Count(&count).Limit(int(req.Pagination.PageSize)).Offset(int(req.Pagination.PageOffset)).
 		Find(&forage).Error; err != nil {
 		return nil, xerr.WithStack(err)
 	}
@@ -616,6 +618,19 @@ func (s *StoreEntry) SearchForageList(ctx context.Context, req *operationPb.Sear
 	}, nil
 }
 
+func (s *StoreEntry) ForageListSort(ctx context.Context, req *operationPb.ForageListSortRequest) error {
+
+	for _, v := range req.List {
+		if err := s.DB.Model(new(model.Forage)).Select("sort").Where("id = ?", v.Id).Updates(map[string]interface{}{
+			"sort": v.Sort,
+		}).Error; err != nil {
+			zaplog.Error("ForageListSort", zap.Any("err", err), zap.Any("id", v.Id), zap.Any("sort", v.Sort))
+		}
+	}
+
+	return nil
+}
+
 func (s *StoreEntry) ForageEnumList(ctx context.Context) *operationPb.ForageEnumListResponse {
 	res := &operationPb.ForageEnumListResponse{
 		Code: http.StatusOK,
@@ -1024,3 +1039,19 @@ func (s *StoreEntry) ExcelTemplateForage(ctx context.Context) (*bytes.Buffer, er
 
 	return file.WriteToBuffer()
 }
+
+func (s *StoreEntry) SmallMaterial(ctx context.Context, req *operationPb.SmallMaterialRequest) (*model.PastureCommonResponse, error) {
+	body := &model.PastureCommonRequest{
+		Name:       req.ApiName,
+		ReturnType: "Map",
+		ParamMaps: &model.FormulaEstimateParams{
+			PastureId: fmt.Sprintf("%d", req.PastureId),
+			ImforName: req.InfoName,
+		},
+	}
+	response := &model.PastureCommonResponse{Data: &model.PastureCommonData{}}
+	if err := s.PastureHttpClient(ctx, model.UrlDataByName, int64(req.PastureId), body, response); err != nil {
+		return nil, xerr.WithStack(err)
+	}
+	return response, nil
+}

+ 189 - 27
proto/go/backend/operation/feed_formula.pb.go

@@ -608,12 +608,15 @@ func (x *DistributeFeedFormulaRequest) GetFeedFormulaIds() []int32 {
 	return nil
 }
 
+// 配方使用概况
 type FeedFormulaUsageRequest struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	FeedFormulaId int32 `protobuf:"varint,1,opt,name=feed_formula_id,json=feedFormulaId,proto3" json:"feed_formula_id,omitempty"` // 饲料配方id
+	FeedFormulaId int32  `protobuf:"varint,1,opt,name=feed_formula_id,json=feedFormulaId,proto3" json:"feed_formula_id,omitempty"` // 饲料配方id
+	StartTime     string `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`                // 开始时间
+	EndTime       string `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`                      // 结束时间
 }
 
 func (x *FeedFormulaUsageRequest) Reset() {
@@ -655,6 +658,124 @@ func (x *FeedFormulaUsageRequest) GetFeedFormulaId() int32 {
 	return 0
 }
 
+func (x *FeedFormulaUsageRequest) GetStartTime() string {
+	if x != nil {
+		return x.StartTime
+	}
+	return ""
+}
+
+func (x *FeedFormulaUsageRequest) GetEndTime() string {
+	if x != nil {
+		return x.EndTime
+	}
+	return ""
+}
+
+// 配方使用概况
+type FeedFormulaUsageResponse struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	List []*FeedFormulaUsageList `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
+}
+
+func (x *FeedFormulaUsageResponse) Reset() {
+	*x = FeedFormulaUsageResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_backend_operation_feed_formula_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *FeedFormulaUsageResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FeedFormulaUsageResponse) ProtoMessage() {}
+
+func (x *FeedFormulaUsageResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_backend_operation_feed_formula_proto_msgTypes[8]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use FeedFormulaUsageResponse.ProtoReflect.Descriptor instead.
+func (*FeedFormulaUsageResponse) Descriptor() ([]byte, []int) {
+	return file_backend_operation_feed_formula_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *FeedFormulaUsageResponse) GetList() []*FeedFormulaUsageList {
+	if x != nil {
+		return x.List
+	}
+	return nil
+}
+
+// 配方使用概况
+type FeedFormulaUsageList struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	PastureId   int32  `protobuf:"varint,1,opt,name=pasture_id,json=pastureId,proto3" json:"pasture_id,omitempty"`
+	PastureName string `protobuf:"bytes,2,opt,name=pasture_name,json=pastureName,proto3" json:"pasture_name,omitempty"`
+}
+
+func (x *FeedFormulaUsageList) Reset() {
+	*x = FeedFormulaUsageList{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_backend_operation_feed_formula_proto_msgTypes[9]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *FeedFormulaUsageList) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FeedFormulaUsageList) ProtoMessage() {}
+
+func (x *FeedFormulaUsageList) ProtoReflect() protoreflect.Message {
+	mi := &file_backend_operation_feed_formula_proto_msgTypes[9]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use FeedFormulaUsageList.ProtoReflect.Descriptor instead.
+func (*FeedFormulaUsageList) Descriptor() ([]byte, []int) {
+	return file_backend_operation_feed_formula_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *FeedFormulaUsageList) GetPastureId() int32 {
+	if x != nil {
+		return x.PastureId
+	}
+	return 0
+}
+
+func (x *FeedFormulaUsageList) GetPastureName() string {
+	if x != nil {
+		return x.PastureName
+	}
+	return ""
+}
+
 type UniqueID_UniqueData struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -666,7 +787,7 @@ type UniqueID_UniqueData struct {
 func (x *UniqueID_UniqueData) Reset() {
 	*x = UniqueID_UniqueData{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_backend_operation_feed_formula_proto_msgTypes[8]
+		mi := &file_backend_operation_feed_formula_proto_msgTypes[10]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -679,7 +800,7 @@ func (x *UniqueID_UniqueData) String() string {
 func (*UniqueID_UniqueData) ProtoMessage() {}
 
 func (x *UniqueID_UniqueData) ProtoReflect() protoreflect.Message {
-	mi := &file_backend_operation_feed_formula_proto_msgTypes[8]
+	mi := &file_backend_operation_feed_formula_proto_msgTypes[10]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -824,13 +945,27 @@ var file_backend_operation_feed_formula_proto_rawDesc = []byte{
 	0x05, 0x52, 0x0a, 0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a,
 	0x10, 0x66, 0x65, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x5f, 0x69, 0x64,
 	0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x65, 0x65, 0x64, 0x46, 0x6f, 0x72,
-	0x6d, 0x75, 0x6c, 0x61, 0x49, 0x64, 0x73, 0x22, 0x41, 0x0a, 0x17, 0x46, 0x65, 0x65, 0x64, 0x46,
+	0x6d, 0x75, 0x6c, 0x61, 0x49, 0x64, 0x73, 0x22, 0x7b, 0x0a, 0x17, 0x46, 0x65, 0x65, 0x64, 0x46,
 	0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
 	0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x66, 0x65, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x75,
 	0x6c, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x66, 0x65, 0x65,
-	0x64, 0x46, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x49, 0x64, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b,
-	0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
-	0x74, 0x6f, 0x33,
+	0x64, 0x46, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74,
+	0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+	0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64,
+	0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64,
+	0x54, 0x69, 0x6d, 0x65, 0x22, 0x57, 0x0a, 0x18, 0x46, 0x65, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x6d,
+	0x75, 0x6c, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+	0x12, 0x3b, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27,
+	0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
+	0x6f, 0x6e, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x55, 0x73,
+	0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x58, 0x0a,
+	0x14, 0x46, 0x65, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x6d, 0x75, 0x6c, 0x61, 0x55, 0x73, 0x61, 0x67,
+	0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65,
+	0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x73, 0x74, 0x75,
+	0x72, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x5f,
+	0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x73, 0x74,
+	0x75, 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, 0x6f, 0x70, 0x65,
+	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -845,7 +980,7 @@ func file_backend_operation_feed_formula_proto_rawDescGZIP() []byte {
 	return file_backend_operation_feed_formula_proto_rawDescData
 }
 
-var file_backend_operation_feed_formula_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
+var file_backend_operation_feed_formula_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
 var file_backend_operation_feed_formula_proto_goTypes = []interface{}{
 	(*AddFeedFormulaRequest)(nil),         // 0: backend.operation.AddFeedFormulaRequest
 	(*SearchFeedFormulaRequest)(nil),      // 1: backend.operation.SearchFeedFormulaRequest
@@ -855,28 +990,31 @@ var file_backend_operation_feed_formula_proto_goTypes = []interface{}{
 	(*UniqueID)(nil),                      // 5: backend.operation.UniqueID
 	(*DistributeFeedFormulaRequest)(nil),  // 6: backend.operation.DistributeFeedFormulaRequest
 	(*FeedFormulaUsageRequest)(nil),       // 7: backend.operation.FeedFormulaUsageRequest
-	(*UniqueID_UniqueData)(nil),           // 8: backend.operation.UniqueID.UniqueData
-	(CattleCategoryParent_Kind)(0),        // 9: backend.operation.CattleCategoryParent.Kind
-	(DataSource_Kind)(0),                  // 10: backend.operation.DataSource.Kind
-	(IsShow_Kind)(0),                      // 11: backend.operation.IsShow.Kind
-	(*PaginationModel)(nil),               // 12: backend.operation.PaginationModel
+	(*FeedFormulaUsageResponse)(nil),      // 8: backend.operation.FeedFormulaUsageResponse
+	(*FeedFormulaUsageList)(nil),          // 9: backend.operation.FeedFormulaUsageList
+	(*UniqueID_UniqueData)(nil),           // 10: backend.operation.UniqueID.UniqueData
+	(CattleCategoryParent_Kind)(0),        // 11: backend.operation.CattleCategoryParent.Kind
+	(DataSource_Kind)(0),                  // 12: backend.operation.DataSource.Kind
+	(IsShow_Kind)(0),                      // 13: backend.operation.IsShow.Kind
+	(*PaginationModel)(nil),               // 14: backend.operation.PaginationModel
 }
 var file_backend_operation_feed_formula_proto_depIdxs = []int32{
-	9,  // 0: backend.operation.AddFeedFormulaRequest.cattle_category_id:type_name -> backend.operation.CattleCategoryParent.Kind
-	10, // 1: backend.operation.AddFeedFormulaRequest.data_source_id:type_name -> backend.operation.DataSource.Kind
-	11, // 2: backend.operation.AddFeedFormulaRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	11, // 3: backend.operation.AddFeedFormulaRequest.is_modify:type_name -> backend.operation.IsShow.Kind
-	11, // 4: backend.operation.SearchFeedFormulaRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	12, // 5: backend.operation.SearchFeedFormulaRequest.pagination:type_name -> backend.operation.PaginationModel
+	11, // 0: backend.operation.AddFeedFormulaRequest.cattle_category_id:type_name -> backend.operation.CattleCategoryParent.Kind
+	12, // 1: backend.operation.AddFeedFormulaRequest.data_source_id:type_name -> backend.operation.DataSource.Kind
+	13, // 2: backend.operation.AddFeedFormulaRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	13, // 3: backend.operation.AddFeedFormulaRequest.is_modify:type_name -> backend.operation.IsShow.Kind
+	13, // 4: backend.operation.SearchFeedFormulaRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	14, // 5: backend.operation.SearchFeedFormulaRequest.pagination:type_name -> backend.operation.PaginationModel
 	3,  // 6: backend.operation.SearchFeedFormulaListResponse.data:type_name -> backend.operation.SearchFeedFormulaListData
 	0,  // 7: backend.operation.SearchFeedFormulaListData.list:type_name -> backend.operation.AddFeedFormulaRequest
-	11, // 8: backend.operation.IsShowModifyFeedFormula.is_show:type_name -> backend.operation.IsShow.Kind
-	8,  // 9: backend.operation.UniqueID.data:type_name -> backend.operation.UniqueID.UniqueData
-	10, // [10:10] is the sub-list for method output_type
-	10, // [10:10] is the sub-list for method input_type
-	10, // [10:10] is the sub-list for extension type_name
-	10, // [10:10] is the sub-list for extension extendee
-	0,  // [0:10] is the sub-list for field type_name
+	13, // 8: backend.operation.IsShowModifyFeedFormula.is_show:type_name -> backend.operation.IsShow.Kind
+	10, // 9: backend.operation.UniqueID.data:type_name -> backend.operation.UniqueID.UniqueData
+	9,  // 10: backend.operation.FeedFormulaUsageResponse.list:type_name -> backend.operation.FeedFormulaUsageList
+	11, // [11:11] is the sub-list for method output_type
+	11, // [11:11] is the sub-list for method input_type
+	11, // [11:11] is the sub-list for extension type_name
+	11, // [11:11] is the sub-list for extension extendee
+	0,  // [0:11] is the sub-list for field type_name
 }
 
 func init() { file_backend_operation_feed_formula_proto_init() }
@@ -984,6 +1122,30 @@ func file_backend_operation_feed_formula_proto_init() {
 			}
 		}
 		file_backend_operation_feed_formula_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FeedFormulaUsageResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_backend_operation_feed_formula_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FeedFormulaUsageList); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_backend_operation_feed_formula_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*UniqueID_UniqueData); i {
 			case 0:
 				return &v.state
@@ -1002,7 +1164,7 @@ func file_backend_operation_feed_formula_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_backend_operation_feed_formula_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   9,
+			NumMessages:   11,
 			NumExtensions: 0,
 			NumServices:   0,
 		},

File diff suppressed because it is too large
+ 452 - 268
proto/go/backend/operation/pasture.pb.go


Some files were not shown because too many files changed in this diff