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

import cn.superdesk.uniorder.dao.entity.operationCenter.UnifiedCustomerOperatorOrg;
import cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterCustomerOperatorOrgExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface UnifiedCustomerOperatorOrgMapper {
    long countByExample(OperationCenterCustomerOperatorOrgExample example);

    int deleteByExample(OperationCenterCustomerOperatorOrgExample example);

    int deleteByPrimaryKey(Long id);

    int insert(UnifiedCustomerOperatorOrg record);

    int insertSelective(UnifiedCustomerOperatorOrg record);

    List<UnifiedCustomerOperatorOrg> selectByExample(OperationCenterCustomerOperatorOrgExample example);

    UnifiedCustomerOperatorOrg selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") UnifiedCustomerOperatorOrg record, @Param("example") OperationCenterCustomerOperatorOrgExample example);

    int updateByExample(@Param("record") UnifiedCustomerOperatorOrg record, @Param("example") OperationCenterCustomerOperatorOrgExample example);

    int updateByPrimaryKeySelective(UnifiedCustomerOperatorOrg record);

    int updateByPrimaryKey(UnifiedCustomerOperatorOrg record);

    void insertBatch(List<UnifiedCustomerOperatorOrg> centerCustomerOperatorOrgList);

    @Update("update unified_customer_operator_org set update_time =NOW(),update_user_id=#{userId},deleted=1 where customer_id=#{customerId}")
    void deleteByCustomerId(Long customerId, Long userId);
}