参数修改

This commit is contained in:
huguanghan 2024-12-18 09:24:04 +08:00
parent 7cc5f90068
commit 4239f980c5
5 changed files with 11 additions and 7 deletions

View File

@ -251,8 +251,12 @@ public class SysIotModelController {
/** 物模型属性修改 */
@PostMapping("/attribute/getAllSubsystem")
public R<List<String>> getAllSubsystem() {
List<String> allSubsystem = sysIotModelService.getAllSubsystem();
public R<List<String>> getAllSubsystem(@RequestBody SysIotModelFieldDto sysIotModelFieldDto) {
Long iotModelId = sysIotModelFieldDto.getIotModelId();
if (iotModelId == null){
throw new ServiceException("参数物模型id不存在");
}
List<String> allSubsystem = sysIotModelService.getAllSubsystem(iotModelId);
return R.success(allSubsystem);
}
}

View File

@ -33,6 +33,6 @@ public interface SysIotModelFieldMapper extends BaseMapperPlus<SysIotModelField,
*/
List<SysIotModelFieldVo> selectModelFieldListByModelId(@Param("modelId") Long modelId);
List<String> getAllSubsystem();
List<String> getAllSubsystem(@Param("modelId") Long iotModelId);
}

View File

@ -47,6 +47,6 @@ public interface SysIotModelService {
List<SysIotModelVo> getSysIotModelByType(Integer objectType);
List<String> getAllSubsystem();
List<String> getAllSubsystem(Long iotModelId);
}

View File

@ -545,8 +545,8 @@ public class SysIotModelServiceImpl implements SysIotModelService {
}
@Override
public List<String> getAllSubsystem() {
return sysIotModelFieldMapper.getAllSubsystem();
public List<String> getAllSubsystem(Long iotModelId) {
return sysIotModelFieldMapper.getAllSubsystem(iotModelId);
}
public void createTdStableOrColumn(SysIotModelField sysIotModelField) {

View File

@ -65,6 +65,6 @@
select * from sys_iot_model_field where iot_model_id = #{modelId} order by porder
</select>
<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>
</mapper>