package com.bonus.sgzb.machine.service.impl;

import com.bonus.sgzb.machine.mapper.MaTypeKeeperMapper;
import com.bonus.sgzb.machine.service.IMaTypeKeeperService;
import com.bonus.sgzb.machine.vo.DeptUser;
import com.bonus.sgzb.machine.vo.MaTypeKeeperVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 库管员配置ma_type_keeper(MaTypeKeeper)表服务实现类
 *
 * @author makejava
 * @since 2023-11-28 15:34:03
 */
@Service("maTypeKeeperService")
public class MaTypeKeeperServiceImpl implements IMaTypeKeeperService {

    @Autowired
    private MaTypeKeeperMapper maTypeKeeperMapper;

    /**
     * 根据人员名称查询左侧列表
     * @param userName
     * @return
     */
    @Override
    public List<DeptUser> getMaUserList(String userName) {

        return maTypeKeeperMapper.selectUserList(userName);
    }

    /**
     * 根据userId查询右侧列表
     * @param userId
     * @param typeName
     * @return
     */
    @Override
    public List<MaTypeKeeperVO> getListByMaType(Long userId, String typeName) {

        return maTypeKeeperMapper.selectListByUserId(userId, typeName);
    }
}

