feat: 添加mesh和roaming功能
This commit is contained in:
@@ -16,6 +16,8 @@ import org.wfc.common.core.web.page.TableDataInfo;
|
||||
import org.wfc.omada.api.organization.model.CreateSiteEntity;
|
||||
import org.wfc.omada.api.organization.model.SiteEntity;
|
||||
import org.wfc.omada.api.organization.model.UpdateSiteEntity;
|
||||
import org.wfc.omada.api.sitesetting.model.SiteMeshSetting;
|
||||
import org.wfc.omada.api.sitesetting.model.SiteRoamingSetting;
|
||||
import org.wfc.system.service.ISysSiteService;
|
||||
|
||||
/**
|
||||
@@ -54,4 +56,25 @@ public class SysSiteController extends BaseController {
|
||||
public R<Boolean> deleteSite(@PathVariable(required = true) String siteId) {
|
||||
return R.ok(siteService.deleteSite(siteId));
|
||||
}
|
||||
|
||||
@GetMapping("/{siteId}/mesh")
|
||||
public R<SiteMeshSetting> getMeshSetting(@PathVariable(required = true) String siteId) {
|
||||
return R.ok(siteService.getMeshSetting(siteId));
|
||||
}
|
||||
|
||||
@GetMapping("/{siteId}/roaming")
|
||||
public R<SiteRoamingSetting> getRoamingSetting(@PathVariable(required = true) String siteId) {
|
||||
return R.ok(siteService.getRoamingSetting(siteId));
|
||||
}
|
||||
|
||||
@PostMapping("/{siteId}/mesh")
|
||||
public R<Boolean> updateMeshSetting(@PathVariable(required = true) String siteId, @RequestBody(required = false) SiteMeshSetting siteMeshSetting) {
|
||||
return R.ok(siteService.updateMeshSetting(siteId, siteMeshSetting));
|
||||
}
|
||||
|
||||
@PostMapping("/{siteId}/roaming")
|
||||
public R<Boolean> updateRoamingSetting(@PathVariable(required = true) String siteId, @RequestBody(required = false) SiteRoamingSetting siteRoamingSetting) {
|
||||
return R.ok(siteService.updateRoamingSetting(siteId, siteRoamingSetting));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import org.wfc.common.core.web.page.TableDataInfo;
|
||||
import org.wfc.omada.api.organization.model.CreateSiteEntity;
|
||||
import org.wfc.omada.api.organization.model.SiteEntity;
|
||||
import org.wfc.omada.api.organization.model.UpdateSiteEntity;
|
||||
import org.wfc.omada.api.sitesetting.model.SiteMeshSetting;
|
||||
import org.wfc.omada.api.sitesetting.model.SiteRoamingSetting;
|
||||
|
||||
/**
|
||||
* @description: site service
|
||||
@@ -21,4 +23,12 @@ public interface ISysSiteService {
|
||||
boolean updateSiteEntity(String siteId, UpdateSiteEntity updateSiteEntity);
|
||||
|
||||
boolean deleteSite(String siteId);
|
||||
|
||||
SiteMeshSetting getMeshSetting(String siteId);
|
||||
|
||||
boolean updateMeshSetting(String siteId, SiteMeshSetting siteMeshSetting);
|
||||
|
||||
SiteRoamingSetting getRoamingSetting(String siteId);
|
||||
|
||||
boolean updateRoamingSetting(String siteId, SiteRoamingSetting siteRoamingSetting);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,11 @@ import org.wfc.omada.api.organization.model.OperationResponseSiteEntity;
|
||||
import org.wfc.omada.api.organization.model.OperationResponseWithoutResult;
|
||||
import org.wfc.omada.api.organization.model.SiteEntity;
|
||||
import org.wfc.omada.api.organization.model.UpdateSiteEntity;
|
||||
import org.wfc.omada.api.sitesetting.OmadaSiteConfigurationApi;
|
||||
import org.wfc.omada.api.sitesetting.model.OperationResponseSiteMeshSetting;
|
||||
import org.wfc.omada.api.sitesetting.model.OperationResponseSiteRoamingSetting;
|
||||
import org.wfc.omada.api.sitesetting.model.SiteMeshSetting;
|
||||
import org.wfc.omada.api.sitesetting.model.SiteRoamingSetting;
|
||||
import org.wfc.system.service.ISysSiteService;
|
||||
|
||||
import java.util.Objects;
|
||||
@@ -29,6 +34,9 @@ public class SysSiteServiceImpl implements ISysSiteService {
|
||||
@Autowired
|
||||
private OmadaSiteApi omadaSiteApi;
|
||||
|
||||
@Autowired
|
||||
private OmadaSiteConfigurationApi omadaSiteConfigurationApi;
|
||||
|
||||
@Override
|
||||
public TableDataInfo getSiteList(Integer pageNum, Integer pageSize) {
|
||||
ResponseEntity<OperationResponseGridVoSiteSummaryInfo> response = omadaSiteApi.getSiteList(pageNum, pageSize);
|
||||
@@ -63,4 +71,33 @@ public class SysSiteServiceImpl implements ISysSiteService {
|
||||
ResponseUtils.checkResponse(Objects.requireNonNull(response.getBody()).getErrorCode(), response.getBody().getMsg());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SiteMeshSetting getMeshSetting(String siteId) {
|
||||
ResponseEntity<OperationResponseSiteMeshSetting> response = omadaSiteConfigurationApi.getMeshSetting(siteId);
|
||||
ResponseUtils.checkResponse(Objects.requireNonNull(response.getBody()).getErrorCode(), response.getBody().getMsg());
|
||||
return response.getBody().getResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateMeshSetting(String siteId, SiteMeshSetting siteMeshSetting) {
|
||||
ResponseEntity<org.wfc.omada.api.sitesetting.model.OperationResponseWithoutResult> response = omadaSiteConfigurationApi.updateMeshSetting(siteId, siteMeshSetting);
|
||||
ResponseUtils.checkResponse(Objects.requireNonNull(response.getBody()).getErrorCode(), response.getBody().getMsg());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SiteRoamingSetting getRoamingSetting(String siteId) {
|
||||
ResponseEntity<OperationResponseSiteRoamingSetting> response = omadaSiteConfigurationApi.getRoamingSetting(siteId);
|
||||
ResponseUtils.checkResponse(Objects.requireNonNull(response.getBody()).getErrorCode(), response.getBody().getMsg());
|
||||
return response.getBody().getResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateRoamingSetting(String siteId, SiteRoamingSetting siteRoamingSetting) {
|
||||
ResponseEntity<org.wfc.omada.api.sitesetting.model.OperationResponseWithoutResult> response = omadaSiteConfigurationApi.updateRoamingSetting(siteId, siteRoamingSetting);
|
||||
ResponseUtils.checkResponse(Objects.requireNonNull(response.getBody()).getErrorCode(), response.getBody().getMsg());
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user