123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package com.fdkankan.agent.service.impl;
- import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
- import com.fdkankan.agent.entity.ScenePlus;
- import com.fdkankan.agent.mapper.IScenePlusMapper;
- import com.fdkankan.agent.service.IScenePlusService;
- import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
- import org.springframework.stereotype.Service;
- import java.util.List;
- /**
- * <p>
- * 场景主表 服务实现类
- * </p>
- *
- * @author
- * @since 2022-11-09
- */
- @Service
- public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlus> implements IScenePlusService {
- @Override
- public ScenePlus getByNum(String sceneNum) {
- LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
- wrapper.eq(ScenePlus::getNum,sceneNum);
- List<ScenePlus> list = this.list(wrapper);
- if(list!=null && list.size() >0){
- return list.get(0);
- }
- return null;
- }
- @Override
- public Long getCountByCameraId(Long cameraId) {
- LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
- wrapper.eq(ScenePlus::getCameraId,cameraId);
- wrapper.in(ScenePlus::getSceneStatus,0,-2);
- return this.count(wrapper);
- }
- }
|