package com.gic.haoban.manage.service.service.out.impl.contact;

import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.contact.ContactConfigDTO;
import com.gic.haoban.manage.api.service.contact.ContactConfigApiService;
import com.gic.haoban.manage.service.service.contact.ContactConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("contactConfigApiService")
public class ContactConfigApiServiceImpl implements ContactConfigApiService {

    @Autowired
    private ContactConfigService contactConfigService;

    @Override
    public ServiceResponse<Void> saveContactConfig(ContactConfigDTO contactConfig) {
        contactConfigService.saveContactConfig(contactConfig);
        return ServiceResponse.success();
    }

    @Override
    public ServiceResponse<ContactConfigDTO> getContactConfig(String enterpriseId) {
        ContactConfigDTO config = contactConfigService.getContactConfig(enterpriseId);
        return ServiceResponse.success(config);
    }
}
