define nats func - get supplier order cash and supplier withdraw cash
This commit is contained in:
parent
868df4713d
commit
816316b558
|
@ -49,3 +49,7 @@ type OrderSupplierQuery struct {
|
||||||
SupplierID string `json:"supplierId"`
|
SupplierID string `json:"supplierId"`
|
||||||
WarehouseIDs []string `json:"warehouseIDs"`
|
WarehouseIDs []string `json:"warehouseIDs"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type OrderSupplierCashReq struct {
|
||||||
|
SupplierID string `json:"supplierId"`
|
||||||
|
}
|
||||||
|
|
|
@ -33,3 +33,9 @@ type SupplierOrderDelivery struct {
|
||||||
Status string `json:"status" enums:"waiting_to_confirm,waiting_to_pick,picking,picked,delay_pickup,pickup_failed,delivering,delay_delivery,delivered,cancelled,delivery_failed,waiting_to_return,returning,delay_return,compensation,returned"`
|
Status string `json:"status" enums:"waiting_to_confirm,waiting_to_pick,picking,picked,delay_pickup,pickup_failed,delivering,delay_delivery,delivered,cancelled,delivery_failed,waiting_to_return,returning,delay_return,compensation,returned"`
|
||||||
TPLCode string `json:"tplCode" enums:"SLY,GHTK,GHN,SSC,SPY,VTP,SE,NTL,BEST"`
|
TPLCode string `json:"tplCode" enums:"SLY,GHTK,GHN,SSC,SPY,VTP,SE,NTL,BEST"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type OrderSupplierCashRes struct {
|
||||||
|
PendingCash float64 `json:"pendingCash"`
|
||||||
|
WaitingForReconcileCash float64 `json:"waitingForReconcileCash"`
|
||||||
|
ReconciledCash float64 `json:"reconciledCash"`
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
package model
|
||||||
|
|
||||||
|
type WithdrawSupplierCashReq struct {
|
||||||
|
SupplierID string `json:"supplierId"`
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package model
|
||||||
|
|
||||||
|
type WithdrawSupplierCashRes struct {
|
||||||
|
PendingCash float64 `json:"pendingCash"`
|
||||||
|
SuccessCash float64 `json:"successCash"`
|
||||||
|
RejectCash float64 `json:"rejectCash"`
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ var prefixes = struct {
|
||||||
Seller string
|
Seller string
|
||||||
SupplierUser string
|
SupplierUser string
|
||||||
SupplierRole string
|
SupplierRole string
|
||||||
|
Withdraw string
|
||||||
}{
|
}{
|
||||||
Communication: "communication",
|
Communication: "communication",
|
||||||
Order: "order",
|
Order: "order",
|
||||||
|
@ -22,4 +23,5 @@ var prefixes = struct {
|
||||||
Seller: "seller",
|
Seller: "seller",
|
||||||
SupplierUser: "supplier_user",
|
SupplierUser: "supplier_user",
|
||||||
SupplierRole: "supplier_role",
|
SupplierRole: "supplier_role",
|
||||||
|
Withdraw: "withdraw",
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ var Order = struct {
|
||||||
UpdateLogisticInfoFailed string
|
UpdateLogisticInfoFailed string
|
||||||
ORNotUpdateStatus string
|
ORNotUpdateStatus string
|
||||||
GetSupplierOrders string
|
GetSupplierOrders string
|
||||||
|
GetSupplierCash string
|
||||||
}{
|
}{
|
||||||
UpdateORStatus: getOrderValue("update_outbound_request_status"),
|
UpdateORStatus: getOrderValue("update_outbound_request_status"),
|
||||||
CancelDelivery: getOrderValue("cancel_delivery"),
|
CancelDelivery: getOrderValue("cancel_delivery"),
|
||||||
|
@ -20,4 +21,5 @@ var Order = struct {
|
||||||
UpdateLogisticInfoFailed: getOrderValue("update_logistic_info_failed"),
|
UpdateLogisticInfoFailed: getOrderValue("update_logistic_info_failed"),
|
||||||
ORNotUpdateStatus: getOrderValue("outbound_request_not_update_status"),
|
ORNotUpdateStatus: getOrderValue("outbound_request_not_update_status"),
|
||||||
GetSupplierOrders: getOrderValue("get_supplier_orders"),
|
GetSupplierOrders: getOrderValue("get_supplier_orders"),
|
||||||
|
GetSupplierCash: getOrderValue("get_supplier_cash"),
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package subject
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func getWithdrawValue(val string) string {
|
||||||
|
return fmt.Sprintf("%s.%s", prefixes.Withdraw, val)
|
||||||
|
}
|
||||||
|
|
||||||
|
var Withdraw = struct {
|
||||||
|
GetSupplierCash string
|
||||||
|
}{
|
||||||
|
GetSupplierCash: getWithdrawValue("get_supplier_cash"),
|
||||||
|
}
|
Loading…
Reference in New Issue