package api

/*import (
	"gadmin/internal/admin/forms"
	"gadmin/internal/admin/service"
	"github.com/gin-gonic/gin"
)

func CdkReceived(c *gin.Context) {
	var req forms.CdkReceivedReq
	if err := c.ShouldBind(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	if err := forms.ParseParams(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	c.JSON(200, service.Cdk.Received(c, req))
}

func CdkDel(c *gin.Context) {
	var req forms.CdkDelReq
	if err := c.ShouldBind(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	if err := forms.ParseParams(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	c.JSON(200, service.Cdk.Del(c, req))
}

func CdkAdd(c *gin.Context) {
	var req forms.CdkAddReq
	if err := c.ShouldBind(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	if err := forms.ParseParams(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	c.JSON(200, service.Cdk.Add(c, req))
}

func CdkList(c *gin.Context) {
	var req forms.CdkListReq
	if err := c.ShouldBind(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}
	if err := forms.ParseParams(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	c.JSON(200, service.Cdk.List(c, req))
}

// CdkBatchInvalid 批次废弃
func CdkBatchInvalid(c *gin.Context) {
	var req forms.CdkInvalidReq
	if err := c.ShouldBind(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	if err := forms.ParseParams(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	c.JSON(200, service.Cdk.Invalid(c, req))
}

// CdkRedeemCodeList 兑换码列表
func CdkRedeemCodeList(c *gin.Context) {
	var req forms.CdkRedeemCodeListReq
	if err := c.ShouldBind(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	if err := forms.ParseParams(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	c.JSON(200, service.Cdk.RedeemCodeList(c, req))
}
*/
