mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
fixing issues with notification status not getting updated
This commit is contained in:
parent
deeeb2ce48
commit
de9cf67977
@ -99,11 +99,17 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl {
|
|||||||
|
|
||||||
if (rs.next()) {
|
if (rs.next()) {
|
||||||
byte[] operationDetails = rs.getBytes("OPERATION_DETAILS");
|
byte[] operationDetails = rs.getBytes("OPERATION_DETAILS");
|
||||||
|
int oppId = rs.getInt("OPERATION_ID");
|
||||||
bais = new ByteArrayInputStream(operationDetails);
|
bais = new ByteArrayInputStream(operationDetails);
|
||||||
ois = new ObjectInputStream(bais);
|
ois = new ObjectInputStream(bais);
|
||||||
Object obj = ois.readObject();
|
Object obj = ois.readObject();
|
||||||
if(obj instanceof String){
|
if(obj instanceof String){
|
||||||
|
Operation opp = super.getOperation(oppId);
|
||||||
profileOperation = new ProfileOperation();
|
profileOperation = new ProfileOperation();
|
||||||
|
profileOperation.setCode(opp.getCode());
|
||||||
|
profileOperation.setId(oppId);
|
||||||
|
profileOperation.setCreatedTimeStamp(opp.getCreatedTimeStamp());
|
||||||
|
profileOperation.setId(oppId);
|
||||||
profileOperation.setPayLoad(obj);
|
profileOperation.setPayLoad(obj);
|
||||||
} else {
|
} else {
|
||||||
profileOperation = (ProfileOperation) obj;
|
profileOperation = (ProfileOperation) obj;
|
||||||
@ -126,7 +132,7 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Operation> getOperationsByDeviceAndStatus(int enrolmentId,
|
public List<? extends Operation> getOperationsByDeviceAndStatus(int enrolmentId,
|
||||||
Operation.Status status) throws OperationManagementDAOException {
|
Operation.Status status) throws OperationManagementDAOException {
|
||||||
PreparedStatement stmt = null;
|
PreparedStatement stmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
ProfileOperation profileOperation;
|
ProfileOperation profileOperation;
|
||||||
@ -150,12 +156,17 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl {
|
|||||||
rs = stmt.executeQuery();
|
rs = stmt.executeQuery();
|
||||||
|
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
|
int oppId = rs.getInt("OPERATION_ID");
|
||||||
byte[] operationDetails = rs.getBytes("OPERATION_DETAILS");
|
byte[] operationDetails = rs.getBytes("OPERATION_DETAILS");
|
||||||
bais = new ByteArrayInputStream(operationDetails);
|
bais = new ByteArrayInputStream(operationDetails);
|
||||||
ois = new ObjectInputStream(bais);
|
ois = new ObjectInputStream(bais);
|
||||||
Object obj = ois.readObject();
|
Object obj = ois.readObject();
|
||||||
if(obj instanceof String){
|
if(obj instanceof String){
|
||||||
|
Operation opp = super.getOperation(oppId);
|
||||||
profileOperation = new ProfileOperation();
|
profileOperation = new ProfileOperation();
|
||||||
|
profileOperation.setCode(opp.getCode());
|
||||||
|
profileOperation.setId(oppId);
|
||||||
|
profileOperation.setCreatedTimeStamp(opp.getCreatedTimeStamp());
|
||||||
profileOperation.setPayLoad(obj);
|
profileOperation.setPayLoad(obj);
|
||||||
profileOperation.setStatus(status);
|
profileOperation.setStatus(status);
|
||||||
operationList.add(profileOperation);
|
operationList.add(profileOperation);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user