broker

package
v0.0.0-...-3435b29 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOrders

func GetOrders(pgNum string, pgSize string, shopCode string, method string, startDate time.Time) (*[]models.Order, error)

GetOrders returns a list of all orders form specified shop.

func GetShops

func GetShops(pgNum string, pgSize string, startDate time.Time) (*[]models.Shop, error)

GetShops returns the list of shops.

func GetTotalOfOrders

func GetTotalOfOrders(shopCode string, method string, startDate time.Time) (int, error)

GetTotalOfOrders returns the total number of all orders.

Types

type Delivery

type Delivery struct {
	Delivery      bool   `json:"delivery"`
	Code          string `json:"code"`
	WarehouseName string `json:"warehouse_name"`
	WarehouseCode string `json:"warehouse_code"`
	ExpressName   string `json:"express_name"`
	ExpressCode   string `json:"express_code"`
	MailNo        string `json:"mail_no"`
}

Delivery struct to map the Entity of the Delivery.

type Detail

type Detail struct {
	OID              string  `json:"oid"`
	Qty              float64 `json:"qty"`
	Price            float64 `json:"price"`
	Amount           float64 `json:"amount"`
	Refund           int     `json:"refund"`
	Note             string  `json:"note"`
	PlatformItemName string  `json:"platform_item_name"`
	PlatformSkuName  string  `json:"platform_sku_name"`
	ItemCode         string  `json:"item_code"`
	ItemName         string  `json:"item_name"`
	ItemSimpleName   string  `json:"item_simple_name"`
	PostFee          float64 `json:"post_fee"`
	DiscountFee      float64 `json:"discount_fee"`
	AmountAfter      float64 `json:"amount_after"`
}

Detail struct to map the Entity of the item details.

type InvalidPtrError

type InvalidPtrError struct {
	Type reflect.Type
}

An InvalidPtrError describes an invalid argument passed to Unmarshal. (The argument to Unmarshal must be a non-nil pointer.)

func (*InvalidPtrError) Error

func (e *InvalidPtrError) Error() string

type OResponse

type OResponse struct {
	Success    bool       `json:"success"`
	ErrorDesc  string     `json:"errorDesc"`
	Total      int        `json:"total"`
	Orders     []Order    `json:"orders"`
	Deliveries []Delivery `json:"deliverys"`
}

A OResponse struct to map the Entity Response

type Order

type Order struct {
	Code                 string     `json:"code"`
	PlatformCode         string     `json:"platform_code"`
	OrderTypeName        string     `json:"order_type_name"`
	ShopName             string     `json:"shop_name"`
	ShopCode             string     `json:"shop_code"`
	VIPName              string     `json:"vip_name"`
	VIPCode              string     `json:"vip_code"`
	VIPRealName          string     `json:"vipRealName"`
	AccountStatus        string     `json:"accountStatus"`
	AccountAmount        float64    `json:"accountAmount"`
	BusinessMan          string     `json:"business_man"`
	Qty                  int8       `json:"qty"`
	Amount               float64    `json:"amount"`
	Payment              float64    `json:"payment"`
	WarehouseName        string     `json:"warehouse_name"`
	WarehouseCode        string     `json:"warehouse_code"`
	DeliveryState        int8       `json:"delivery_state"`
	ExpressName          string     `json:"express_name"`
	ExpressCode          string     `json:"express_code"`
	ReceiverName         string     `json:"receiver_phone"`
	ReceiverMobile       string     `json:"receiver_mobile"`
	ReceiverArea         string     `json:"receiver_area"`
	ReceiverAddress      string     `json:"receiver_address"`
	PlatformTradingState string     `json:"platform_trading_state"`
	Deliverys            []Delivery `json:"deliverys"`
	Details              []Detail   `json:"details"`
	Payments             []Payment  `json:"payments"`
	Paytime              string     `json:"paytime"`
	DealTime             string     `json:"dealtime"`
	CreateTime           string     `json:"createtime"`
	ModifyTime           string     `json:"modifytime"`
}

A Order struct to map the Entity Order

type Payment

type Payment struct {
	Payment     float64 `json:"payment"`
	PayCode     string  `json:"payCode"`
	PayTypeName string  `json:"pay_type_name"`
	PayTime     string  `json:"payTime"`
}

Payment struct to map the Entity of the payment.

type Response

type Response struct {
	Success   bool   `json:"success"`
	ErrorDesc string `json:"errorDesc"`
	Total     int    `json:"total"`
	Shops     []Shop `json:"shops"`
}

A Response struct to map the Entity Response

type Shop

type Shop struct {
	ID         int    `json:"id"`
	Nick       string `json:"nick"`
	Code       string `json:"code"`
	Name       string `json:"name"`
	CreateDate string `json:"create_date"`
	ModifyDate string `json:"modify_date"`
	Note       string `json:"note"`
	TypeName   string `json:"type_name"`
}

A Shop struct to map every shop information.

Jump to

Keyboard shortcuts

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