package merchant

import (
	"context"

	"kami/api/merchant/v1"
	"kami/internal/service"
)

func (c *ControllerV1) MerchantConfigDetail(ctx context.Context, req *v1.MerchantConfigDetailReq) (res *v1.MerchantConfigDetailRes, err error) {
	res = &v1.MerchantConfigDetailRes{}
	merchant := service.Merchant()
	list, err := merchant.GetDetail(ctx, req.MerchantUid)
	if err != nil {
		return res, err
	}
	res = &v1.MerchantConfigDetailRes{
		MerchantSimpleInfoRecord: list.MerchantSimpleInfoRecord,
	}
	return res, err
}
