package com.casic.missiles.modular.web.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.casic.missiles.modular.system.model.ConfigNbCucc;
import com.casic.missiles.modular.web.service.IConfigNbCuccService;
import com.casic.missiles.modular.system.dao.ConfigNbCuccMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lwh123
 * @since 2018-11-16
 */
@Service
@Transactional
public class ConfigNbCuccServiceImpl extends ServiceImpl<ConfigNbCuccMapper, ConfigNbCucc> implements IConfigNbCuccService {


    @Override
    public ConfigNbCucc getConfigByDept(Long deptid) {
        List<ConfigNbCucc> list = this.baseMapper.getConfigByDept(deptid);
        if (null != list && list.isEmpty() == false) {
            return list.get(0);
        } else {
            return null;
        }
    }
}
