|
@@ -13,9 +13,9 @@ import (
|
|
|
|
|
|
func (s *StoreEntry) BarnTypeOptions(ctx context.Context) (*pasturePb.ConfigOptionsListResponse, error) {
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: s.BarnTypeEnumList(),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: s.BarnTypeEnumList(),
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
@@ -31,9 +31,9 @@ func (s *StoreEntry) BarnListOptions(ctx context.Context, penType int, isAll str
|
|
|
}
|
|
|
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: model.PenSlice(penList).ToPB2(s.BarnTypeEnumList(), isAll),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: model.PenSlice(penList).ToPB2(s.BarnTypeEnumList(), isAll),
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
@@ -53,9 +53,9 @@ func (s *StoreEntry) DiseaseTypeOptions(ctx context.Context, isChildren string)
|
|
|
}
|
|
|
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: model.ConfigDiseaseTypeSlice(diseaseTypeList).ToPB2(diseaseList),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: model.ConfigDiseaseTypeSlice(diseaseTypeList).ToPB2(diseaseList),
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
@@ -68,9 +68,9 @@ func (s *StoreEntry) DiseaseOptions(ctx context.Context) (*pasturePb.ConfigOptio
|
|
|
return nil, xerr.WithStack(err)
|
|
|
}
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: model.DiseaseSlice(diseaseList).ToPB2(),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: model.DiseaseSlice(diseaseList).ToPB2(),
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
@@ -83,48 +83,48 @@ func (s *StoreEntry) PrescriptionOptions(ctx context.Context) (*pasturePb.Config
|
|
|
return nil, xerr.WithStack(err)
|
|
|
}
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: model.PrescriptionSlice(prescriptionList).ToPB2(),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: model.PrescriptionSlice(prescriptionList).ToPB2(),
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
|
func (s *StoreEntry) BreedStatusOptions(ctx context.Context) (*pasturePb.ConfigOptionsListResponse, error) {
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: s.BreedStatusEnumList(),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: s.BreedStatusEnumList(),
|
|
|
}, nil
|
|
|
}
|
|
|
func (s *StoreEntry) CowKindOptions(ctx context.Context) (*pasturePb.ConfigOptionsListResponse, error) {
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: s.CowKindEnumList(),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: s.CowKindEnumList(),
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
|
func (s *StoreEntry) CowSourceOptions(ctx context.Context) (*pasturePb.ConfigOptionsListResponse, error) {
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: s.CowSourceEnumList(),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: s.CowSourceEnumList(),
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
|
func (s *StoreEntry) CowTypeOptions(ctx context.Context, optionName, isAll string) (*pasturePb.ConfigOptionsListResponse, error) {
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: s.CowTypeEnumList(optionName, isAll),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: s.CowTypeEnumList(optionName, isAll),
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
|
func (s *StoreEntry) CowTransferPenReasonOptions(ctx context.Context) (*pasturePb.ConfigOptionsListResponse, error) {
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: s.TransferPenEnumList(""),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: s.TransferPenEnumList(""),
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
@@ -147,9 +147,9 @@ func (s *StoreEntry) SystemUserOptions(ctx context.Context, depId int) (*pasture
|
|
|
return nil, xerr.WithStack(err)
|
|
|
}
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: model.SystemUserSlice(systemUserList).ToPB2(),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: model.SystemUserSlice(systemUserList).ToPB2(),
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
@@ -160,9 +160,9 @@ func (s *StoreEntry) BullOptions(ctx context.Context) (*pasturePb.BullOptionsLis
|
|
|
}
|
|
|
|
|
|
return &pasturePb.BullOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: s.BullNumberEnumList("", currentUser),
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: s.BullNumberEnumList("", currentUser),
|
|
|
}, nil
|
|
|
}
|
|
|
|
|
@@ -224,8 +224,8 @@ func (s *StoreEntry) SystemBaseConfigOptions(ctx context.Context, optionsName, i
|
|
|
}
|
|
|
|
|
|
return &pasturePb.ConfigOptionsListResponse{
|
|
|
- Code: http.StatusOK,
|
|
|
- Message: "ok",
|
|
|
- Data: configOptions,
|
|
|
+ Code: http.StatusOK,
|
|
|
+ Msg: "ok",
|
|
|
+ Data: configOptions,
|
|
|
}, nil
|
|
|
}
|