MQTT通讯联调

This commit is contained in:
2023-08-09 20:31:51 +08:00
parent b32cf6c486
commit 123fdf4f04
12 changed files with 70 additions and 16 deletions

View File

@@ -165,4 +165,17 @@ public class EquipmentDeliveryController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/updateSoftInfoBynDid")
@ApiOperation("根据网关id调整软件信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "nDId", value = "网关id", required = true),
@ApiImplicitParam(name = "id", value = "软件信息id", required = true)
})
public HttpResult<Boolean> updateSoftInfoBynDid(@RequestParam("nDId") String nDid,@RequestParam("id") String id){
String methodDescribe = getMethodDescribe("updateSoftInfoBynDid");
csEquipmentDeliveryService.updateSoftInfoBynDid(nDid,id);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
}

View File

@@ -76,4 +76,10 @@ public interface CsEquipmentDeliveryService extends IService<CsEquipmentDelivery
* @return
*/
DeviceManagerVO getDeviceData(String deviceId,String type,String lineId);
/**
* 根据网关id修改软件信息
* @param nDid 网关id
*/
void updateSoftInfoBynDid(String nDid,String id);
}

View File

@@ -254,4 +254,11 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
return deviceManagerVo;
}
@Override
public void updateSoftInfoBynDid(String nDid, String id) {
LambdaUpdateWrapper<CsEquipmentDeliveryPO> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
lambdaUpdateWrapper.set(CsEquipmentDeliveryPO::getSoftinfoId,id).eq(CsEquipmentDeliveryPO::getNdid,nDid);
this.update(lambdaUpdateWrapper);
}
}