package com.dxhy.admin.sys.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dxhy.admin.sys.entity.SysUserBusinessEntity;

/**
 * 用户和业务单元关联表
 *
 * @author jiaohongyang
 */
@Mapper
public interface SysUserBusinessDao extends BaseMapper<SysUserBusinessEntity> {
    /**
     * 修改业务单元
     * 
     * @param businessCode
     *            业务单元编码
     * @param businessName
     *            业务单元名称
     * @param businessId
     *            业务单元id
     */
    void updateBusinessId(@Param("businessCode") String businessCode, @Param("businessName") String businessName,
        @Param("businessId") Long businessId);

    /**
     * 根据用户id 查询业务单元
     * 
     * @param userId
     *            用户id
     * @return 业务单元id
     */
    List<Long> queryBusinessIdList(Long userId);
}
