权限修改
This commit is contained in:
parent
3c75f9cedf
commit
3915edc187
@ -392,6 +392,7 @@ public class AsyncHikvision {
|
||||
} else {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), e.getMessage(), "人员下发设备提醒", "1");
|
||||
}
|
||||
hikvisionCall.updateAllFailStatusIfNullByNowForAuth(workerInfo.getProjectSn(), workerInfo.getId(), 3, 1, ThreadLocalUtil.getNotNull().getDate("now"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -411,6 +412,7 @@ public class AsyncHikvision {
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), StringUtils.substring(msg, 0, msg.length() - 1), title, type);
|
||||
}
|
||||
hikvisionCall.updateAllFailStatusIfNullByNowForAuth(workerInfo.getProjectSn(), workerInfo.getId(), 3, 1, ThreadLocalUtil.getNotNull().getDate("now"));
|
||||
} catch (Exception e) {
|
||||
log.error("海康:", e);
|
||||
}
|
||||
@ -454,6 +456,7 @@ public class AsyncHikvision {
|
||||
} else {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), e.getMessage(), "人员下发设备提醒", "1");
|
||||
}
|
||||
hikvisionCall.updateAllFailStatusIfNullByNowForAuth(workerInfo.getProjectSn(), workerInfo.getId(), 3, 3, ThreadLocalUtil.getNotNull().getDate("now"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -473,6 +476,7 @@ public class AsyncHikvision {
|
||||
if (SecurityUtils.getUser() != null && SecurityUtils.getUser().getUserId() != null) {
|
||||
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), StringUtils.substring(msg, 0, msg.length() - 1), title, type);
|
||||
}
|
||||
hikvisionCall.updateAllFailStatusIfNullByNowForAuth(workerInfo.getProjectSn(), workerInfo.getId(), 3, 3, ThreadLocalUtil.getNotNull().getDate("now"));
|
||||
} catch (Exception e) {
|
||||
log.error("海康:", e);
|
||||
}
|
||||
|
||||
@ -1147,6 +1147,19 @@ public class HikvisionCall {
|
||||
}
|
||||
}
|
||||
|
||||
public void updateAllFailStatusIfNullByNowForAuth(String projectSn, Long whoId, Integer bigType, Integer operate, Date now) {
|
||||
xzHikvisionSyncMapper.update(null, new LambdaUpdateWrapper<XzHikvisionSync>()
|
||||
.set(XzHikvisionSync::getIsSuccess, 0)
|
||||
.isNull(XzHikvisionSync::getIsSuccess)
|
||||
.eq(XzHikvisionSync::getType, 3)
|
||||
.eq(XzHikvisionSync::getOperate, operate)
|
||||
.eq(XzHikvisionSync::getProjectSn, projectSn)
|
||||
.eq(XzHikvisionSync::getWhoId, whoId)
|
||||
.eq(XzHikvisionSync::getCreateDate, now)
|
||||
);
|
||||
updateTotalStatus(projectSn, whoId, bigType, now);
|
||||
}
|
||||
|
||||
public void updateAllFailStatusIfNullByNow(String projectSn, Long whoId, Integer bigType, Date now) {
|
||||
xzHikvisionSyncMapper.update(null, new LambdaUpdateWrapper<XzHikvisionSync>()
|
||||
.set(XzHikvisionSync::getIsSuccess, 0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user