.test insert controller method
This commit is contained in:
parent
a33b84405f
commit
8c656cb4d8
|
@ -6,6 +6,8 @@ import com.loafle.bridge.discoveryhost.DiscoveryHost;
|
||||||
import com.loafle.bridge.discoveryport.type.PortType;
|
import com.loafle.bridge.discoveryport.type.PortType;
|
||||||
import com.loafle.bridge.discoveryservice.DiscoveryService;
|
import com.loafle.bridge.discoveryservice.DiscoveryService;
|
||||||
import com.loafle.bridge.discoveryzone.DiscoveryZone;
|
import com.loafle.bridge.discoveryzone.DiscoveryZone;
|
||||||
|
import com.loafle.bridge.discoveryzone.HostScanHistory;
|
||||||
|
import com.loafle.bridge.discoveryzone.ResultType;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -64,7 +66,21 @@ public class DiscoveryPortController {
|
||||||
z.setIp(Long.parseLong(ip));
|
z.setIp(Long.parseLong(ip));
|
||||||
|
|
||||||
d.setZone(z);
|
d.setZone(z);
|
||||||
|
// host scan histories
|
||||||
|
List<HostScanHistory> hostScanHistories = new ArrayList<HostScanHistory>();
|
||||||
|
for( int indexI = 0 ; indexI < 5; ++indexI) {
|
||||||
|
HostScanHistory hostScanHistory = new HostScanHistory();
|
||||||
|
hostScanHistory.setIp(Long.parseLong(ip));
|
||||||
|
hostScanHistory.setCreateDate(new Date());
|
||||||
|
hostScanHistory.setSendDate(new Date());
|
||||||
|
hostScanHistory.setResultDate(new Date());
|
||||||
|
hostScanHistory.setDescription("hgihihihih");
|
||||||
|
hostScanHistory.setResultType(ResultType.Success);
|
||||||
|
hostScanHistory.setZone(z);
|
||||||
|
hostScanHistories.add(hostScanHistory);
|
||||||
|
}
|
||||||
|
|
||||||
|
z.setHostScanHistories(hostScanHistories);
|
||||||
|
|
||||||
List<DiscoveryHost> hl = new ArrayList<>();
|
List<DiscoveryHost> hl = new ArrayList<>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user