package com.inkasso.factoring.businessConsulting.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.inkasso.adapter.service.KafubaoServiceImpl;
import com.inkasso.adapter.util.BeanUtilsProxy;
import com.inkasso.factoring.businessConsulting.dao.BusinessConsultingDAO;
import com.inkasso.factoring.businessConsulting.entity.BusinessConsultingDO;
import com.inkasso.factoring.businessConsulting.model.dto.BusinessConsultingDTO;
import com.inkasso.factoring.businessConsulting.model.request.AddBusinessConsultingRequest;
import com.inkasso.factoring.businessConsulting.model.request.EditBusinessConsultingRequest;
import com.inkasso.factoring.businessConsulting.service.BusinessConsultingService;
import com.inkasso.adapter.exception.ServiceException;
import com.inkasso.adapter.exception.enums.ExceptionEnum;
import org.springframework.stereotype.Service;

/**
* @author liutao
* @date  2024-03-30
*/
@Service
public class BusinessConsultingServiceImpl extends ServiceImpl<BusinessConsultingDAO, BusinessConsultingDO> implements BusinessConsultingService {


    @Override
    public void addBusinessConsulting(AddBusinessConsultingRequest addBusinessConsultingRequest) {
    BusinessConsultingDO businessConsulting = BeanUtilsProxy.copyPropertiesIgnoreNull(addBusinessConsultingRequest, BusinessConsultingDO.class);
    this.baseMapper.insert(businessConsulting);
    }

//    @Override
//    public void editBusinessConsulting(EditBusinessConsultingRequest editBusinessConsultingRequest) {
//
//    BusinessConsultingDO businessConsulting = super.getById(editBusinessConsultingRequest.getId());
//    if (businessConsulting == null) {
//    throw new ServiceException(400, ExceptionEnum.SYSTEM_DATE_ERROR);
//    }
//    BeanUtilsProxy.copyPropertiesNotIgnoreNull(editBusinessConsultingRequest,businessConsulting);
//    this.updateById(businessConsulting);
//    }
//
//    @Override
//    public BusinessConsultingDTO getBusinessConsultingDtoById(Long id) {
//    BusinessConsultingDO businessConsulting = super.getById(id);
//    BusinessConsultingDTO businessConsultingDto = BeanUtilsProxy.copyProperties(businessConsulting,BusinessConsultingDTO.class);
//    return businessConsultingDto;
//    }
//
//    @Override
//    public void deleteBusinessConsulting(Long id) {
//
//    this.removeById(id);
//    }
}

