package com.sptg.third.biz.topsailiot.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.sptg.third.api.entity.topsailiot.TopsailProject;
import com.sptg.third.biz.mapper.topsailiot.TopsailProjectMapper;
import com.sptg.third.biz.topsailiot.service.TopsailProjectServiceInterface;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author zwx
 * @create 2020/12/6 11:04
 */
@Service
@RequiredArgsConstructor
public class TopsailProjectServiceImpl extends ServiceImpl<TopsailProjectMapper, TopsailProject> implements TopsailProjectServiceInterface {
    @Override
    public TopsailProject getByProjectId(Integer projectId) {
        Wrapper<TopsailProject> wrapper = new EntityWrapper<>();
        wrapper.eq("i_project_id", projectId);
        TopsailProject topsailProject = this.selectOne(wrapper);
        return topsailProject;
    }
}
