Merge branch 'refactor-supplier' into develop
This commit is contained in:
commit
01900b64e4
|
@ -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"`
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ package subject
|
||||||
|
|
||||||
var prefixes = struct {
|
var prefixes = struct {
|
||||||
Communication string
|
Communication string
|
||||||
|
Withdraw string
|
||||||
Order string
|
Order string
|
||||||
News string
|
News string
|
||||||
Warehouse string
|
Warehouse string
|
||||||
|
@ -16,6 +17,7 @@ var prefixes = struct {
|
||||||
SupplierPermission string
|
SupplierPermission string
|
||||||
}{
|
}{
|
||||||
Communication: "communication",
|
Communication: "communication",
|
||||||
|
Withdraw: "withdraw",
|
||||||
Order: "order",
|
Order: "order",
|
||||||
News: "news",
|
News: "news",
|
||||||
Warehouse: "warehouse",
|
Warehouse: "warehouse",
|
||||||
|
|
|
@ -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