CustomerBaseRelationMapper.java 1.18 KB
package cn.com.glsx.entmicro.mapper;

import cn.com.glsx.entmicro.entity.CustomerBaseRelation;
import cn.com.glsx.entmicro.model.response.ChatNumResponse;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
public interface CustomerBaseRelationMapper extends CommonBaseMapper<CustomerBaseRelation> {
    int deleteByCustomerBaseId(@Param("customerBaseId") Integer customerBaseId);

    List<CustomerBaseRelation> findByCustomerId(@Param("customerBaseId") Integer id);

    List<ChatNumResponse> getChatNum(@Param("idList") List<Integer> idList);

    void updatelist(@Param("list") List<CustomerBaseRelation> updatelist);

    void deletelist(@Param("list") List<CustomerBaseRelation> deletelist);

    /**
     * 根据客户id获取客户群昵称
     * @param idList
     * @return
     */
    @MapKey("customerId")
    Map<Integer,CustomerBaseRelation> getNickNameByCustId(@Param("idList") List<Integer> idList);

    CustomerBaseRelation findFirstCustomerByCustomerId(@Param("customerBaseId") Integer id);
}