This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-argus-service/src/main/java/com/nis/web/service/restful/TrafficNmsServerStatisticService.java
2018-10-26 10:48:13 +08:00

29 lines
1.0 KiB
Java

package com.nis.web.service.restful;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.nis.domain.restful.TrafficNmsServerStatistic;
import com.nis.web.dao.TrafficNmsServerStatisticDao;
@Service
public class TrafficNmsServerStatisticService {
@Autowired
TrafficNmsServerStatisticDao trafficNmsServerStatisticDao;
@Transactional
public void saveNmsInfo(List<TrafficNmsServerStatistic> trafficNmsServerList) {
for (TrafficNmsServerStatistic trafficNmsServerStatistic : trafficNmsServerList) {
trafficNmsServerStatisticDao.insert(trafficNmsServerStatistic);
if (trafficNmsServerStatistic.getAbnormalMachineList() != null
&& trafficNmsServerStatistic.getAbnormalMachineList().size() > 0) {
trafficNmsServerStatisticDao.insertAbnormalMachine(trafficNmsServerStatistic.getId(),
trafficNmsServerStatistic.getAbnormalMachineList());
}
}
}
}