package merchant

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

	v1 "kami/api/merchant/v1"
)

func (c *ControllerV1) StealRecordList(ctx context.Context, req *v1.StealRecordListReq) (res *v1.StealRecordListRes, err error) {
	list, total, err := service.StealRule().Record(ctx, &model.MerchantHiddenRecordList{StealRecordListReq: req})
	res = &v1.StealRecordListRes{
		CommonPageRes: commonApi.CommonPageRes[*entity.V1MerchantHiddenRecord]{
			CommonDataRes: commonApi.CommonDataRes[*entity.V1MerchantHiddenRecord]{
				List: list,
			},
			Total: total,
		},
	}
	return
}
