Fix operation status issue in app subscription

Fixes https://gitlab.com/entgra/product-iots/-/issues/999
merge-requests/818/head
Chamindu Senanayake 3 years ago
parent 8234ace3e2
commit 7776e19946

@ -44,6 +44,12 @@ public class OperationStatusBean {
) )
private String status; private String status;
@ApiModelProperty(
name = "operationCode",
value = "Operation Code."
)
private String operationCode;
public int getOperationId() { public int getOperationId() {
return operationId; return operationId;
} }
@ -59,4 +65,12 @@ public class OperationStatusBean {
public void setStatus(String status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
public String getOperationCode() {
return operationCode;
}
public void setOperationCode(String operationCode) {
this.operationCode = operationCode;
}
} }

@ -1417,6 +1417,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
} }
Operation operation = DeviceMgtAPIUtils.validateOperationStatusBean(operationStatusBean); Operation operation = DeviceMgtAPIUtils.validateOperationStatusBean(operationStatusBean);
operation.setId(operationStatusBean.getOperationId()); operation.setId(operationStatusBean.getOperationId());
operation.setCode(operationStatusBean.getOperationCode());
DeviceMgtAPIUtils.getDeviceManagementService().updateOperation(device, operation); DeviceMgtAPIUtils.getDeviceManagementService().updateOperation(device, operation);
if (MDMAppConstants.AndroidConstants.OPCODE_INSTALL_APPLICATION.equals(operation.getCode()) || if (MDMAppConstants.AndroidConstants.OPCODE_INSTALL_APPLICATION.equals(operation.getCode()) ||

Loading…
Cancel
Save