package com.yifu.cloud.plus.v1.yifu.archives.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TCutsomerDataPermissonVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 客户数据权限表
 *
 * @author pwang
 * @date 2019-07-19 10:39:28
 */
@Mapper
public interface TCutsomerDataPermissonMapper extends BaseMapper<TCutsomerDataPermisson> {
  /**
   * 分页count
   * @Author pwang
   * @Date 2020-06-28 15:25
   * @param tCutsomerDataPermisson
   * @return
   **/
   long getTCutsomerDataPermissonPageCount( @Param("tCutsomerDataPermisson")TCutsomerDataPermisson tCutsomerDataPermisson);

  /**
    * 客户数据权限表简单分页查询
    * @param tCutsomerDataPermisson 客户数据权限表
    * @return
    */
    List<TCutsomerDataPermissonVo> getTCutsomerDataPermissonPage(@Param("tCutsomerDataPermisson") TCutsomerDataPermissonVo tCutsomerDataPermisson, @Param("page")Long page, @Param("size")Long size);


    String getOwnerIdByIdAndType(@Param("domainId")String domainId, @Param("type")int type);

    /**
     * 获取当前登录人拥有的所有结算主体权限
     * @Author fxj
     * @Date 2019-08-26
     * @param userId
     * @return
     **/
    List<TCutsomerDataPermisson> selectAllSettleDomainPermissionByUserId(@Param("userId")int userId);

    String getCustomerServiceByid(@Param("id")String id);

    String getUserByid(@Param("settleId")String settleId);
}
