package com.fdkankan.modeling.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fdkankan.modeling.entity.SceneProExt;
import com.fdkankan.modeling.mapper.ISceneProExtMapper;
import com.fdkankan.modeling.service.ISceneProExtService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * pro场景表 服务实现类
 * </p>
 *
 * @author dengsixing
 * @since 2021-12-23
 */
@Service
public class SceneProExtServiceImpl extends ServiceImpl<ISceneProExtMapper, SceneProExt> implements ISceneProExtService {

    @Override
    public SceneProExt getBySceneProId(Long id) {
        QueryWrapper<SceneProExt> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(SceneProExt::getSceneProId,id);
        List<SceneProExt> list = this.list(queryWrapper);
        if(list == null || list.size()<=0){
            return null;
        }
        return list.get(0);
    }
}
