Files
olons_admin/server/internal/controller/admin/sys/withdrawal_order.go
T
2026-10-10 20:56:17 +08:00

42 lines
1.6 KiB
Go

package sys
import (
"context"
"hotgo/api/admin/withdrawalorder"
"hotgo/internal/model/input/sysin"
"hotgo/internal/service"
)
var WithdrawalOrder = cWithdrawalOrder{}
type cWithdrawalOrder struct{}
func (c *cWithdrawalOrder) List(ctx context.Context, req *withdrawalorder.ListReq) (res *withdrawalorder.ListRes, err error) {
list, total, err := service.SysWithdrawalOrder().List(ctx, &req.WithdrawalOrderListInp)
if err != nil {
return nil, err
}
if list == nil {
list = []*sysin.WithdrawalOrderListModel{}
}
res = new(withdrawalorder.ListRes)
res.List = list
res.PageRes.Pack(req, total)
return
}
func (c *cWithdrawalOrder) View(ctx context.Context, req *withdrawalorder.ViewReq) (*withdrawalorder.ViewRes, error) {
v, err := service.SysWithdrawalOrder().View(ctx, &req.WithdrawalOrderViewInp)
return &withdrawalorder.ViewRes{WithdrawalOrderListModel: v}, err
}
func (c *cWithdrawalOrder) Review(ctx context.Context, req *withdrawalorder.ReviewReq) (*withdrawalorder.ReviewRes, error) {
v, err := service.SysWithdrawalOrder().Review(ctx, &req.WithdrawalReviewInp)
return &withdrawalorder.ReviewRes{FinanceApprovalModel: v}, err
}
func (c *cWithdrawalOrder) Execute(ctx context.Context, req *withdrawalorder.ExecuteReq) (*withdrawalorder.ExecuteRes, error) {
return &withdrawalorder.ExecuteRes{}, service.SysWithdrawalOrder().Execute(ctx, &req.FinanceExecuteInp)
}
func (c *cWithdrawalOrder) Complete(ctx context.Context, req *withdrawalorder.CompleteReq) (*withdrawalorder.CompleteRes, error) {
return &withdrawalorder.CompleteRes{}, service.SysWithdrawalOrder().Complete(ctx, &req.WithdrawalCompleteInp)
}