fusenapi/server/home-user-auth/internal/logic/userstatusconfiglogic.go
2023-06-08 10:51:56 +08:00

93 lines
3.7 KiB
Go

package logic
import (
"context"
"fusenapi/server/home-user-auth/internal/svc"
"fusenapi/server/home-user-auth/internal/types"
"fusenapi/utils/basic"
"github.com/zeromicro/go-zero/core/logx"
)
type UserStatusConfigLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewUserStatusConfigLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserStatusConfigLogic {
return &UserStatusConfigLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *UserStatusConfigLogic) UserStatusConfig(req *types.RequestBasicInfoForm) (resp *types.Response) {
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
return resp.SetStatus(basic.CodeOK)
}
// [
// //返回订单每个状态值
// //搜索下拉列表
// 'search_list' => [
// ['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'],
// ],
// //直邮单状态
// 'order_status' => [
// ['key' => 1, "name" => 'Order Has Been Placed', 'button' => ['download_invoice', 'cancel', 'again', 'toPay']],
// ['key' => 2, "name" => 'In Production', 'button' => ['download_invoice', 'again', 'toPay']],
// ['key' => 3, "name" => 'Shipped', 'button' => ['download_invoice', 'again', 'view_logistics']],
// ['key' => 5, "name" => 'Completed', 'button' => ['download_invoice', 'again', 'view_logistics', 'delete']],
// // ['key' => 6, "name" => 'Refund Under Review', 'button' => ['again', 'delete']],
// ['key' => 7, "name" => 'Transaction Closed', 'button' => ['again', 'delete']],
// ],
// //云仓单状态
// 'Inventory_status' => [
// ['key' => 1, "name" => 'Order Has Been Placed', 'button' => ['download_invoice', 'cancel', 'again', 'toPay']],
// ['key' => 2, "name" => 'In Production', 'button' => ['download_invoice', 'again', 'toPay']],
// ['key' => 4, "name" => 'Inventory', 'button' => ['download_invoice', 'again', 'go_cloud', 'toPay']],
// ['key' => 8, "name" => 'Ready for Shipment', 'button' => ['download_invoice', 'again', 'go_cloud', 'delete']],
// // ['key' => 6, "name" => 'Refund Under Review', 'button' => ['again', 'delete']],
// ['key' => 7, "name" => 'Transaction Closed', 'button' => ['again', 'delete']],
// ],
// //订单物流状态
// 'order_logistics_status' => Order::$statusFontLogisticOrder,
// //订单物流状态
// 'Inventory_logistics_status' => Order::$statusFontLogisticInventory,
// //返回订单时间筛选项
// 'time' => [
// ['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'],
// ],
// //退款原因说明项
// 'refund_reason' => [
// ['key' => 1, 'name' => 'I don\'t want it anymore'],
// ['key' => 2, 'name' => 'no reason'],
// ['key' => 3, 'name' => 'other'],
// ],
// //物流状态筛选项
// 'logistics_status' => [
// ['key' => -1, "name" => 'All'],
// ['key' => 1, "name" => 'Draw', 'button' => []],
// ['key' => 2, "name" => 'Shipping', 'button' => []],
// // ['key' => Deliver::STATUS_PORT, "name" => 'To the port', 'button' => []],
// ['key' => 3, "name" => 'UPS pick up', 'button' => ['check_detail']],
// ['key' => 4, "name" => 'Arrival', 'button' => []],
// ]
// ];