package com.fdkankan.scene.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fdkankan.common.constant.TbStatus;
import com.fdkankan.scene.entity.SceneEditControls;
import com.fdkankan.scene.mapper.ISceneEditControlsMapper;
import com.fdkankan.scene.service.ISceneEditControlsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 
 * @since 2022-01-18
 */
@Service
public class SceneEditControlsServiceImpl extends ServiceImpl<ISceneEditControlsMapper, SceneEditControls> implements ISceneEditControlsService {

    @Override
    public SceneEditControls getBySceneEditId(long sceneEditInfoId) {
        return this.getOne(new LambdaQueryWrapper<SceneEditControls>()
                .eq(SceneEditControls::getTbStatus, TbStatus.VALID.code())
                .eq(SceneEditControls::getEditInfoId, sceneEditInfoId));
    }
}
