You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.4 KiB
100 lines
2.4 KiB
package com.psdc.mapper;
|
|
|
|
import com.psdc.entity.PsdcScene;
|
|
import com.psdc.entity.vo.SceneVo;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 场景设定;(psdc_scene)表数据库访问层
|
|
* @author : http://www.chiner.pro
|
|
* @date : 2023-5-10
|
|
*/
|
|
@Mapper
|
|
public interface PsdcSceneMapper{
|
|
/**
|
|
* 通过ID查询单条数据
|
|
*
|
|
* @param sceneId 主键
|
|
* @return 实例对象
|
|
*/
|
|
PsdcScene queryById(Integer sceneId);
|
|
|
|
List<PsdcScene> sceneList(@Param(value = "userId") Long userId);
|
|
|
|
|
|
/**
|
|
* 新增数据
|
|
*
|
|
* @param psdcScene 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int insert(PsdcScene psdcScene);
|
|
|
|
/**
|
|
* 更新数据
|
|
*
|
|
* @param psdcScene 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int update(PsdcScene psdcScene);
|
|
/**
|
|
* 通过主键删除数据
|
|
*
|
|
* @param sceneId 主键
|
|
* @return 影响行数
|
|
*/
|
|
int deleteById(Integer sceneId);
|
|
|
|
/**
|
|
* 根据用户ID查询策略信息
|
|
* @param userId
|
|
* @return
|
|
*/
|
|
List<SceneVo> queryByUserId(Long userId);
|
|
|
|
/**
|
|
* 根据策略码查询策略
|
|
* @param sceneCode 策略码
|
|
* @return 策略列表
|
|
*/
|
|
List<PsdcScene> queryBySceneCode(Integer sceneCode);
|
|
|
|
/**
|
|
* 获取场景名称分组
|
|
* @param userId
|
|
* @return
|
|
*/
|
|
List<String> querySceneGroup(Long userId);
|
|
|
|
/**
|
|
* 根据设备id获取配置场景
|
|
* @param userId
|
|
* @param deviceId
|
|
* @return
|
|
*/
|
|
List<SceneVo> querySceneByDeviceId(@Param(value = "userId") Long userId,
|
|
@Param(value = "deviceId") Integer deviceId);
|
|
|
|
/**
|
|
* 根据设备id获取配置场景
|
|
* @param userId
|
|
* @param deviceId
|
|
* @return
|
|
*/
|
|
List<SceneVo> querySceneByDeviceIdAndSceneName(@Param(value = "userId") Long userId,
|
|
@Param(value = "deviceId") Integer deviceId,
|
|
@Param(value = "sceneName") String sceneName);
|
|
|
|
/**
|
|
* 根据策略名称查询策略信息
|
|
* @param sceneName
|
|
* @return
|
|
*/
|
|
List<SceneVo> queryBySceneName(String sceneName);
|
|
|
|
List<SceneVo> findSceneByUserAndSceneName(@Param(value = "userId") Long userId,
|
|
@Param(value = "sceneName") String sceneName);
|
|
} |