完成向上级联->选择通道-003

This commit is contained in:
panlinlin
2021-01-13 17:08:26 +08:00
parent b613747153
commit f082797d9b
14 changed files with 285 additions and 60 deletions

View File

@@ -151,15 +151,21 @@ public class PlatformController {
@RequestMapping("/platforms/channelList")
@ResponseBody
public PageInfo<ChannelReduce> channelList(int page, int count,
@RequestParam(required = false) String platformId,
@RequestParam(required = false) String query,
@RequestParam(required = false) Boolean online,
@RequestParam(required = false) Boolean choosed,
@RequestParam(required = false) Boolean channelType){
if (logger.isDebugEnabled()) {
logger.debug("查询所有所有通道API调用");
}
PageInfo<ChannelReduce> channelReduces = storager.queryChannelListInAll(page, count, query, online, channelType, null);
PageInfo<ChannelReduce> channelReduces = null;
if (platformId != null ) {
channelReduces = storager.queryAllChannelList(page, count, query, online, channelType, platformId, choosed);
}else {
channelReduces = storager.queryAllChannelList(page, count, query, online, channelType, null, false);
}
return channelReduces;
}
@@ -177,5 +183,17 @@ public class PlatformController {
return new ResponseEntity<>(String.valueOf(result > 0), HttpStatus.OK);
}
@RequestMapping("/platforms/delChannelForGB")
@ResponseBody
public ResponseEntity<String> delChannelForGB(@RequestBody UpdateChannelParam param){
if (logger.isDebugEnabled()) {
logger.debug("给上级平台添加国标通道API调用");
}
int result = storager.delChannelForGB(param.getPlatformId(), param.getChannelReduces());
return new ResponseEntity<>(String.valueOf(result > 0), HttpStatus.OK);
}
}

View File

@@ -35,6 +35,11 @@ public class ChannelReduce {
*/
private int subCount;
/**
* 平台Id
*/
private String platformId;
public String getChannelId() {
return channelId;
@@ -75,4 +80,20 @@ public class ChannelReduce {
public void setHostAddress(String hostAddress) {
this.hostAddress = hostAddress;
}
public int getSubCount() {
return subCount;
}
public void setSubCount(int subCount) {
this.subCount = subCount;
}
public String getPlatformId() {
return platformId;
}
public void setPlatformId(String platformId) {
this.platformId = platformId;
}
}