Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
851c332df8
@ -46,8 +46,8 @@ public class EventController {
|
||||
* @param deviceEventInfo 确认信息
|
||||
*/
|
||||
@PostMapping("/confirm")
|
||||
public R<Void> confirmEvent(@RequestBody DeviceEventInfo deviceEventInfo){
|
||||
eventService.confirmEvent(deviceEventInfo);
|
||||
public R<Void> confirmEvent(@RequestBody List<DeviceEventInfo> deviceEventInfoList){
|
||||
eventService.confirmEvent(deviceEventInfoList);
|
||||
return R.success();
|
||||
}
|
||||
}
|
||||
|
@ -9,5 +9,5 @@ import java.util.List;
|
||||
public interface EventService {
|
||||
List<DeviceEventInfo> queryEvent(EventQueryParam param);
|
||||
|
||||
void confirmEvent(DeviceEventInfo deviceEventInfo);
|
||||
void confirmEvent(List<DeviceEventInfo> deviceEventInfoList);
|
||||
}
|
||||
|
@ -31,11 +31,13 @@ public class EventServiceImpl implements EventService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void confirmEvent(DeviceEventInfo deviceEventInfo) {
|
||||
public void confirmEvent(List<DeviceEventInfo> deviceEventInfoList) {
|
||||
Long confirmTime = System.currentTimeMillis();
|
||||
deviceEventInfo.setConfirmTime(confirmTime);
|
||||
SysUserVo sysUserVo = (SysUserVo) StpUtil.getTokenSession().get(SessionUtil.SESSION_USER_KEY);
|
||||
deviceEventInfo.setConfirmAccount(sysUserVo.getAccount());
|
||||
tdEngineService.confirmEvent(deviceEventInfo);
|
||||
for (DeviceEventInfo deviceEventInfo : deviceEventInfoList){
|
||||
deviceEventInfo.setConfirmTime(confirmTime);
|
||||
SysUserVo sysUserVo = (SysUserVo) StpUtil.getTokenSession().get(SessionUtil.SESSION_USER_KEY);
|
||||
deviceEventInfo.setConfirmAccount(sysUserVo.getAccount());
|
||||
tdEngineService.confirmEvent(deviceEventInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user