package cn.superdesk.uniorder.dao.mapper.operationCenter;

import cn.superdesk.uniorder.dao.entity.operationCenter.UnifiedCenterCustomer;

import java.util.List;
import java.util.Map;

import cn.superdesk.uniorder.dto.param.operationCenter.customer.OperationCenterCustomerParam;
import cn.superdesk.uniorder.dto.vo.operationCenter.base.OperationCenterVo;
import cn.superdesk.uniorder.dto.vo.operationCenter.customer.OpCenterCustomerOperatorOrgVo;
import cn.superdesk.uniorder.dto.vo.operationCenter.customer.OperationCenterCustomerVo;
import cn.superdesk.uniorder.dto.vo.operationCenter.customer.OperationCenterPaymentCustomerVo;
import org.apache.ibatis.annotations.Select;

public interface UnifiedCenterCustomerMapper {

    int deleteByPrimaryKey(Long id);

    int insert(UnifiedCenterCustomer record);

    int insertSelective(UnifiedCenterCustomer record);



    UnifiedCenterCustomer selectByPrimaryKey(Long id);


    int updateByPrimaryKeySelective(UnifiedCenterCustomer record);

    int updateByPrimaryKey(UnifiedCenterCustomer record);

    List<OperationCenterCustomerVo> getOperationCenterCustomerList(OperationCenterCustomerParam param);


    UnifiedCenterCustomer selectCustomerByCustomerName(String customerName, Long customerId);
    @Select("select id code,CONCAT(customer_name,'(',customer_sn,')') name from unified_center_customer where  deleted = 0 ")
    List<OperationCenterVo> selectAllCustomerIdAndName();


    List<OperationCenterPaymentCustomerVo> findAllCustomer(OperationCenterCustomerParam param);

    /**
     *  客户-运营商-项目-关联关系
     * @param conditions
     * @return
     */
    List<OpCenterCustomerOperatorOrgVo> getLinkOperatorAndOrg(Map<String, Object> conditions);
}