参数修改
This commit is contained in:
parent
7cc5f90068
commit
4239f980c5
@ -251,8 +251,12 @@ public class SysIotModelController {
|
|||||||
|
|
||||||
/** 物模型属性修改 */
|
/** 物模型属性修改 */
|
||||||
@PostMapping("/attribute/getAllSubsystem")
|
@PostMapping("/attribute/getAllSubsystem")
|
||||||
public R<List<String>> getAllSubsystem() {
|
public R<List<String>> getAllSubsystem(@RequestBody SysIotModelFieldDto sysIotModelFieldDto) {
|
||||||
List<String> allSubsystem = sysIotModelService.getAllSubsystem();
|
Long iotModelId = sysIotModelFieldDto.getIotModelId();
|
||||||
|
if (iotModelId == null){
|
||||||
|
throw new ServiceException("参数物模型id不存在");
|
||||||
|
}
|
||||||
|
List<String> allSubsystem = sysIotModelService.getAllSubsystem(iotModelId);
|
||||||
return R.success(allSubsystem);
|
return R.success(allSubsystem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,6 @@ public interface SysIotModelFieldMapper extends BaseMapperPlus<SysIotModelField,
|
|||||||
*/
|
*/
|
||||||
List<SysIotModelFieldVo> selectModelFieldListByModelId(@Param("modelId") Long modelId);
|
List<SysIotModelFieldVo> selectModelFieldListByModelId(@Param("modelId") Long modelId);
|
||||||
|
|
||||||
List<String> getAllSubsystem();
|
List<String> getAllSubsystem(@Param("modelId") Long iotModelId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,6 @@ public interface SysIotModelService {
|
|||||||
|
|
||||||
List<SysIotModelVo> getSysIotModelByType(Integer objectType);
|
List<SysIotModelVo> getSysIotModelByType(Integer objectType);
|
||||||
|
|
||||||
List<String> getAllSubsystem();
|
List<String> getAllSubsystem(Long iotModelId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -545,8 +545,8 @@ public class SysIotModelServiceImpl implements SysIotModelService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getAllSubsystem() {
|
public List<String> getAllSubsystem(Long iotModelId) {
|
||||||
return sysIotModelFieldMapper.getAllSubsystem();
|
return sysIotModelFieldMapper.getAllSubsystem(iotModelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createTdStableOrColumn(SysIotModelField sysIotModelField) {
|
public void createTdStableOrColumn(SysIotModelField sysIotModelField) {
|
||||||
|
@ -65,6 +65,6 @@
|
|||||||
select * from sys_iot_model_field where iot_model_id = #{modelId} order by porder
|
select * from sys_iot_model_field where iot_model_id = #{modelId} order by porder
|
||||||
</select>
|
</select>
|
||||||
<select id="getAllSubsystem" resultType="java.lang.String">
|
<select id="getAllSubsystem" resultType="java.lang.String">
|
||||||
select distinct simf.subsystem from sys_iot_model_field simf
|
select distinct simf.subsystem from sys_iot_model_field simf where simf.iot_model_id = #{modelId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user