package card_info_t_mall_game

import (
	"context"
	"kami/internal/errHandler"
	"kami/internal/model"
	"kami/internal/service"

	"kami/api/card_info_t_mall_game/v1"

	"github.com/gogf/gf/v2/errors/gcode"
)

func (c *ControllerV1) TMallGameAccountList(ctx context.Context, req *v1.TMallGameAccountListReq) (res *v1.TMallGameAccountListRes, err error) {
	accountService := service.RechargeTMallGameAccount()
	res = &v1.TMallGameAccountListRes{}
	res.Total, res.List, err = accountService.List(ctx, &model.RechargeTMallGameAccountListInput{
		TMallGameAccountListReq: req,
	})
	err = errHandler.WrapError(ctx, gcode.CodeInternalError, err)
	return
}
