Documentation
¶
Index ¶
- Constants
- type DefaultPostage
- type EncodePostageConfigService
- type FillPostageConfigService
- type FreePostage
- type FreePostageConfig
- type PostageConfig
- type PostageConfigFactory
- type PostageConfigRepository
- func (this *PostageConfigRepository) GetActivePostageConfigInCorp(corp business.ICorp) *PostageConfig
- func (this *PostageConfigRepository) GetAllPostageConfigsForCorp(corp business.ICorp, filters eel.Map) []*PostageConfig
- func (this *PostageConfigRepository) GetEnabledPostageConfigsForCorp(corp business.ICorp, page *eel.PageInfo, filters eel.Map) ([]*PostageConfig, eel.INextPageInfo)
- func (this *PostageConfigRepository) GetPagedPostageConfigs(filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*PostageConfig, eel.INextPageInfo)
- func (this *PostageConfigRepository) GetPostageConfig(id int) *PostageConfig
- func (this *PostageConfigRepository) GetPostageConfigInCorp(corp business.ICorp, id int) *PostageConfig
- func (this *PostageConfigRepository) GetPostageConfigs(filters eel.Map, orderExprs ...string) []*PostageConfig
- func (this *PostageConfigRepository) GetUsedPostageConfigForCorp(corp business.ICorp) *PostageConfig
- type PostageConfigService
- type RDefaultPostageConfig
- type RFreePostageConfig
- type RPostageConfig
- type RProvince
- type RSpecialAreaPostageConfig
- type SpecialAreaPostage
- type SpecialAreaPostageConfig
Constants ¶
View Source
const DISPLAY_INDEX_ORDER_ASC = 1
View Source
const DISPLAY_INDEX_ORDER_DESC = 2
View Source
const STICK_BOUNDARY = 10000000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultPostage ¶
type EncodePostageConfigService ¶
type EncodePostageConfigService struct { eel.ServiceBase sync.RWMutex // contains filtered or unexported fields }
func NewEncodePostageConfigService ¶
func NewEncodePostageConfigService(ctx context.Context) *EncodePostageConfigService
func (*EncodePostageConfigService) Encode ¶
func (this *EncodePostageConfigService) Encode(postageConfig *PostageConfig) *RPostageConfig
Encode 对单个实体对象进行编码
func (*EncodePostageConfigService) EncodeMany ¶
func (this *EncodePostageConfigService) EncodeMany(postageConfigs []*PostageConfig) []*RPostageConfig
EncodeMany 对实体对象进行批量编码
type FillPostageConfigService ¶
type FillPostageConfigService struct {
eel.ServiceBase
}
func NewFillPostageConfigService ¶
func NewFillPostageConfigService(ctx context.Context) *FillPostageConfigService
func (*FillPostageConfigService) Fill ¶
func (this *FillPostageConfigService) Fill(postageConfigs []*PostageConfig, option eel.FillOption)
func (*FillPostageConfigService) FillOne ¶
func (this *FillPostageConfigService) FillOne(postageConfig *PostageConfig, option eel.FillOption)
type FreePostage ¶
type FreePostageConfig ¶
type FreePostageConfig struct { eel.EntityBase Id int CorpId int Destination string Condition string ConditionValue string CreatedAt time.Time }
func NewFreePostageConfigFromModel ¶
func NewFreePostageConfigFromModel(ctx context.Context, model *m_mall.FreePostageConfig) *FreePostageConfig
根据model构建对象
type PostageConfig ¶
type PostageConfig struct { eel.EntityBase Id int CorpId int Name string FirstWeight float64 FirstWeightPrice float64 AddedWeight float64 AddedWeightPrice float64 IsUsed bool IsSystemLevelConfig bool IsEnableSpecialConfig bool IsEnableFreeConfig bool IsEnabled bool IsDeleted bool CreatedAt time.Time //foreign key SpecialAreaPostageConfigId int //refer to special_area_postage_config SpecialAreaPostageConfigs []*SpecialAreaPostageConfig FreePostageConfigId int //refer to free_postage_config FreePostageConfigs []*FreePostageConfig }
func NewPostageConfigFromModel ¶
func NewPostageConfigFromModel(ctx context.Context, model *m_mall.PostageConfig) *PostageConfig
根据model构建对象
func (*PostageConfig) Delete ¶
func (this *PostageConfig) Delete() error
func (*PostageConfig) Disable ¶
func (this *PostageConfig) Disable()
func (*PostageConfig) Enable ¶
func (this *PostageConfig) Enable()
func (*PostageConfig) SetUsed ¶
func (this *PostageConfig) SetUsed() error
func (*PostageConfig) UpdateDisplayIndex ¶
func (this *PostageConfig) UpdateDisplayIndex(action string) error
type PostageConfigFactory ¶
type PostageConfigFactory struct {
eel.ServiceBase
}
func NewPostageConfigFactory ¶
func NewPostageConfigFactory(ctx context.Context) *PostageConfigFactory
func (*PostageConfigFactory) CreatePostageConfigForCorp ¶
func (*PostageConfigFactory) MakeSureDefaultPostageConfigExits ¶
func (this *PostageConfigFactory) MakeSureDefaultPostageConfigExits(corp business.ICorp)
type PostageConfigRepository ¶
type PostageConfigRepository struct {
eel.RepositoryBase
}
func NewPostageConfigRepository ¶
func NewPostageConfigRepository(ctx context.Context) *PostageConfigRepository
func (*PostageConfigRepository) GetActivePostageConfigInCorp ¶
func (this *PostageConfigRepository) GetActivePostageConfigInCorp(corp business.ICorp) *PostageConfig
GetActivePostageConfigInCorp 获得当前被选中的运费配置
func (*PostageConfigRepository) GetAllPostageConfigsForCorp ¶
func (this *PostageConfigRepository) GetAllPostageConfigsForCorp(corp business.ICorp, filters eel.Map) []*PostageConfig
GetAllPostageConfigsForCorp 获得所有PostageConfig对象集合
func (*PostageConfigRepository) GetEnabledPostageConfigsForCorp ¶
func (this *PostageConfigRepository) GetEnabledPostageConfigsForCorp(corp business.ICorp, page *eel.PageInfo, filters eel.Map) ([]*PostageConfig, eel.INextPageInfo)
GetEnabledPostageConfigsForCorp 获得启用的PostageConfig对象集合
func (*PostageConfigRepository) GetPagedPostageConfigs ¶
func (this *PostageConfigRepository) GetPagedPostageConfigs(filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*PostageConfig, eel.INextPageInfo)
func (*PostageConfigRepository) GetPostageConfig ¶
func (this *PostageConfigRepository) GetPostageConfig(id int) *PostageConfig
GetPostageConfig 根据id和corp获得PostageConfig对象
func (*PostageConfigRepository) GetPostageConfigInCorp ¶
func (this *PostageConfigRepository) GetPostageConfigInCorp(corp business.ICorp, id int) *PostageConfig
GetPostageConfigInCorp 根据id和corp获得PostageConfig对象
func (*PostageConfigRepository) GetPostageConfigs ¶
func (this *PostageConfigRepository) GetPostageConfigs(filters eel.Map, orderExprs ...string) []*PostageConfig
func (*PostageConfigRepository) GetUsedPostageConfigForCorp ¶
func (this *PostageConfigRepository) GetUsedPostageConfigForCorp(corp business.ICorp) *PostageConfig
GetPostageConfig 根据id和corp获得PostageConfig对象
type PostageConfigService ¶
type PostageConfigService struct {
eel.ServiceBase
}
func NewPostageConfigService ¶
func NewPostageConfigService(ctx context.Context) *PostageConfigService
func (*PostageConfigService) SetDefaultPostageConfigForCorp ¶
func (this *PostageConfigService) SetDefaultPostageConfigForCorp(corp business.ICorp, id int) error
func (*PostageConfigService) UpdatePostageConfigForCorp ¶
type RDefaultPostageConfig ¶
type RFreePostageConfig ¶
type RPostageConfig ¶
type RPostageConfig struct { Id int `json:"id"` CorpId int `json:"corp_id"` Name string `json:"name"` IsUsed bool `json:"is_used"` IsSystemLevelConfig bool `json:"is_system_level_config"` IsEnableSpecialConfig bool `json:"is_enable_special_config"` IsEnableFreeConfig bool `json:"is_enable_free_config"` DefaultPostageConfig *RDefaultPostageConfig `json:"default_config"` SpecialAreaPostageConfigs []*RSpecialAreaPostageConfig `json:"special_configs"` FreePostageConfigs []*RFreePostageConfig `json:"free_configs"` IsEnabled bool `json:"is_enabled"` IsDeleted bool `json:"is_deleted"` CreatedAt string `json:"created_at"` }
type RSpecialAreaPostageConfig ¶
type RSpecialAreaPostageConfig struct { FirstWeight float64 `json:"first_weight"` FirstWeightPrice float64 `json:"first_weight_price"` AddedWeight float64 `json:"added_weight"` AddedWeightPrice float64 `json:"added_weight_price"` Destination string `json:"destination"` DestinationProvinces []*RProvince `json:"destination_provinces"` }
type SpecialAreaPostage ¶
type SpecialAreaPostageConfig ¶
type SpecialAreaPostageConfig struct { eel.EntityBase Id int CorpId int FirstWeight float64 FirstWeightPrice float64 AddedWeight float64 AddedWeightPrice float64 Destination string CreatedAt time.Time }
func NewSpecialAreaPostageConfigFromModel ¶
func NewSpecialAreaPostageConfigFromModel(ctx context.Context, model *m_mall.SpecialAreaPostageConfig) *SpecialAreaPostageConfig
根据model构建对象
Source Files
¶
Click to show internal directories.
Click to hide internal directories.