Documentation ¶
Index ¶
- type EncodePointProductService
- type FillPointProductService
- type PointProduct
- type PointProductRepository
- func (this *PointProductRepository) GetAllPointProductsForCorp(corp business.ICorp, page *eel.PageInfo, filters eel.Map) ([]*PointProduct, eel.INextPageInfo)
- func (this *PointProductRepository) GetEnabledPointProductsForCorp(corp business.ICorp, page *eel.PageInfo, filters eel.Map) ([]*PointProduct, eel.INextPageInfo)
- func (this *PointProductRepository) GetPagedPointProducts(filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*PointProduct, eel.INextPageInfo)
- func (this *PointProductRepository) GetPointProduct(id int) *PointProduct
- func (this *PointProductRepository) GetPointProductByProductIds(ids []int) []*PointProduct
- func (this *PointProductRepository) GetPointProductInCorp(corp business.ICorp, id int) *PointProduct
- func (this *PointProductRepository) GetPointProducts(filters eel.Map, orderExprs ...string) []*PointProduct
- type RPointProduct
- type RProduct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncodePointProductService ¶
type EncodePointProductService struct {
eel.ServiceBase
}
func NewEncodePointProductService ¶
func NewEncodePointProductService(ctx context.Context) *EncodePointProductService
func (*EncodePointProductService) Encode ¶
func (this *EncodePointProductService) Encode(pointProduct *PointProduct) *RPointProduct
Encode 对单个实体对象进行编码
func (*EncodePointProductService) EncodeMany ¶
func (this *EncodePointProductService) EncodeMany(pointProducts []*PointProduct) []*RPointProduct
EncodeMany 对实体对象进行批量编码
type FillPointProductService ¶
type FillPointProductService struct {
eel.ServiceBase
}
func NewFillPointProductService ¶
func NewFillPointProductService(ctx context.Context) *FillPointProductService
func (*FillPointProductService) Fill ¶
func (this *FillPointProductService) Fill(pointProducts []*PointProduct, option eel.FillOption)
type PointProduct ¶
type PointProduct struct { eel.EntityBase Id int CorpId int PointPrice int MoneyPrice int IsEnabled bool BuyLimit int ProductId int Product *product.Product StartTime time.Time EndTime time.Time CreatedAt time.Time }
func NewPointProduct ¶
func NewPointProductFromModel ¶
func NewPointProductFromModel(ctx context.Context, model *m_point.PointProduct) *PointProduct
根据model构建对象
func (*PointProduct) Delete ¶
func (this *PointProduct) Delete() error
func (*PointProduct) Disable ¶
func (this *PointProduct) Disable()
func (*PointProduct) Enable ¶
func (this *PointProduct) Enable()
type PointProductRepository ¶
type PointProductRepository struct {
eel.RepositoryBase
}
func NewPointProductRepository ¶
func NewPointProductRepository(ctx context.Context) *PointProductRepository
func (*PointProductRepository) GetAllPointProductsForCorp ¶
func (this *PointProductRepository) GetAllPointProductsForCorp(corp business.ICorp, page *eel.PageInfo, filters eel.Map) ([]*PointProduct, eel.INextPageInfo)
GetAllPointProductsForCorp 获得所有PointProduct对象集合
func (*PointProductRepository) GetEnabledPointProductsForCorp ¶
func (this *PointProductRepository) GetEnabledPointProductsForCorp(corp business.ICorp, page *eel.PageInfo, filters eel.Map) ([]*PointProduct, eel.INextPageInfo)
GetEnabledPointProductsForCorp 获得启用的PointProduct对象集合
func (*PointProductRepository) GetPagedPointProducts ¶
func (this *PointProductRepository) GetPagedPointProducts(filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*PointProduct, eel.INextPageInfo)
func (*PointProductRepository) GetPointProduct ¶
func (this *PointProductRepository) GetPointProduct(id int) *PointProduct
GetPointProduct 根据id和corp获得PointProduct对象
func (*PointProductRepository) GetPointProductByProductIds ¶
func (this *PointProductRepository) GetPointProductByProductIds(ids []int) []*PointProduct
func (*PointProductRepository) GetPointProductInCorp ¶
func (this *PointProductRepository) GetPointProductInCorp(corp business.ICorp, id int) *PointProduct
GetPointProductInCorp 根据id和corp获得PointProduct对象
func (*PointProductRepository) GetPointProducts ¶
func (this *PointProductRepository) GetPointProducts(filters eel.Map, orderExprs ...string) []*PointProduct
type RPointProduct ¶
type RPointProduct struct { Id int `json:"id"` CorpId int `json:"corp_id"` ProductId int `json:"product_id"` PointPrice int `json:"point_price"` MoneyPrice int `json:"money_price"` IsEnabled bool `json:"is_enabled"` BuyLimit int `json:"buy_limit"` Product *RProduct `json:"product"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` CreatedAt string `json:"created_at"` }
Click to show internal directories.
Click to hide internal directories.