Browse Source

“âfeed: 牧场配方数据同步

Yi 1 year ago
parent
commit
c70a678fb0

+ 4 - 0
backend/operation/pasture.proto

@@ -286,4 +286,8 @@ message CategoryDeleteRequest {
   string key_word = 1;    // 关键字
   int32 pasture_id = 2;   // 牧场id
   int32 data_id = 3;
+}
+
+message FeedFormulaSyncRequest {
+  int32 pasture_id = 1;
 }

+ 22 - 0
http/debug/debug.go

@@ -1,6 +1,10 @@
 package debug
 
 import (
+	"kpt-tmr-group/http/middleware"
+	"kpt-tmr-group/pkg/apierr"
+	"kpt-tmr-group/pkg/ginutil"
+	operationPb "kpt-tmr-group/proto/go/backend/operation"
 	"net/http"
 
 	"github.com/gin-gonic/gin"
@@ -11,3 +15,21 @@ func HelloOk(c *gin.Context) {
 	// kafka
 	c.JSON(http.StatusOK, gin.H{"result": "ok"})
 }
+
+func FeedFormulaSync(c *gin.Context) {
+	var req operationPb.FeedFormulaSyncRequest
+	if err := ginutil.BindProto(c, &req); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := middleware.BackendOperation(c).OpsService.FeedFormulaSyncData(c, &req); err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+	ginutil.JSONResp(c, &operationPb.CommonOK{
+		Code: http.StatusOK,
+		Msg:  "ok",
+		Data: &operationPb.Success{Success: true},
+	})
+}

+ 1 - 0
http/route/api_debug_route.go

@@ -19,6 +19,7 @@ func DebugAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
 		debugRoute := authRouteGroup(s, "/api/v1/kpt/debug/")
 		// kpt debug api
 		debugRoute.GET("hello", debug.HelloOk)
+		debugRoute.POST("pasture/feed_formula/sync", debug.FeedFormulaSync) // 同步饲料配方
 	}
 
 }

+ 1 - 0
model/group_pasture.go

@@ -58,6 +58,7 @@ const (
 const (
 	FeedFormulaDistributeUrl      = "pasture/feed_formula/distribute"
 	FeedFormulaIsModifyUrl        = "pasture/feed_formula/is_modify"
+	FeedFormulaListAsyncUrl       = "pasture/feed_formula/list"
 	DashboardAccuracyUrl          = "pasture/dashboard/accuracy_data"
 	DashboardExecTimeUrl          = "pasture/dashboard/process_analysis"
 	DashboardSprinkleFeedTimeUrl  = "pasture/dashboard/sprinkle_statistics"

+ 47 - 0
model/pasture_data.go

@@ -68,3 +68,50 @@ type CategoryDeleteRequest struct {
 	GroupId   int32 `json:"group_id"`
 	IsDelete  int32 `json:"is_delete"`
 }
+
+type FeedFormulaListRequest struct {
+	PastureId int32 `json:"pasture_id"`
+	Page      int32 `json:"page"`
+	PageSize  int32 `json:"page_size"`
+}
+
+type FeedFormulaListResponse struct {
+	Code int32            `json:"code"`
+	Msg  string           `json:"msg"`
+	Data *FeedFormulaData `json:"data"`
+}
+
+type FeedFormulaData struct {
+	Total    int32           `json:"total"`
+	Page     int32           `json:"page"`
+	PageSize int32           `json:"page_size"`
+	List     []*FeedTemplate `json:"list"`
+}
+
+type FeedTemplate struct {
+	Id           int64   `xorm:"id"`
+	PastureId    int64   `xorm:"pastureid"`
+	TCode        string  `xorm:"tcode"`
+	TName        string  `xorm:"tname"`
+	TColor       string  `xorm:"tcolor"`
+	CCid         int64   `xorm:"ccid"`
+	CCName       string  `xorm:"ccname"`
+	FTType       string  `xorm:"fttype"`
+	FTTypeId     int32   `xorm:"fttypeid"`
+	Source       string  `xorm:"source"`
+	Remark       string  `xorm:"remark"`
+	Enable       int32   `xorm:"enable"`
+	Sort         int64   `xorm:"sort"`
+	Owner        string  `xorm:"owner"`
+	Weight       float64 `xorm:"weight"`
+	DryWeight    float64 `xorm:"dryweight"`
+	IsDelete     int32   `xorm:"isdelete"`
+	Version      int64   `xorm:"version"`
+	SaveTime     string  `xorm:"savetime"`
+	IsIssue      int32   `xorm:"isissue"`
+	IssueVersion int32   `xorm:"issueversion"`
+	IssueId      int64   `xorm:"issueid"`
+	Backup1      string  `xorm:"backup1"`
+	Backup2      string  `xorm:"backup2"`
+	IsModify     int32   `xorm:"is_modify"`
+}

+ 1 - 0
module/backend/interface.go

@@ -163,4 +163,5 @@ type WxAppletService interface {
 type PastureSyncService interface {
 	CategorySyncData(ctx context.Context, req *operationPb.CategorySyncRequest) error
 	CategoryDeleteData(ctx context.Context, req *operationPb.CategoryDeleteRequest) error
+	FeedFormulaSyncData(ctx context.Context, req *operationPb.FeedFormulaSyncRequest) error
 }

+ 1 - 1
module/backend/pasture_service.go

@@ -895,7 +895,7 @@ func (s *StoreEntry) ForageEnumList(ctx context.Context) *operationPb.ForageEnum
 
 	res.Data.FormulaList = append(res.Data.FormulaList, &operationPb.FormulaOptionEnum{
 		Value: 0,
-		Label: "所有",
+		Label: "所有配方",
 	})
 	formulaList := make([]*model.FeedFormula, 0)
 	if err := s.DB.Where("is_delete = ?", operationPb.IsShow_OK).Find(&formulaList).Error; err != nil {

+ 80 - 0
module/backend/pasture_sync_service.go

@@ -6,6 +6,8 @@ import (
 	"kpt-tmr-group/model"
 	"kpt-tmr-group/pkg/xerr"
 	operationPb "kpt-tmr-group/proto/go/backend/operation"
+	"math"
+	"net/http"
 
 	"gorm.io/gorm"
 )
@@ -102,3 +104,81 @@ func (s *StoreEntry) CategoryDeleteData(ctx context.Context, req *operationPb.Ca
 	}
 	return nil
 }
+
+func (s *StoreEntry) FeedFormulaSyncData(ctx context.Context, req *operationPb.FeedFormulaSyncRequest) error {
+	groupPastureList, err := s.DataSyncGroupPastureList(ctx)
+	if err != nil {
+		return xerr.WithStack(err)
+	}
+
+	var (
+		ok           bool
+		groupPasture *model.GroupPasture
+	)
+	for _, pastureDetail := range groupPastureList {
+		if pastureDetail.Id != int64(req.PastureId) {
+			continue
+		}
+		groupPasture = pastureDetail
+		ok = true
+	}
+
+	if ok {
+		total := 0
+		page := 1
+		pageSize := 100
+		for i := 0; i <= total; i++ {
+			body := &model.FeedFormulaListRequest{
+				PastureId: req.PastureId,
+				Page:      int32(page),
+				PageSize:  int32(pageSize),
+			}
+			response := &model.FeedFormulaListResponse{}
+			if _, err = s.PastureHttpClient(ctx, model.FeedFormulaListAsyncUrl, int64(req.PastureId), body, response); err != nil {
+				return xerr.WithStack(err)
+			}
+
+			if response.Code != http.StatusOK {
+				return xerr.Customf("%s", response.Msg)
+			}
+			if response.Data.Total > 0 {
+				total = int(math.Ceil(float64(response.Data.Total) / float64(pageSize)))
+			}
+
+			if err = s.FeedFormulaInsert(ctx, groupPasture, response.Data.List); err != nil {
+				return xerr.WithStack(err)
+			}
+
+		}
+
+	}
+	return nil
+}
+
+func (s *StoreEntry) FeedFormulaInsert(ctx context.Context, groupPasture *model.GroupPasture, list []*model.FeedTemplate) error {
+	res := make([]*model.FeedFormula, 0)
+	for _, data := range list {
+		res = append(res, &model.FeedFormula{
+			Name:               data.TName,
+			Colour:             data.TColor,
+			EncodeNumber:       data.TCode,
+			CattleCategoryId:   operationPb.CattleCategoryParent_Kind(data.CCid),
+			CattleCategoryName: data.CCName,
+			FormulaTypeId:      data.FTTypeId,
+			FormulaTypeName:    data.FTType,
+			DataSourceId:       operationPb.DataSource_FROM_PASTURE,
+			DataSourceName:     "牧场同步",
+			Remarks:            data.Remark,
+			Version:            data.Version,
+			PastureId:          groupPasture.PastureId,
+			PastureName:        groupPasture.Name,
+			IsShow:             operationPb.IsShow_Kind(data.Enable),
+			IsModify:           operationPb.IsShow_Kind(data.IsModify),
+			IsDelete:           operationPb.IsShow_OK,
+		})
+	}
+	if err := s.DB.Model(new(model.FeedFormula)).Create(res).Error; err != nil {
+		return xerr.WithStack(err)
+	}
+	return nil
+}

+ 108 - 44
proto/go/backend/operation/pasture.pb.go

@@ -2754,6 +2754,53 @@ func (x *CategoryDeleteRequest) GetDataId() int32 {
 	return 0
 }
 
+type FeedFormulaSyncRequest 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"`
+}
+
+func (x *FeedFormulaSyncRequest) Reset() {
+	*x = FeedFormulaSyncRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_backend_operation_pasture_proto_msgTypes[36]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *FeedFormulaSyncRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FeedFormulaSyncRequest) ProtoMessage() {}
+
+func (x *FeedFormulaSyncRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_backend_operation_pasture_proto_msgTypes[36]
+	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 FeedFormulaSyncRequest.ProtoReflect.Descriptor instead.
+func (*FeedFormulaSyncRequest) Descriptor() ([]byte, []int) {
+	return file_backend_operation_pasture_proto_rawDescGZIP(), []int{36}
+}
+
+func (x *FeedFormulaSyncRequest) GetPastureId() int32 {
+	if x != nil {
+		return x.PastureId
+	}
+	return 0
+}
+
 var File_backend_operation_pasture_proto protoreflect.FileDescriptor
 
 var file_backend_operation_pasture_proto_rawDesc = []byte{
@@ -3240,8 +3287,12 @@ var file_backend_operation_pasture_proto_rawDesc = []byte{
 	0x73, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
 	0x70, 0x61, 0x73, 0x74, 0x75, 0x72, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x61, 0x74,
 	0x61, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x61, 0x74, 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,
+	0x49, 0x64, 0x22, 0x37, 0x0a, 0x16, 0x46, 0x65, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x6d, 0x75, 0x6c,
+	0x61, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 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, 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 (
@@ -3256,7 +3307,7 @@ func file_backend_operation_pasture_proto_rawDescGZIP() []byte {
 	return file_backend_operation_pasture_proto_rawDescData
 }
 
-var file_backend_operation_pasture_proto_msgTypes = make([]protoimpl.MessageInfo, 36)
+var file_backend_operation_pasture_proto_msgTypes = make([]protoimpl.MessageInfo, 37)
 var file_backend_operation_pasture_proto_goTypes = []interface{}{
 	(*AddPastureRequest)(nil),            // 0: backend.operation.AddPastureRequest
 	(*SearchPastureRequest)(nil),         // 1: backend.operation.SearchPastureRequest
@@ -3294,48 +3345,49 @@ var file_backend_operation_pasture_proto_goTypes = []interface{}{
 	(*FormulaOptionEnum)(nil),            // 33: backend.operation.FormulaOptionEnum
 	(*CategorySyncRequest)(nil),          // 34: backend.operation.CategorySyncRequest
 	(*CategoryDeleteRequest)(nil),        // 35: backend.operation.CategoryDeleteRequest
-	(IsShow_Kind)(0),                     // 36: backend.operation.IsShow.Kind
-	(*PaginationModel)(nil),              // 37: backend.operation.PaginationModel
-	(CattleCategoryParent_Kind)(0),       // 38: backend.operation.CattleCategoryParent.Kind
-	(ForageCategoryParent_Kind)(0),       // 39: backend.operation.ForageCategoryParent.Kind
-	(ForageSource_Kind)(0),               // 40: backend.operation.ForageSource.Kind
-	(ForagePlanType_Kind)(0),             // 41: backend.operation.ForagePlanType.Kind
-	(JumpDelaType_Kind)(0),               // 42: backend.operation.JumpDelaType.Kind
-	(FormulaType_Kind)(0),                // 43: backend.operation.FormulaType.Kind
+	(*FeedFormulaSyncRequest)(nil),       // 36: backend.operation.FeedFormulaSyncRequest
+	(IsShow_Kind)(0),                     // 37: backend.operation.IsShow.Kind
+	(*PaginationModel)(nil),              // 38: backend.operation.PaginationModel
+	(CattleCategoryParent_Kind)(0),       // 39: backend.operation.CattleCategoryParent.Kind
+	(ForageCategoryParent_Kind)(0),       // 40: backend.operation.ForageCategoryParent.Kind
+	(ForageSource_Kind)(0),               // 41: backend.operation.ForageSource.Kind
+	(ForagePlanType_Kind)(0),             // 42: backend.operation.ForagePlanType.Kind
+	(JumpDelaType_Kind)(0),               // 43: backend.operation.JumpDelaType.Kind
+	(FormulaType_Kind)(0),                // 44: backend.operation.FormulaType.Kind
 }
 var file_backend_operation_pasture_proto_depIdxs = []int32{
-	36, // 0: backend.operation.AddPastureRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	37, // 1: backend.operation.SearchPastureRequest.pagination:type_name -> backend.operation.PaginationModel
+	37, // 0: backend.operation.AddPastureRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	38, // 1: backend.operation.SearchPastureRequest.pagination:type_name -> backend.operation.PaginationModel
 	3,  // 2: backend.operation.SearchPastureResponse.data:type_name -> backend.operation.SearchPastureData
 	0,  // 3: backend.operation.SearchPastureData.list:type_name -> backend.operation.AddPastureRequest
-	36, // 4: backend.operation.IsShowGroupPasture.is_show:type_name -> backend.operation.IsShow.Kind
-	38, // 5: backend.operation.AddCattleCategoryRequest.parent_id:type_name -> backend.operation.CattleCategoryParent.Kind
-	36, // 6: backend.operation.AddCattleCategoryRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	36, // 7: backend.operation.IsShowCattleCategory.is_show:type_name -> backend.operation.IsShow.Kind
-	36, // 8: backend.operation.SearchCattleCategoryRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	37, // 9: backend.operation.SearchCattleCategoryRequest.pagination:type_name -> backend.operation.PaginationModel
+	37, // 4: backend.operation.IsShowGroupPasture.is_show:type_name -> backend.operation.IsShow.Kind
+	39, // 5: backend.operation.AddCattleCategoryRequest.parent_id:type_name -> backend.operation.CattleCategoryParent.Kind
+	37, // 6: backend.operation.AddCattleCategoryRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	37, // 7: backend.operation.IsShowCattleCategory.is_show:type_name -> backend.operation.IsShow.Kind
+	37, // 8: backend.operation.SearchCattleCategoryRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	38, // 9: backend.operation.SearchCattleCategoryRequest.pagination:type_name -> backend.operation.PaginationModel
 	10, // 10: backend.operation.SearchCattleCategoryResponse.data:type_name -> backend.operation.SearchCattleCategoryData
 	6,  // 11: backend.operation.SearchCattleCategoryData.list:type_name -> backend.operation.AddCattleCategoryRequest
-	39, // 12: backend.operation.AddForageCategoryRequest.parent_id:type_name -> backend.operation.ForageCategoryParent.Kind
-	36, // 13: backend.operation.AddForageCategoryRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	36, // 14: backend.operation.IsShowForageCategory.is_show:type_name -> backend.operation.IsShow.Kind
-	36, // 15: backend.operation.SearchForageCategoryRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	37, // 16: backend.operation.SearchForageCategoryRequest.pagination:type_name -> backend.operation.PaginationModel
+	40, // 12: backend.operation.AddForageCategoryRequest.parent_id:type_name -> backend.operation.ForageCategoryParent.Kind
+	37, // 13: backend.operation.AddForageCategoryRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	37, // 14: backend.operation.IsShowForageCategory.is_show:type_name -> backend.operation.IsShow.Kind
+	37, // 15: backend.operation.SearchForageCategoryRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	38, // 16: backend.operation.SearchForageCategoryRequest.pagination:type_name -> backend.operation.PaginationModel
 	15, // 17: backend.operation.SearchForageCategoryResponse.data:type_name -> backend.operation.SearchForageCategoryData
 	11, // 18: backend.operation.SearchForageCategoryData.list:type_name -> backend.operation.AddForageCategoryRequest
-	40, // 19: backend.operation.AddForageRequest.forage_source_id:type_name -> backend.operation.ForageSource.Kind
-	41, // 20: backend.operation.AddForageRequest.plan_type_id:type_name -> backend.operation.ForagePlanType.Kind
-	42, // 21: backend.operation.AddForageRequest.jump_delay:type_name -> backend.operation.JumpDelaType.Kind
-	36, // 22: backend.operation.AddForageRequest.confirm_start:type_name -> backend.operation.IsShow.Kind
-	36, // 23: backend.operation.AddForageRequest.jmp:type_name -> backend.operation.IsShow.Kind
-	36, // 24: backend.operation.AddForageRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	36, // 25: backend.operation.SearchForageListRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	42, // 26: backend.operation.SearchForageListRequest.jump_delay:type_name -> backend.operation.JumpDelaType.Kind
-	37, // 27: backend.operation.SearchForageListRequest.pagination:type_name -> backend.operation.PaginationModel
+	41, // 19: backend.operation.AddForageRequest.forage_source_id:type_name -> backend.operation.ForageSource.Kind
+	42, // 20: backend.operation.AddForageRequest.plan_type_id:type_name -> backend.operation.ForagePlanType.Kind
+	43, // 21: backend.operation.AddForageRequest.jump_delay:type_name -> backend.operation.JumpDelaType.Kind
+	37, // 22: backend.operation.AddForageRequest.confirm_start:type_name -> backend.operation.IsShow.Kind
+	37, // 23: backend.operation.AddForageRequest.jmp:type_name -> backend.operation.IsShow.Kind
+	37, // 24: backend.operation.AddForageRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	37, // 25: backend.operation.SearchForageListRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	43, // 26: backend.operation.SearchForageListRequest.jump_delay:type_name -> backend.operation.JumpDelaType.Kind
+	38, // 27: backend.operation.SearchForageListRequest.pagination:type_name -> backend.operation.PaginationModel
 	19, // 28: backend.operation.ForageListSortRequest.list:type_name -> backend.operation.ForageListSort
 	22, // 29: backend.operation.SearchForageListResponse.data:type_name -> backend.operation.SearchForageList
 	16, // 30: backend.operation.SearchForageList.list:type_name -> backend.operation.AddForageRequest
-	36, // 31: backend.operation.IsShowForage.is_show:type_name -> backend.operation.IsShow.Kind
+	37, // 31: backend.operation.IsShowForage.is_show:type_name -> backend.operation.IsShow.Kind
 	25, // 32: backend.operation.ForageEnumListResponse.data:type_name -> backend.operation.ForageEnumList
 	26, // 33: backend.operation.ForageEnumList.forage_source:type_name -> backend.operation.ForageSourceEnum
 	27, // 34: backend.operation.ForageEnumList.forage_plan_type:type_name -> backend.operation.ForagePlanTypeEnum
@@ -3352,15 +3404,15 @@ var file_backend_operation_pasture_proto_depIdxs = []int32{
 	33, // 45: backend.operation.ForageEnumList.price_materials_type:type_name -> backend.operation.FormulaOptionEnum
 	33, // 46: backend.operation.ForageEnumList.jump_type:type_name -> backend.operation.FormulaOptionEnum
 	33, // 47: backend.operation.ForageEnumList.statistics_type:type_name -> backend.operation.FormulaOptionEnum
-	40, // 48: backend.operation.ForageSourceEnum.value:type_name -> backend.operation.ForageSource.Kind
-	41, // 49: backend.operation.ForagePlanTypeEnum.value:type_name -> backend.operation.ForagePlanType.Kind
-	42, // 50: backend.operation.JumpDelaTypeEnum.value:type_name -> backend.operation.JumpDelaType.Kind
-	38, // 51: backend.operation.CattleParentCategoryEnum.value:type_name -> backend.operation.CattleCategoryParent.Kind
-	39, // 52: backend.operation.ForageParentCategoryEnum.value:type_name -> backend.operation.ForageCategoryParent.Kind
-	36, // 53: backend.operation.IsShowEnum.value:type_name -> backend.operation.IsShow.Kind
-	43, // 54: backend.operation.FormulaTypeEnum.value:type_name -> backend.operation.FormulaType.Kind
-	36, // 55: backend.operation.CategorySyncRequest.is_show:type_name -> backend.operation.IsShow.Kind
-	36, // 56: backend.operation.CategorySyncRequest.is_delete:type_name -> backend.operation.IsShow.Kind
+	41, // 48: backend.operation.ForageSourceEnum.value:type_name -> backend.operation.ForageSource.Kind
+	42, // 49: backend.operation.ForagePlanTypeEnum.value:type_name -> backend.operation.ForagePlanType.Kind
+	43, // 50: backend.operation.JumpDelaTypeEnum.value:type_name -> backend.operation.JumpDelaType.Kind
+	39, // 51: backend.operation.CattleParentCategoryEnum.value:type_name -> backend.operation.CattleCategoryParent.Kind
+	40, // 52: backend.operation.ForageParentCategoryEnum.value:type_name -> backend.operation.ForageCategoryParent.Kind
+	37, // 53: backend.operation.IsShowEnum.value:type_name -> backend.operation.IsShow.Kind
+	44, // 54: backend.operation.FormulaTypeEnum.value:type_name -> backend.operation.FormulaType.Kind
+	37, // 55: backend.operation.CategorySyncRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	37, // 56: backend.operation.CategorySyncRequest.is_delete:type_name -> backend.operation.IsShow.Kind
 	57, // [57:57] is the sub-list for method output_type
 	57, // [57:57] is the sub-list for method input_type
 	57, // [57:57] is the sub-list for extension type_name
@@ -3808,6 +3860,18 @@ func file_backend_operation_pasture_proto_init() {
 				return nil
 			}
 		}
+		file_backend_operation_pasture_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FeedFormulaSyncRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -3815,7 +3879,7 @@ func file_backend_operation_pasture_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_backend_operation_pasture_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   36,
+			NumMessages:   37,
 			NumExtensions: 0,
 			NumServices:   0,
 		},