package org.jeecg.modules.basedata.service.impl;

import org.jeecg.modules.basedata.entity.FdCustomer;
import org.jeecg.modules.basedata.entity.FdCustomerContacts;
import org.jeecg.modules.basedata.mapper.FdCustomerContactsMapper;
import org.jeecg.modules.basedata.service.IFdCustomerContactsService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 客户联系人
 * @author： jeecg-boot
 * @date：   2019-05-08
 * @version： V1.0
 */
@Service
@Transactional
public class FdCustomerContactsServiceImpl extends ServiceImpl<FdCustomerContactsMapper, FdCustomerContacts> implements IFdCustomerContactsService {

    @Resource
    private FdCustomerContactsMapper fdCustomerContactsMapper;

    @Override
    public boolean UpdateByPid(FdCustomer Customer) {
        return fdCustomerContactsMapper.UpdateByPid(Customer)>0?true:false;
    }

    @Override
    public boolean deletePid(String pid) {
        return fdCustomerContactsMapper.deletePid(pid.trim())>0?true:false;
    }

    @Override
    public List<FdCustomerContacts> customerList(String pid) {
        return fdCustomerContactsMapper.customerList(pid.trim());
    }
}
