das接口修改

This commit is contained in:
chenhaojie 2024-07-08 15:44:40 +08:00
parent f1506a233d
commit 6b7bdb7442
3 changed files with 7 additions and 8 deletions

View File

@ -7,10 +7,10 @@ public interface EquipmentTypeIds {
/**
* 风电场
*/
Long EQUIPMENT_TYPE_WIND_FARM = 10001L;
Integer EQUIPMENT_TYPE_WIND_FARM = 10001;
/**
* 风力发电机组
* Wind Turbine Generator
*/
Long EQUIPMENT_TYPE_STATION_WTG = 10002L;
Integer EQUIPMENT_TYPE_STATION_WTG = 10002;
}

View File

@ -73,10 +73,10 @@ public class EquipmentController {
@PostMapping("/update")
public R<SysEquipmentVo> updateSysEquipment(@RequestBody SysEquipmentDto sysEquipmentDto) {
//判断是否有权限
boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_DEVICE_MGR.toString());
if(!hasPermission){
return R.fail("没有设备管理权限");
}
// boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_DEVICE_MGR.toString());
// if(!hasPermission){
// return R.fail("没有设备管理权限");
// }
if (sysEquipmentDto.getOrgId() == null) {
throw new ServiceException("参数缺失");

View File

@ -16,8 +16,7 @@ public class EquipmentTypeVo implements Serializable {
/**
* 设备类型ID
*/
@JsonSerialize(using = ToStringSerializer.class)
public Long equipmentTypeId;
public Integer equipmentTypeId;
/**
* 设备类型名称
*/