customer

package
v0.0.0-...-744bbcf Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Customer

type Customer struct {
	eel.EntityBase
	Id int

	UserId  int
	CorpId  int
	Unionid string
	Code    string

	//基本信息
	Name   string
	Avatar string
	Sex    string

	//其他信息
	Source string

	// 消费记录
	ConsumptionRecord *consumptionRecord
}

func NewCustomerForCorp

func NewCustomerForCorp(ctx context.Context, userIface business.IUser, corp business.ICorp) (*Customer, error)

func NewCustomerFromModel

func NewCustomerFromModel(ctx context.Context, model *m_customer.Customer) *Customer

type CustomerRepository

type CustomerRepository struct {
	eel.ServiceBase
}

func NewCustomerRepository

func NewCustomerRepository(ctx context.Context) *CustomerRepository

func (*CustomerRepository) GetCustomerByIdInCorp

func (this *CustomerRepository) GetCustomerByIdInCorp(corp business.ICorp, customerId int) *Customer

func (*CustomerRepository) GetCustomerByUserIdInCorp

func (this *CustomerRepository) GetCustomerByUserIdInCorp(corp business.ICorp, user business.IUser) *Customer

func (*CustomerRepository) GetCustomers

func (this *CustomerRepository) GetCustomers(filters eel.Map, orderExprs ...string) []*Customer

func (*CustomerRepository) GetPagedCustomers

func (this *CustomerRepository) GetPagedCustomers(filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*Customer, eel.INextPageInfo)

func (*CustomerRepository) GetPagedCustomersForCorp

func (this *CustomerRepository) GetPagedCustomersForCorp(corp business.ICorp, filters eel.Map, page *eel.PageInfo) ([]*Customer, eel.INextPageInfo)

type EncodeCustomerService

type EncodeCustomerService struct {
	eel.ServiceBase
}

func NewEncodeCustomerService

func NewEncodeCustomerService(ctx context.Context) *EncodeCustomerService

func (*EncodeCustomerService) Encode

func (this *EncodeCustomerService) Encode(customer *Customer) *RCustomer

func (*EncodeCustomerService) EncodeMany

func (this *EncodeCustomerService) EncodeMany(customers []*Customer) []*RCustomer

type FillCustomerService

type FillCustomerService struct {
	eel.ServiceBase
}

func NewFillCustomerService

func NewFillCustomerService(ctx context.Context) *FillCustomerService

func (*FillCustomerService) Fill

func (this *FillCustomerService) Fill(customers []*Customer, option eel.FillOption)

func (*FillCustomerService) FillOne

func (this *FillCustomerService) FillOne(customer *Customer, option eel.FillOption)

type RCustomer

type RCustomer struct {
	Id      int    `json:"id"`
	UserId  int    `json:"user_id"`
	Unionid string `json:"unionid"`
	Code    string `json:"code"`

	// 客户信息
	Sex    string `json:"sex"`
	Name   string `json:"name"`
	Avatar string `json:"avatar"`
	Source string `json:"source"`

	// 消费记录
	ConsumeCount      int    `json:"consume_count"`
	ConsumeMoney      int    `json:"consume_money"`
	LatestConsumeTime string `json:"latest_consume_time"`
}

Jump to

Keyboard shortcuts

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