Documentation ¶
Index ¶
- Variables
- func AddGroup(k string, v string)
- type Level
- func (f *Level) Add() (pk interface{}, err error)
- func (f *Level) CanAutoLevelUpByCustomerID(customerID uint64) (*dbschema.OfficialCustomerLevel, error)
- func (f *Level) CanAutoLevelUpByIntegral(integral float64) (*dbschema.OfficialCustomerLevel, error)
- func (f *Level) Edit(mw func(db.Result) db.Result, args ...interface{}) error
- func (f *Level) Exists(name string) error
- func (f *Level) ExistsOther(name string, id uint) error
- func (f *Level) GreaterOrEqualThan(levelId uint, targetLevelId uint) (bool, error)
- func (f *Level) LessThan(levelId uint, targetLevelId uint) (bool, error)
- func (f *Level) ListByCustomer(customer *dbschema.OfficialCustomer) ([]*dbschema.OfficialCustomerLevel, error)
- func (f *Level) ListLevelGroup() ([]*LevelGroup, error)
- func (f *Level) Than(levelId uint, targetLevelId uint, ...) (bool, error)
- type LevelGroup
- type Relation
Constants ¶
This section is empty.
Variables ¶
View Source
var GroupList = []echo.KV{ echo.KV{K: `base`, V: `基础组`}, }
GroupList base-基础组,其它名称为扩展组。客户只能有一个基础组等级,可以有多个扩展组等级
Functions ¶
Types ¶
type Level ¶
type Level struct {
*dbschema.OfficialCustomerLevel
}
func (*Level) CanAutoLevelUpByCustomerID ¶
func (f *Level) CanAutoLevelUpByCustomerID(customerID uint64) (*dbschema.OfficialCustomerLevel, error)
func (*Level) CanAutoLevelUpByIntegral ¶
func (f *Level) CanAutoLevelUpByIntegral(integral float64) (*dbschema.OfficialCustomerLevel, error)
func (*Level) GreaterOrEqualThan ¶
func (*Level) ListByCustomer ¶
func (f *Level) ListByCustomer(customer *dbschema.OfficialCustomer) ([]*dbschema.OfficialCustomerLevel, error)
func (*Level) ListLevelGroup ¶
func (f *Level) ListLevelGroup() ([]*LevelGroup, error)
type LevelGroup ¶
type LevelGroup struct { Group string Title string List []*dbschema.OfficialCustomerLevel }
type Relation ¶
type Relation struct {
*dbschema.OfficialCustomerLevelRelation
}
func NewRelation ¶
func (*Relation) ListByCustomerID ¶
func (f *Relation) ListByCustomerID(customerID uint64) ([]*dbschema.OfficialCustomerLevelRelation, error)
Click to show internal directories.
Click to hide internal directories.