package cn.freemud.demo.adapter.manager;

import cn.freemud.demo.entities.bo.member.GetPaidRuleRequestBO;
import cn.freemud.demo.entities.bo.member.GetUserScoreUseDetailBO;
import cn.freemud.entities.dto.GetPaidRuleRequestDto;
import cn.freemud.entities.dto.user.GetUserScoreUseDetailRequest;
import cn.freemud.utils.BeanUtil;
import ma.glasnost.orika.MapperFacade;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class CustomerBO2DTOAdapter {

    @Resource
    private MapperFacade mapperFacade;

    public GetUserScoreUseDetailRequest convert2GetUserScoreUseDetailRequest(GetUserScoreUseDetailBO bo) {
        GetUserScoreUseDetailRequest dto = BeanUtil.convertBean(bo, GetUserScoreUseDetailRequest::new);
        return dto;
    }

    public GetPaidRuleRequestDto convert2GetPaidRuleRequestDto(GetPaidRuleRequestBO bo) {
        GetPaidRuleRequestDto dto = BeanUtil.convertBean(bo, GetPaidRuleRequestDto::new);
        return dto;
    }

}
