order

package
Version: 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: 28 Imported by: 0

Documentation

Index

Constants

View Source
const ORDER_OPERATION_CANCEL = "cancel_order"
View Source
const ORDER_OPERATION_CONFIRM = "confirm_order"
View Source
const ORDER_OPERATION_CREATE = "create_order"
View Source
const ORDER_OPERATION_FINISH = "finish_order"
View Source
const ORDER_OPERATION_FINISH_BY_SYSTEM = "finish_order_by_system"
View Source
const ORDER_OPERATION_FINISH_REFUND = "finish_refund"
View Source
const ORDER_OPERATION_PAY = "pay_order"
View Source
const ORDER_OPERATION_REFUND = "refund_order"
View Source
const ORDER_OPERATION_REJECT_REFUND = "reject_refund"
View Source
const ORDER_OPERATION_REQUEST_PLATFORM_REFUND = "request_platform_refund"
View Source
const ORDER_OPERATION_SHIP = "ship_order"
View Source
const ORDER_OPERATION_START_PAY = "start_pay_order"
View Source
const ORDER_OPERATION_UPDATE_LOGISTICS_INFO = "update_order_logistics_info"
View Source
const STATS_RANGE_MONTH = 30
View Source
const STATS_RANGE_WEEK = 7

Variables

View Source
var OPERATION2STATUSPAIR = map[string]interface{}{
	ORDER_OPERATION_CREATE: map[string]interface{}{
		"from": -1,
		"to":   m_order.ORDER_STATUS_WAIT_PAY,
	},
	ORDER_OPERATION_START_PAY: map[string]interface{}{
		"from": m_order.ORDER_STATUS_WAIT_PAY,
		"to":   m_order.ORDER_STATUS_PAYING,
	},
	ORDER_OPERATION_PAY: map[string]interface{}{
		"from": m_order.ORDER_STATUS_PAYING,
		"to":   m_order.ORDER_STATUS_WAIT_SUPPLIER_CONFIRM,
	},
	ORDER_OPERATION_CONFIRM: map[string]interface{}{
		"from": m_order.ORDER_STATUS_WAIT_SUPPLIER_CONFIRM,
		"to":   m_order.ORDER_STATUS_PAYED_NOT_SHIP,
	},
	ORDER_OPERATION_SHIP: map[string]interface{}{
		"from": m_order.ORDER_STATUS_PAYED_NOT_SHIP,
		"to":   m_order.ORDER_STATUS_PAYED_SHIPED,
	},
	ORDER_OPERATION_FINISH: map[string]interface{}{
		"from": m_order.ORDER_STATUS_PAYED_SHIPED,
		"to":   m_order.ORDER_STATUS_SUCCESSED,
	},
	ORDER_OPERATION_FINISH_BY_SYSTEM: map[string]interface{}{
		"from": m_order.ORDER_STATUS_PAYED_SHIPED,
		"to":   m_order.ORDER_STATUS_SUCCESSED,
	},
	ORDER_OPERATION_CANCEL: map[string]interface{}{
		"from": m_order.ORDER_STATUS_WAIT_PAY,
		"to":   m_order.ORDER_STATUS_CANCEL,
	},
	ORDER_OPERATION_REFUND: map[string]interface{}{
		"from": nil,
		"to":   m_order.ORDER_STATUS_REFUNDING,
	},
	ORDER_OPERATION_REQUEST_PLATFORM_REFUND: map[string]interface{}{
		"from": m_order.ORDER_STATUS_REFUNDING,
		"to":   m_order.ORDER_STATUS_PLATFORM_REFUNDING,
	},
	ORDER_OPERATION_REJECT_REFUND: map[string]interface{}{
		"from": m_order.ORDER_STATUS_REFUNDING,
		"to":   nil,
	},
	ORDER_OPERATION_FINISH_REFUND: map[string]interface{}{
		"from": m_order.ORDER_STATUS_PLATFORM_REFUNDING,
		"to":   m_order.ORDER_STATUS_REFUNDED,
	},
}

Functions

This section is empty.

Types

type CalculateOrderMoneyService

type CalculateOrderMoneyService struct {
	eel.ServiceBase
}

func NewCalculateOrderMoneyService

func NewCalculateOrderMoneyService(ctx context.Context) *CalculateOrderMoneyService

func (*CalculateOrderMoneyService) Calculate

func (this *CalculateOrderMoneyService) Calculate(resources []business.IResource, purchaseInfo *PurchaseInfo, newOrder *NewOrder) *orderMoneyInfo

type CalculateOrderPostageService

type CalculateOrderPostageService struct {
	eel.ServiceBase
}

CalculateOrderPostageService 针对同一个供货商的商品集合,计算器运费

func NewCalculateOrderPostageService

func NewCalculateOrderPostageService(ctx context.Context) *CalculateOrderPostageService

func (*CalculateOrderPostageService) Calculate

func (this *CalculateOrderPostageService) Calculate(productResources []business.IResource, purchaseInfo *PurchaseInfo) int

type ClearanceService

type ClearanceService struct {
	eel.ServiceBase
}

func NewClearanceService

func NewClearanceService(ctx context.Context) *ClearanceService

func (*ClearanceService) ClearInvoice

func (this *ClearanceService) ClearInvoice(invoice *Invoice) error

type EncodeInvoiceService

type EncodeInvoiceService struct {
	eel.ServiceBase
}

func NewEncodeInvoiceService

func NewEncodeInvoiceService(ctx context.Context) *EncodeInvoiceService

func (*EncodeInvoiceService) Encode

func (this *EncodeInvoiceService) Encode(invoice *Invoice) *RInvoice

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

func (*EncodeInvoiceService) EncodeMany

func (this *EncodeInvoiceService) EncodeMany(products []*Invoice) []*RInvoice

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

type EncodeLogisticsService

type EncodeLogisticsService struct {
	eel.ServiceBase
}

func NewEncodeOrderLogisticsService

func NewEncodeOrderLogisticsService(ctx context.Context) *EncodeLogisticsService

func (*EncodeLogisticsService) Encode

func (this *EncodeLogisticsService) Encode(logistics *OrderLogistics) *ROrderLogistics

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

type EncodeOrderService

type EncodeOrderService struct {
	eel.ServiceBase
}

func NewEncodeOrderService

func NewEncodeOrderService(ctx context.Context) *EncodeOrderService

func (*EncodeOrderService) Encode

func (this *EncodeOrderService) Encode(order *Order) *ROrder

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

func (*EncodeOrderService) EncodeMany

func (this *EncodeOrderService) EncodeMany(orders []*Order) []*ROrder

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

type EncodeOutlineService

type EncodeOutlineService struct {
	eel.ServiceBase
}

func NewEncodeOutlineService

func NewEncodeOutlineService(ctx context.Context) *EncodeOutlineService

func (*EncodeOutlineService) Encode

func (this *EncodeOutlineService) Encode(outline *OrderOutline) *ROrderOutline

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

type FillOrderService

type FillOrderService struct {
	eel.ServiceBase
}

func NewFillOrderService

func NewFillOrderService(ctx context.Context) *FillOrderService

func (*FillOrderService) Fill

func (this *FillOrderService) Fill(orders []*Order, option map[string]interface{})

func (*FillOrderService) FillInvoiceProducts

func (this *FillOrderService) FillInvoiceProducts(invoice *Invoice)

FillInvoiceProducts 为单个invoice填充商品集合

type FinishedOrderHandler

type FinishedOrderHandler struct {
	eel.ServiceBase
}

func NewFinishedOrderHandler

func NewFinishedOrderHandler(ctx context.Context) *FinishedOrderHandler

func (*FinishedOrderHandler) DoCallback

func (this *FinishedOrderHandler) DoCallback(order *Order)

DoCallback 订单完成后回调

func (*FinishedOrderHandler) DoSettlement

func (this *FinishedOrderHandler) DoSettlement(order *Order)

DoSettlement 订单完成后进行清算

type Invoice

type Invoice struct {
	eel.EntityBase
	Order

	SupplierId      int
	PaymentType     string
	Postage         float64
	PostageStrategy int

	ShipInfo  *ShipInfo //收货信息
	Products  []*OrderProduct
	Logistics *invoiceLogistics //物流信息

	CreatedAt time.Time
	UpdatedAt time.Time
}

func NewInvoiceFromModel

func NewInvoiceFromModel(ctx context.Context, model *m_order.Order) *Invoice

func NewInvoiceFromOrder

func NewInvoiceFromOrder(ctx context.Context, order *Order) *Invoice

func (*Invoice) AppendProduct

func (this *Invoice) AppendProduct(orderProduct *OrderProduct)

func (*Invoice) Cancel

func (this *Invoice) Cancel(reason string)

Cancel 取消出货单

func (*Invoice) Confirm

func (this *Invoice) Confirm()

确认出货单

func (*Invoice) Finish

func (this *Invoice) Finish()

func (*Invoice) FinishRefund

func (this *Invoice) FinishRefund()

FinishRefund 确认退款

func (*Invoice) ForceFinish

func (this *Invoice) ForceFinish()

func (*Invoice) GetOrder

func (this *Invoice) GetOrder() *Order

GetOrder 获取订单

func (*Invoice) GetOriginalOrder

func (this *Invoice) GetOriginalOrder() *Order

func (*Invoice) GetSettlementData

func (this *Invoice) GetSettlementData(corpRelatedUserId int, productName string) map[string]interface{}

GetSettlementData 获取结算规则数据

func (*Invoice) NeedSyncClearance

func (this *Invoice) NeedSyncClearance() bool

NeedSyncClearance 是否需要同步清算

func (*Invoice) Refunding

func (this *Invoice) Refunding(reason string)

Refunding 用户申请操作退款

func (*Invoice) RefundingForPlatform

func (this *Invoice) RefundingForPlatform()

RefundingForPlatform 向平台申请操作退款

func (*Invoice) RejectRefund

func (this *Invoice) RejectRefund(reason string)

RejectRefund 驳回退款申请

func (*Invoice) SetCleared

func (this *Invoice) SetCleared(willPublishEvent bool) error

SetCleared 设置已清算

func (*Invoice) SetLogistics

func (this *Invoice) SetLogistics(logisticsModel *m_order.OrderLogistics)

func (*Invoice) Ship

func (this *Invoice) Ship(shipInfo *b_order_params.LogisticsParams)

出货单发货

func (*Invoice) UpdateLogistics

func (this *Invoice) UpdateLogistics(shipInfo *b_order_params.LogisticsParams)

修改订单物流信息

func (*Invoice) UpdateRemark

func (this *Invoice) UpdateRemark(remark string)

UpdateRemark 修改备注

type InvoiceFinishedService

type InvoiceFinishedService struct {
	eel.ServiceBase
}

func NewInvoiceFinishedService

func NewInvoiceFinishedService(ctx context.Context) *InvoiceFinishedService

func (*InvoiceFinishedService) AfterFinished

func (this *InvoiceFinishedService) AfterFinished(invoice *Invoice)

AfterFinished 订单完成后

func (*InvoiceFinishedService) DoCallback

func (this *InvoiceFinishedService) DoCallback(invoice *Invoice)

DoCallback 同步回调

func (*InvoiceFinishedService) DoClearance

func (this *InvoiceFinishedService) DoClearance(invoice *Invoice)

type NewOrder

type NewOrder struct {
	eel.EntityBase
	Id  int
	Bid string
	// contains filtered or unexported fields
}

func GenerateNewOrder

func GenerateNewOrder(ctx context.Context, purchaseInfo *PurchaseInfo, resourceManager *resource.ResourceManager) *NewOrder

func (*NewOrder) AssignBid

func (this *NewOrder) AssignBid()

func (*NewOrder) GetBid

func (this *NewOrder) GetBid() string

func (*NewOrder) GetDeductableMoney

func (this *NewOrder) GetDeductableMoney() int

func (*NewOrder) GetId

func (this *NewOrder) GetId() int

func (*NewOrder) Save

func (this *NewOrder) Save() (*Order, error)

type OperationData

type OperationData struct {
	Order      interface{}
	Action     string
	FromStatus interface{}
	ToStatus   interface{}
	Data       *eel.Map
}

type Order

type Order struct {
	eel.EntityBase

	Id              int
	OriginalOrderId int
	Bid             string
	Type            string
	CustomType      string
	Status          int

	BizCode   string //业务码
	IsCleared bool   //是否清算

	Money *orderMoneyInfo

	UserId int
	User   *account.User

	CorpId int
	Corp   *account.Corp

	Remark       string //备注
	Message      string //消费者留言
	CancelReason string //取消订单的原因

	IsDeleted bool

	Invoices []*Invoice

	Resources string
	ExtraData string

	PaymentTime time.Time
	PaymentType string
	CreatedAt   time.Time

	// 日志
	OperationLogs []*OrderOperationLog
	StatusLogs    []*OrderStatusLog
}

func NewOrderFromModel

func NewOrderFromModel(ctx context.Context, model *m_order.Order) *Order

func (*Order) AddInvoice

func (this *Order) AddInvoice(invoice *Invoice)

func (*Order) Cancel

func (this *Order) Cancel(reason string)

Cancel 取消订单

func (*Order) Cancellable

func (this *Order) Cancellable() bool

Cancellable 是否可删除

func (*Order) ChangeStatusToNonsense

func (this *Order) ChangeStatusToNonsense()

func (*Order) GetBid

func (this *Order) GetBid() string

func (*Order) GetCallbackResource

func (this *Order) GetCallbackResource() *OrderCallbackResource

func (*Order) GetCorpRelatedUserId

func (this *Order) GetCorpRelatedUserId() int

GetCorpRelatedUserId 获取订单corp的关联user_id

func (*Order) GetDeductableMoney

func (this *Order) GetDeductableMoney() int

func (*Order) GetExtraData

func (this *Order) GetExtraData() map[string]interface{}

func (*Order) GetId

func (this *Order) GetId() int

func (*Order) GetResources

func (this *Order) GetResources() []map[string]interface{}

func (*Order) GetStatusText

func (this *Order) GetStatusText() string

func (*Order) IsCustomOrder

func (this *Order) IsCustomOrder() bool

func (*Order) IsDepositOrder

func (this *Order) IsDepositOrder() bool

IsDepositOrder 是否充值订单

func (*Order) IsFinished

func (this *Order) IsFinished() bool

IsFinished 订单是否已结束

func (*Order) IsInvoice

func (this *Order) IsInvoice() bool

func (*Order) Pay

func (this *Order) Pay(args ...string)

Pay 对订单进行支付 args[0] payment_type 支付通道

func (*Order) Refund

func (this *Order) Refund()

Refund 订单退款

func (*Order) Refundable

func (this *Order) Refundable() bool

Refundable 是否可退款

func (*Order) SetCallbackStatus

func (this *Order) SetCallbackStatus(succeed bool)

SetCallbackStatus 设置回调处理结果

func (*Order) ShouldAutoPay

func (this *Order) ShouldAutoPay() bool

ShouldAutoPay 是否可以自动完成 以下情况可以自动完成: 1. final_money = 0

func (*Order) UpdateFinalMoney

func (this *Order) UpdateFinalMoney(finalMoney int)

type OrderCallbackResource

type OrderCallbackResource struct {
	// contains filtered or unexported fields
}

func NewOrderCallbackResource

func NewOrderCallbackResource(str string) *OrderCallbackResource

func (*OrderCallbackResource) DoRequest

func (this *OrderCallbackResource) DoRequest(resource *rest_client.Resource) error

func (*OrderCallbackResource) SetReqData

func (this *OrderCallbackResource) SetReqData(data eel.Map)

SetReqData 设置请求参数

type OrderFactory

type OrderFactory struct {
	eel.ServiceBase
}

func NewOrderFactory

func NewOrderFactory(ctx context.Context) *OrderFactory

func (*OrderFactory) CreateOrder

func (this *OrderFactory) CreateOrder(purchaseInfo *PurchaseInfo) (*Order, error)

type OrderLogService

type OrderLogService struct {
	eel.ServiceBase
}

func NewOrderLogService

func NewOrderLogService(ctx context.Context) *OrderLogService

func (*OrderLogService) LogOperation

func (this *OrderLogService) LogOperation(operationData *OperationData)

操作记录

type OrderLogistics

type OrderLogistics struct {
	eel.EntityBase

	Id                 int
	OrderBid           string
	EnableLogistics    bool
	ExpressCompanyName string
	ExpressNumber      string
	Shipper            string
	UpdatedAt          time.Time
	CreatedAt          time.Time
}

func NewOrderLogisticsFromModel

func NewOrderLogisticsFromModel(ctx context.Context, dbModel *m_order.OrderLogistics) *OrderLogistics

func (*OrderLogistics) Update

func (this *OrderLogistics) Update(shipInfo *b_order_params.LogisticsParams)

type OrderLogisticsFactory

type OrderLogisticsFactory struct {
	eel.ServiceBase
}

func NewOrderLogisticsFactory

func NewOrderLogisticsFactory(ctx context.Context) *OrderLogisticsFactory

func (*OrderLogisticsFactory) CreateLogistics

func (this *OrderLogisticsFactory) CreateLogistics(shipInfo *b_order_params.LogisticsParams)

type OrderLogisticsRepository

type OrderLogisticsRepository struct {
	eel.ServiceBase
}

func NewOrderLogisticsRepository

func NewOrderLogisticsRepository(ctx context.Context) *OrderLogisticsRepository

func (*OrderLogisticsRepository) GetOrderLogisticsByBid

func (this *OrderLogisticsRepository) GetOrderLogisticsByBid(bid string) *OrderLogistics

type OrderOperationLog

type OrderOperationLog struct {
	eel.EntityBase

	Id        int
	OrderBid  string
	Type      string
	Remark    string
	Action    string
	Operator  string
	CreatedAt time.Time
}

func NewOrderOperationLogFromModel

func NewOrderOperationLogFromModel(ctx context.Context, dbModel *m_order.OrderOperationLog) *OrderOperationLog

type OrderOutline

type OrderOutline struct {
	// contains filtered or unexported fields
}

type OrderPaidService

type OrderPaidService struct {
	eel.ServiceBase
}

func NewOrderPaidService

func NewOrderPaidService(ctx context.Context) *OrderPaidService

func (*OrderPaidService) AfterPaid

func (this *OrderPaidService) AfterPaid(order *Order)

AfterPaid 订单完成支付后

type OrderProduct

type OrderProduct struct {
	eel.EntityBase

	Name           string
	Thumbnail      string
	Sku            string
	SkuDisplayName string
	PurchaseCount  int
	Price          int
	Weight         float64

	OrderId    int
	SupplierId int
	ProductId  int
}

func NewOrderProductFromModel

func NewOrderProductFromModel(ctx context.Context, model *m_order.OrderHasProduct) *OrderProduct

type OrderProductRepository

type OrderProductRepository struct {
	eel.ServiceBase
}

func NewOrderProductRepository

func NewOrderProductRepository(ctx context.Context) *OrderProductRepository

func (*OrderProductRepository) GetOrderProducts

func (this *OrderProductRepository) GetOrderProducts(invoiceIds []int) []*OrderProduct

type OrderRefundedService

type OrderRefundedService struct {
	eel.ServiceBase
}

func NewOrderRefundedService

func NewOrderRefundedService(ctx context.Context) *OrderRefundedService

func (*OrderRefundedService) AfterRefunded

func (this *OrderRefundedService) AfterRefunded(order *Order)

AfterPaid 订单完成支付后

type OrderRepository

type OrderRepository struct {
	eel.ServiceBase
}

func NewOrderRepository

func NewOrderRepository(ctx context.Context) *OrderRepository

func (*OrderRepository) GetInvoiceByBidForCorp

func (this *OrderRepository) GetInvoiceByBidForCorp(corp business.ICorp, bid string) *Invoice

根据出货单的bid获取出货单

func (*OrderRepository) GetInvoiceByBidForUser

func (this *OrderRepository) GetInvoiceByBidForUser(user business.IUser, bid string) *Invoice

根据出货单的bid获取出货单

func (*OrderRepository) GetInvoicesByBidsForCorp

func (this *OrderRepository) GetInvoicesByBidsForCorp(corp business.ICorp, bids []string) []*Invoice

根据出货单的bids获取出货单集合

func (*OrderRepository) GetInvoicesByIds

func (this *OrderRepository) GetInvoicesByIds(ids []int) []*Invoice

GetInvoicesByIds 根据出货单id,获得出货单对象集合

func (*OrderRepository) GetInvoicesByOrderIds

func (this *OrderRepository) GetInvoicesByOrderIds(orderIds []int) []*Invoice

GetInvoicesByOrderIds 根据订单id集合,获取出货单对象集合

func (*OrderRepository) GetInvoicesForOrder

func (this *OrderRepository) GetInvoicesForOrder(orderId int) []*Invoice

func (*OrderRepository) GetOrderByBid

func (this *OrderRepository) GetOrderByBid(bid string) *Order

func (*OrderRepository) GetOrderByBidForCorp

func (this *OrderRepository) GetOrderByBidForCorp(corp business.ICorp, bid string) *Order

根据出货单的bid获取订单

func (*OrderRepository) GetOrderByBidForUser

func (this *OrderRepository) GetOrderByBidForUser(user business.IUser, bid string) *Order

func (*OrderRepository) GetOrderById

func (this *OrderRepository) GetOrderById(id int) *Order

GetOrderById 根据id获得Order对象

func (*OrderRepository) GetOrderCountForCorp

func (this *OrderRepository) GetOrderCountForCorp(corp business.ICorp, status int) int64

GetOrderCountForCorp 获得corp中status指定状态的订单的数量

func (*OrderRepository) GetOrderCountForUser

func (this *OrderRepository) GetOrderCountForUser(user business.IUser, status int) int64

GetOrderCountForUser 获得属于user的status指定状态的订单的数量

func (*OrderRepository) GetOrderOutlineForCorp

func (this *OrderRepository) GetOrderOutlineForCorp(corp business.ICorp) *OrderOutline

func (*OrderRepository) GetOrders

func (this *OrderRepository) GetOrders(filters eel.Map, orderExprs ...string) []*Order

func (*OrderRepository) GetOrdersByBids

func (this *OrderRepository) GetOrdersByBids(bids []string) []*Order

func (*OrderRepository) GetPagedInvoicesForCorp

func (this *OrderRepository) GetPagedInvoicesForCorp(corp business.ICorp, filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*Order, eel.INextPageInfo)

func (*OrderRepository) GetPagedOrders

func (this *OrderRepository) GetPagedOrders(filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*Order, eel.INextPageInfo)

func (*OrderRepository) GetPagedOrdersForCorp

func (this *OrderRepository) GetPagedOrdersForCorp(corp business.ICorp, filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*Order, eel.INextPageInfo)

func (*OrderRepository) GetPagedOrdersForUserInCorp

func (this *OrderRepository) GetPagedOrdersForUserInCorp(user business.IUser, corp business.ICorp, filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*Order, eel.INextPageInfo)

type OrderStatsService

type OrderStatsService struct {
	eel.ServiceBase
}

func NewOrderStatsService

func NewOrderStatsService(ctx context.Context) *OrderStatsService

func (*OrderStatsService) GetIncrementCountTrend

func (this *OrderStatsService) GetIncrementCountTrend(corp business.ICorp, rangeType int) eel.Map

GetIncrementCountTrend 订单数量增量趋势

func (*OrderStatsService) GetIncrementMoneyTrend

func (this *OrderStatsService) GetIncrementMoneyTrend(corp business.ICorp, rangeType int) eel.Map

GetIncrementMoneyTrend 订单金额增量趋势

type OrderStatusLog

type OrderStatusLog struct {
	eel.EntityBase

	Id         int
	OrderBid   string
	FromStatus string
	ToStatus   string
	Remark     string
	Operator   string
	CreatedAt  time.Time
}

func NewOrderStatusLogFromModel

func NewOrderStatusLogFromModel(ctx context.Context, dbModel *m_order.OrderStatusLog) *OrderStatusLog

type ParsePurchaseInfoService

type ParsePurchaseInfoService struct {
	eel.ServiceBase
}

func NewParsePurchaseInfoService

func NewParsePurchaseInfoService(ctx context.Context) *ParsePurchaseInfoService

func (*ParsePurchaseInfoService) Parse

func (this *ParsePurchaseInfoService) Parse()

type PurchaseInfo

type PurchaseInfo struct {
	User                *account.User
	Resources           []business.IResource
	ShipInfo            *ShipInfo
	CouponUsage         *resource.CouponUsage
	CustomerMessage     string
	OrderType           string
	CorpId              int
	BizCode             string
	SalesmanId          int
	ShoppingCartItemIds []int
	ExtraData           map[string]interface{}
}

func (*PurchaseInfo) Check

func (this *PurchaseInfo) Check() error

func (*PurchaseInfo) IsCustomTypeOrder

func (this *PurchaseInfo) IsCustomTypeOrder() bool

func (*PurchaseInfo) IsFromSalesman

func (this *PurchaseInfo) IsFromSalesman() bool

IsFromSalesman 是否是通过分销员分销进行购买

func (*PurchaseInfo) IsFromShoppingCart

func (this *PurchaseInfo) IsFromShoppingCart() bool

type RArea

type RArea struct {
	Province *RAreaItem `json:"province"`
	City     *RAreaItem `json:"city"`
	District *RAreaItem `json:"district"`
}

type RAreaItem

type RAreaItem struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type RInvoice

type RInvoice struct {
	Id            int                      `json:"id"`
	Bid           string                   `json:"bid"`
	Status        string                   `json:"status"`
	PaymentType   string                   `json:"payment_type"`
	PaymentTime   string                   `json:"payment_time"`
	Postage       int                      `json:"postage"`
	FinalMoney    int                      `json:"final_money"`
	ProductPrice  int                      `json:"product_price"`
	IsCleared     bool                     `json:"is_cleared"`
	ShipInfo      *RShipInfo               `json:"ship_info"`
	Products      []*ROrderProduct         `json:"products"`
	LogisticsInfo *RInvoiceLogistics       `json:"logistics_info"`
	OperationLogs []*ROperationLog         `json:"operation_logs"`
	Resources     []map[string]interface{} `json:"resources"`
	Remark        string                   `json:"remark"`
	Message       string                   `json:"message"`
	CancelReason  string                   `json:"cancel_reason"`
	CreatedAt     string                   `json:"created_at"`
}

type RInvoiceLogistics

type RInvoiceLogistics struct {
	EnableLogistics    bool   `json:"enable_logistics"`
	ExpressCompanyName string `json:"express_company_name"`
	ExpressNumber      string `json:"express_number"`
	Shipper            string `json:"leader_name"`
}

type ROperationLog

type ROperationLog struct {
	Id        int    `json:"id"`
	OrderBid  string `json:"order_bid"`
	Type      string `json:"type"`
	Remark    string `json:"remark"`
	Action    string `json:"action"`
	Operator  string `json:"operator"`
	CreatedAt string `json:"created_at"`
}

type ROrder

type ROrder struct {
	Id            int                      `json:"id"`
	Bid           string                   `json:"bid"`
	CorpId        int                      `json:"corp_id"`
	UserId        int                      `json:"user_id"`
	Status        string                   `json:"status"`
	FinalMoney    int                      `json:"final_money"`
	Invoices      []*RInvoice              `json:"invoices"`
	IsDeleted     bool                     `json:"is_deleted"`
	Resources     []map[string]interface{} `json:"resources"`
	OperationLogs []*ROperationLog         `json:"operation_logs"`
	StatusLogs    []*RStatusLog            `json:"status_logs"`
	Remark        string                   `json:"remark"`
	Message       string                   `json:"message"`
	ExtraData     map[string]interface{}   `json:"extra_data"`

	ProductPrice int `json:"product_price"`
	Postage      int `json:"postage"`

	CreatedAt   string `json:"created_at"`
	PaymentTime string `json:"payment_time"`
}

type ROrderLogistics

type ROrderLogistics struct {
	Id                 int    `json:"id"`
	OrderBid           string `json:"order_bid"`
	EnableLogistics    bool   `json:"enable_logistics"`
	ExpressCompanyName string `json:"express_company_name"`
	ExpressNumber      string `json:"express_number"`
	Shipper            string `json:"shipper"`
}

type ROrderOutline

type ROrderOutline struct {
	TotalMoney          float64 `json:"total_money"`
	IncrementMoney      float64 `json:"increment_money"`
	TotalOrderCount     int     `json:"total_order_count"`
	IncrementOrderCount int     `json:"increment_order_count"`
	TotalUserCount      int     `json:"total_user_count"`
	IncrementUserCount  int     `json:"increment_user_count"`
}

type ROrderProduct

type ROrderProduct struct {
	Id             int     `json:"id"`
	SupplierId     int     `json:"supplier_id"`
	Name           string  `json:"name"`
	Price          int     `json:"price"`
	Weight         float64 `json:"weight"`
	Thumbnail      string  `json:"thumbnail""`
	Sku            string  `json:"sku_name"`
	SkuDisplayName string  `json:"sku_display_name"`
	Count          int     `json:"count"`
}

type RShipInfo

type RShipInfo struct {
	Name     string `json:"name"`
	Phone    string `json:"phone"`
	Address  string `json:"address"`
	AreaCode string `json:"area_code"`
	AreaName string `json:"area_name"`
	Area     *RArea `json:"area"`
}

type RStatusLog

type RStatusLog struct {
	Id         int    `json:"id"`
	OrderBid   string `json:"order_bid"`
	FromStatus string `json:"from_status"`
	ToStatus   string `json:"to_status"`
	Remark     string `json:"remark"`
	Operator   string `json:"operator"`
	CreatedAt  string `json:"created_at"`
}

type ShipInfo

type ShipInfo struct {
	Phone    string `json:"phone"`   //收货电话
	Address  string `json:"address"` //详细地址
	Name     string `json:"name"`    //收件人
	AreaCode string `json:"area_code"`
}

func (*ShipInfo) GetArea

func (this *ShipInfo) GetArea() *eel.Area

func (*ShipInfo) IsValid

func (this *ShipInfo) IsValid() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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