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

import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.manage.api.dto.contact.ContactLogDTO;
import com.gic.haoban.manage.api.service.contact.ContactLogApiService;
import com.gic.haoban.manage.service.entity.contact.TabContactLog;
import com.gic.haoban.manage.service.service.contact.ContactLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by wangzubo on 2022/11/1.
 */
@Service("contactLogApiService")
public class ContactLogApiServiceImpl implements ContactLogApiService {

    @Autowired
    private ContactLogService contactLogService;

    @Override
    public ServiceResponse<ContactLogDTO> getClerkContactTime(String memberId) {
        TabContactLog contactLog = contactLogService.getClerkContactTime(memberId);
        ContactLogDTO contactLogDTO = EntityUtil.changeEntityNew(ContactLogDTO.class, contactLog);
        return ServiceResponse.success(contactLogDTO);
    }
}
