package com.hzs.system.base.provider;

import cn.hutool.core.bean.BeanUtil;
import com.hzs.common.core.domain.R;
import com.hzs.common.domain.system.base.BdCubasdoc;
import com.hzs.system.base.service.IBdCubasdocService;
import com.hzs.system.sys.ICubasdocApi;
import com.hzs.system.sys.dto.CubasdocDTO;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class CubasdocProvider implements ICubasdocApi {

    @Autowired
    private IBdCubasdocService cubasdocService;

    @Override
    public R<CubasdocDTO> getCubasdoc(Integer pkCubasdoc) {
        BdCubasdoc cubasdoc = cubasdocService.getById(pkCubasdoc);
        CubasdocDTO cubasdocDTO = BeanUtil.copyProperties(cubasdoc, CubasdocDTO.class);
        return R.ok(cubasdocDTO);
    }
}
