package card_info_t_mall_game

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

	"kami/api/card_info_t_mall_game/v1"

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

func (c *ControllerV1) TMallGameAccountDelete(ctx context.Context, req *v1.TMallGameAccountDeleteReq) (res *v1.TMallGameAccountDeleteRes, err error) {
	accountService := service.RechargeTMallGameAccount()
	err = accountService.DeleteOne(ctx, req.ID)
	if err != nil {
		err = errHandler.WrapError(ctx, gcode.CodeInternalError, err, "删除账户错误")
	}
	return
}
