finish /user/status-config

This commit is contained in:
eson
2023-06-08 11:36:47 +08:00
parent a9e0f6b98e
commit 47e9201d78
4 changed files with 76 additions and 10 deletions

View File

@@ -24,10 +24,76 @@ func NewUserStatusConfigLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
}
}
func (l *UserStatusConfigLogic) UserStatusConfig(req *types.RequestBasicInfoForm) (resp *types.Response) {
func (l *UserStatusConfigLogic) UserStatusConfig(req *types.Request) (resp *types.Response) {
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
return resp.SetStatus(basic.CodeOK)
data := &types.DataStatusConfig{
SearchList: []types.KeyName{
{Key: -1, Name: "All"},
{Key: -1, Name: "All"},
{Key: 1, Name: "Order Has Been Placed"},
{Key: 2, Name: "In Production"},
{Key: 3, Name: "Shipped"},
{Key: 4, Name: "Inventory"},
{Key: 8, Name: "Ready for Shipment"},
{Key: 5, Name: "Completed"},
// {"key": 6, "name": "Refund Under Review"},
{Key: 7, Name: "Transaction Closed"},
},
OrderStatus: []types.KeyNameButton{
{Key: 1, Name: "Order Has Been Placed", Button: []string{"download_invoice", "cancel", "again", "toPay"}},
{Key: 2, Name: "In Production", Button: []string{"download_invoice", "again", "toPay"}},
{Key: 3, Name: "Shipped", Button: []string{"download_invoice", "again", "view_logistics"}},
{Key: 5, Name: "Completed", Button: []string{"download_invoice", "again", "view_logistics", "delete"}},
{Key: 7, Name: "Transaction Closed", Button: []string{"again", "delete"}},
},
InventoryStatus: []types.KeyNameButton{
{Key: 1, Name: "Order Has Been Placed", Button: []string{"download_invoice", "cancel", "again", "toPay"}},
{Key: 2, Name: "In Production", Button: []string{"download_invoice", "again", "toPay"}},
{Key: 4, Name: "Inventory", Button: []string{"download_invoice", "again", "go_cloud", "toPay"}},
{Key: 8, Name: "Ready for Shipment", Button: []string{"download_invoice", "again", "go_cloud", "delete"}},
{Key: 7, Name: "Transaction Closed", Button: []string{"again", "delete"}},
},
Time: []types.KeyName{
{Key: 0, Name: "All"},
{Key: 1, Name: "within a month"},
{Key: 2, Name: "within a quarter"},
{Key: 3, Name: "Within half a year"},
{Key: 4, Name: "Within a year"},
},
RefundReason: []types.KeyName{
{Key: 1, Name: "I don't want it anymore"},
{Key: 2, Name: "no reason"},
{Key: 3, Name: "other"},
},
OrderLogisticsStatus: []types.KeyName{
{Key: 1, Name: "Order"},
{Key: 2, Name: "Completed"},
{Key: 3, Name: "Shipped"},
{Key: 4, Name: "UPS Pick Up"},
{Key: 5, Name: "Arrival"},
},
InventoryLogisticsStatus: []types.KeyName{
{Key: 1, Name: "Order"},
{Key: 2, Name: "Arrival Inventory"},
{Key: 3, Name: "Ready For Shipment"},
},
LogisticsStatus: []types.KeyNameButton{
{Key: -1, Name: "All", Button: []string{}},
{Key: 1, Name: "Draw", Button: []string{}},
{Key: 2, Name: "Shipping", Button: []string{}},
{Key: 3, Name: "UPS pick up", Button: []string{"check_detail"}},
{Key: 4, Name: "Arrival", Button: []string{}},
},
}
return resp.SetStatus(basic.CodeOK, data)
}
// [