mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-10-31 02:28:03 +08:00 
			
		
		
		
	修改:IOT 物模型接口接口优化
This commit is contained in:
		| @ -29,9 +29,10 @@ public interface IotThinkModelFunctionMapper extends BaseMapperX<IotThinkModelFu | |||||||
|                 IotThinkModelFunctionDO::getType, type); |                 IotThinkModelFunctionDO::getType, type); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     default List<IotThinkModelFunctionDO> selectListByProductIdAndTypes(Long productId, List<Integer> list) { |     default List<IotThinkModelFunctionDO> selectListByProductIdAndIdentifiersAndTypes(Long productId, List<String> list, List<Integer> list1){ | ||||||
|         return selectList(new LambdaQueryWrapperX<IotThinkModelFunctionDO>() |         return selectList(new LambdaQueryWrapperX<IotThinkModelFunctionDO>() | ||||||
|                 .eq(IotThinkModelFunctionDO::getProductId, productId) |                 .eq(IotThinkModelFunctionDO::getProductId, productId) | ||||||
|                 .in(IotThinkModelFunctionDO::getType, list)); |                 .in(IotThinkModelFunctionDO::getIdentifier, list) | ||||||
|  |                 .in(IotThinkModelFunctionDO::getType, list1)); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -175,9 +175,10 @@ public class IotThinkModelFunctionServiceImpl implements IotThinkModelFunctionSe | |||||||
|             newFunctionList.add(getServiceFunction); |             newFunctionList.add(getServiceFunction); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // 2. 获取数据库中的旧事件和服务列表 |         // 2. 获取数据库中的默认的旧事件和服务列表 | ||||||
|         List<IotThinkModelFunctionDO> oldFunctionList = thinkModelFunctionMapper.selectListByProductIdAndTypes( |         List<IotThinkModelFunctionDO> oldFunctionList = thinkModelFunctionMapper.selectListByProductIdAndIdentifiersAndTypes( | ||||||
|                 productId, |                 productId, | ||||||
|  |                 Arrays.asList("post", "set", "get"), | ||||||
|                 Arrays.asList(IotThingModelTypeEnum.EVENT.getType(), IotThingModelTypeEnum.SERVICE.getType()) |                 Arrays.asList(IotThingModelTypeEnum.EVENT.getType(), IotThingModelTypeEnum.SERVICE.getType()) | ||||||
|         ); |         ); | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 安浩浩
					安浩浩