package card_info_original_jd

import (
	"context"
	"kami/api/commonApi"
	"kami/internal/model"
	"kami/internal/service"

	"kami/api/card_info_original_jd/v1"
)

func (c *ControllerV1) OriginalJDAccountUpdate(ctx context.Context, req *v1.OriginalJDAccountUpdateReq) (res *v1.OriginalJDAccountUpdateRes, err error) {
	err = service.CardRedeemAccount().Update(ctx, &model.RedeemAccountUpdateInput{
		CommonStrId: commonApi.CommonStrId{
			ID: req.ID,
		},
		Status:         req.Status,
		Name:           req.Name,
		Remark:         req.Remark,
		MaxAmountLimit: req.MaxAmountLimit,
		MaxCountLimit:  req.MaxAmountLimit,
	}, nil)
	return
}
