Documentation ¶
Index ¶
- Constants
- Variables
- type CalculateOrderMoneyService
- type CalculateOrderPostageService
- type ClearanceService
- type EncodeInvoiceService
- type EncodeLogisticsService
- type EncodeOrderService
- type EncodeOutlineService
- type FillOrderService
- type FinishedOrderHandler
- type Invoice
- func (this *Invoice) AppendProduct(orderProduct *OrderProduct)
- func (this *Invoice) Cancel(reason string)
- func (this *Invoice) Confirm()
- func (this *Invoice) Finish()
- func (this *Invoice) FinishRefund()
- func (this *Invoice) ForceFinish()
- func (this *Invoice) GetOrder() *Order
- func (this *Invoice) GetOriginalOrder() *Order
- func (this *Invoice) GetSettlementData(corpRelatedUserId int, productName string) map[string]interface{}
- func (this *Invoice) NeedSyncClearance() bool
- func (this *Invoice) Refunding(reason string)
- func (this *Invoice) RefundingForPlatform()
- func (this *Invoice) RejectRefund(reason string)
- func (this *Invoice) SetCleared(willPublishEvent bool) error
- func (this *Invoice) SetLogistics(logisticsModel *m_order.OrderLogistics)
- func (this *Invoice) Ship(shipInfo *b_order_params.LogisticsParams)
- func (this *Invoice) UpdateLogistics(shipInfo *b_order_params.LogisticsParams)
- func (this *Invoice) UpdateRemark(remark string)
- type InvoiceFinishedService
- type NewOrder
- type OperationData
- type Order
- func (this *Order) AddInvoice(invoice *Invoice)
- func (this *Order) Cancel(reason string)
- func (this *Order) Cancellable() bool
- func (this *Order) ChangeStatusToNonsense()
- func (this *Order) GetBid() string
- func (this *Order) GetCallbackResource() *OrderCallbackResource
- func (this *Order) GetCorpRelatedUserId() int
- func (this *Order) GetDeductableMoney() int
- func (this *Order) GetExtraData() map[string]interface{}
- func (this *Order) GetId() int
- func (this *Order) GetResources() []map[string]interface{}
- func (this *Order) GetStatusText() string
- func (this *Order) IsCustomOrder() bool
- func (this *Order) IsDepositOrder() bool
- func (this *Order) IsFinished() bool
- func (this *Order) IsInvoice() bool
- func (this *Order) Pay(args ...string)
- func (this *Order) Refund()
- func (this *Order) Refundable() bool
- func (this *Order) SetCallbackStatus(succeed bool)
- func (this *Order) ShouldAutoPay() bool
- func (this *Order) UpdateFinalMoney(finalMoney int)
- type OrderCallbackResource
- type OrderFactory
- type OrderLogService
- type OrderLogistics
- type OrderLogisticsFactory
- type OrderLogisticsRepository
- type OrderOperationLog
- type OrderOutline
- type OrderPaidService
- type OrderProduct
- type OrderProductRepository
- type OrderRefundedService
- type OrderRepository
- func (this *OrderRepository) GetInvoiceByBidForCorp(corp business.ICorp, bid string) *Invoice
- func (this *OrderRepository) GetInvoiceByBidForUser(user business.IUser, bid string) *Invoice
- func (this *OrderRepository) GetInvoicesByBidsForCorp(corp business.ICorp, bids []string) []*Invoice
- func (this *OrderRepository) GetInvoicesByIds(ids []int) []*Invoice
- func (this *OrderRepository) GetInvoicesByOrderIds(orderIds []int) []*Invoice
- func (this *OrderRepository) GetInvoicesForOrder(orderId int) []*Invoice
- func (this *OrderRepository) GetOrderByBid(bid string) *Order
- func (this *OrderRepository) GetOrderByBidForCorp(corp business.ICorp, bid string) *Order
- func (this *OrderRepository) GetOrderByBidForUser(user business.IUser, bid string) *Order
- func (this *OrderRepository) GetOrderById(id int) *Order
- func (this *OrderRepository) GetOrderCountForCorp(corp business.ICorp, status int) int64
- func (this *OrderRepository) GetOrderCountForUser(user business.IUser, status int) int64
- func (this *OrderRepository) GetOrderOutlineForCorp(corp business.ICorp) *OrderOutline
- func (this *OrderRepository) GetOrders(filters eel.Map, orderExprs ...string) []*Order
- func (this *OrderRepository) GetOrdersByBids(bids []string) []*Order
- func (this *OrderRepository) GetPagedInvoicesForCorp(corp business.ICorp, filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*Order, eel.INextPageInfo)
- func (this *OrderRepository) GetPagedOrders(filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*Order, eel.INextPageInfo)
- func (this *OrderRepository) GetPagedOrdersForCorp(corp business.ICorp, filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*Order, eel.INextPageInfo)
- func (this *OrderRepository) GetPagedOrdersForUserInCorp(user business.IUser, corp business.ICorp, filters eel.Map, page *eel.PageInfo, ...) ([]*Order, eel.INextPageInfo)
- type OrderStatsService
- type OrderStatusLog
- type ParsePurchaseInfoService
- type PurchaseInfo
- type RArea
- type RAreaItem
- type RInvoice
- type RInvoiceLogistics
- type ROperationLog
- type ROrder
- type ROrderLogistics
- type ROrderOutline
- type ROrderProduct
- type RShipInfo
- type RStatusLog
- type ShipInfo
Constants ¶
const ORDER_OPERATION_CANCEL = "cancel_order"
const ORDER_OPERATION_CONFIRM = "confirm_order"
const ORDER_OPERATION_CREATE = "create_order"
const ORDER_OPERATION_FINISH = "finish_order"
const ORDER_OPERATION_FINISH_BY_SYSTEM = "finish_order_by_system"
const ORDER_OPERATION_FINISH_REFUND = "finish_refund"
const ORDER_OPERATION_PAY = "pay_order"
const ORDER_OPERATION_REFUND = "refund_order"
const ORDER_OPERATION_REJECT_REFUND = "reject_refund"
const ORDER_OPERATION_REQUEST_PLATFORM_REFUND = "request_platform_refund"
const ORDER_OPERATION_SHIP = "ship_order"
const ORDER_OPERATION_START_PAY = "start_pay_order"
const ORDER_OPERATION_UPDATE_LOGISTICS_INFO = "update_order_logistics_info"
const STATS_RANGE_MONTH = 30
const STATS_RANGE_WEEK = 7
Variables ¶
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 (*Invoice) AppendProduct ¶
func (this *Invoice) AppendProduct(orderProduct *OrderProduct)
func (*Invoice) ForceFinish ¶
func (this *Invoice) ForceFinish()
func (*Invoice) GetOriginalOrder ¶
func (*Invoice) GetSettlementData ¶
func (this *Invoice) GetSettlementData(corpRelatedUserId int, productName string) map[string]interface{}
GetSettlementData 获取结算规则数据
func (*Invoice) NeedSyncClearance ¶
NeedSyncClearance 是否需要同步清算
func (*Invoice) RefundingForPlatform ¶
func (this *Invoice) RefundingForPlatform()
RefundingForPlatform 向平台申请操作退款
func (*Invoice) SetCleared ¶
SetCleared 设置已清算
func (*Invoice) SetLogistics ¶
func (this *Invoice) SetLogistics(logisticsModel *m_order.OrderLogistics)
func (*Invoice) UpdateLogistics ¶
func (this *Invoice) UpdateLogistics(shipInfo *b_order_params.LogisticsParams)
修改订单物流信息
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) GetDeductableMoney ¶
type OperationData ¶
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 (*Order) AddInvoice ¶
func (*Order) ChangeStatusToNonsense ¶
func (this *Order) ChangeStatusToNonsense()
func (*Order) GetCallbackResource ¶
func (this *Order) GetCallbackResource() *OrderCallbackResource
func (*Order) GetCorpRelatedUserId ¶
GetCorpRelatedUserId 获取订单corp的关联user_id
func (*Order) GetDeductableMoney ¶
func (*Order) GetExtraData ¶
func (*Order) GetResources ¶
func (*Order) GetStatusText ¶
func (*Order) IsCustomOrder ¶
func (*Order) SetCallbackStatus ¶
SetCallbackStatus 设置回调处理结果
func (*Order) ShouldAutoPay ¶
ShouldAutoPay 是否可以自动完成 以下情况可以自动完成: 1. final_money = 0
func (*Order) UpdateFinalMoney ¶
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 (*OrderRepository) GetPagedOrders ¶
func (this *OrderRepository) GetPagedOrders(filters eel.Map, page *eel.PageInfo, orderExprs ...string) ([]*Order, eel.INextPageInfo)
func (*OrderRepository) GetPagedOrdersForCorp ¶
func (*OrderRepository) GetPagedOrdersForUserInCorp ¶
type OrderStatsService ¶
type OrderStatsService struct {
eel.ServiceBase
}
func NewOrderStatsService ¶
func NewOrderStatsService(ctx context.Context) *OrderStatsService
func (*OrderStatsService) GetIncrementCountTrend ¶
GetIncrementCountTrend 订单数量增量趋势
func (*OrderStatsService) GetIncrementMoneyTrend ¶
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 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 ROperationLog ¶
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 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 RStatusLog ¶
Source Files ¶
- calculate_order_money_service.go
- calculate_order_postage_service.go
- clearance_service.go
- encode_invoice_service.go
- encode_order_logistics_service.go
- encode_order_service.go
- encode_outline_service.go
- fill_order_service.go
- finished_order_handler.go
- init.go
- invoice.go
- invoice_finished_service.go
- new_order.go
- order.go
- order_callback_resource.go
- order_factory.go
- order_log_service.go
- order_logistics.go
- order_logistics_factory.go
- order_logistics_repository.go
- order_operation_log.go
- order_paid_service.go
- order_product.go
- order_product_repository.go
- order_refunded_service.go
- order_repository.go
- order_status_log.go
- parse_purchase_info_service.go
- purchase_info.go
- resp_order.go
- stats_service.go