ship_info

package
v0.0.0-...-2cd4ea5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncodeShipInfoService

type EncodeShipInfoService struct {
	eel.ServiceBase
}

func NewEncodeShipInfoService

func NewEncodeShipInfoService(ctx context.Context) *EncodeShipInfoService

func (*EncodeShipInfoService) Encode

func (this *EncodeShipInfoService) Encode(shipInfo *ShipInfo) *RShipInfo

Encode 对单个实体对象进行编码

func (*EncodeShipInfoService) EncodeMany

func (this *EncodeShipInfoService) EncodeMany(shipInfos []*ShipInfo) []*RShipInfo

EncodeMany 对实体对象进行批量编码

type FillShipInfoService

type FillShipInfoService struct {
	eel.ServiceBase
}

func NewFillShipInfoService

func NewFillShipInfoService(ctx context.Context) *FillShipInfoService

func (*FillShipInfoService) Fill

func (this *FillShipInfoService) Fill(shipInfos []*ShipInfo, option eel.FillOption)

func (*FillShipInfoService) FillOne

func (this *FillShipInfoService) FillOne(shipInfo *ShipInfo, option eel.FillOption)

type RShipInfo

type RShipInfo struct {
	Id        int    `json:"id"`
	UserId    int    `json:"user_id"`
	Name      string `json:"name"`
	Phone     string `json:"phone"`
	Area      string `json:"area"`
	AreaCode  string `json:"area_code"`
	AreaJson  string `json:"area_json"`
	Address   string `json:"address"`
	IsDefault bool   `json:"is_default"`
	CreatedAt string `json:"created_at"`
}

type ShipInfo

type ShipInfo struct {
	eel.EntityBase
	Id        int
	UserId    int
	Name      string
	Phone     string
	Area      string
	AreaCode  string
	AreaJson  string
	Address   string
	IsDefault bool
	IsEnabled bool
	IsDeleted bool
	CreatedAt time.Time
}

func NewShipInfo

func NewShipInfo(
	ctx context.Context,
	user business.IUser,
	name string,
	phone string,
	areaCode string,
	address string,
) *ShipInfo

工厂方法

func NewShipInfoFromModel

func NewShipInfoFromModel(ctx context.Context, model *m_mall.ShipInfo) *ShipInfo

根据model构建对象

func (*ShipInfo) Delete

func (this *ShipInfo) Delete() error

func (*ShipInfo) Disable

func (this *ShipInfo) Disable()

func (*ShipInfo) Enable

func (this *ShipInfo) Enable()

func (*ShipInfo) SetDefault

func (this *ShipInfo) SetDefault(user business.IUser) error

func (*ShipInfo) Update

func (this *ShipInfo) Update(
	name string,
	phone string,
	areaCode string,
	address string,
) error

Update 更新对象

type ShipInfoRepository

type ShipInfoRepository struct {
	eel.RepositoryBase
}

func NewShipInfoRepository

func NewShipInfoRepository(ctx context.Context) *ShipInfoRepository

func (*ShipInfoRepository) GetAllShipInfosForUser

func (this *ShipInfoRepository) GetAllShipInfosForUser(user business.IUser, page *eel.PageInfo, filters eel.Map) ([]*ShipInfo, eel.INextPageInfo)

GetAllShipInfosForUser 获得所有ShipInfo对象集合

func (*ShipInfoRepository) GetDefaultShipInfoForUser

func (this *ShipInfoRepository) GetDefaultShipInfoForUser(user business.IUser) *ShipInfo

GetDefaultShipInfoInCorp 获得user的默认收货地址

func (*ShipInfoRepository) GetEnabledShipInfosForUser

func (this *ShipInfoRepository) GetEnabledShipInfosForUser(user business.IUser, page *eel.PageInfo, filters eel.Map) ([]*ShipInfo, eel.INextPageInfo)

GetEnabledShipInfosForUser 获得启用的ShipInfo对象集合

func (*ShipInfoRepository) GetPagedShipInfos

func (this *ShipInfoRepository) GetPagedShipInfos(filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*ShipInfo, eel.INextPageInfo)

func (*ShipInfoRepository) GetShipInfo

func (this *ShipInfoRepository) GetShipInfo(id int) *ShipInfo

GetShipInfo 根据id和corp获得ShipInfo对象

func (*ShipInfoRepository) GetShipInfoForUser

func (this *ShipInfoRepository) GetShipInfoForUser(user business.IUser, id int) *ShipInfo

GetShipInfoInCorp 根据id和user获得ShipInfo对象

func (*ShipInfoRepository) GetShipInfos

func (this *ShipInfoRepository) GetShipInfos(filters eel.Map, orderExprs ...string) []*ShipInfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL