feat: 网元列表查询带主机连接信息参数

This commit is contained in:
TsMask
2024-04-18 09:38:41 +08:00
parent c80fe5df67
commit 4164332755
3 changed files with 60 additions and 69 deletions

View File

@@ -120,7 +120,8 @@ func (s *NeInfoController) ListAll(c *gin.Context) {
var querys struct {
NeType string `form:"neType"`
NeId string `form:"neId"`
BandStatus string `form:"bandStatus"`
BandStatus bool `form:"bandStatus"`
BandHost bool `form:"bandHost"`
}
if err := c.ShouldBindQuery(&querys); err != nil {
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
@@ -135,8 +136,7 @@ func (s *NeInfoController) ListAll(c *gin.Context) {
if querys.NeId != "" {
ne.NeId = querys.NeId
}
bandStatus := parse.Boolean(querys.BandStatus)
neList := s.neInfoService.SelectList(ne, bandStatus)
neList := s.neInfoService.SelectList(ne, querys.BandStatus, querys.BandHost)
if len(neList) == 0 {
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
return