feat: 网元版本追加网元neType和neID查询
This commit is contained in:
@@ -167,6 +167,30 @@ func (s *NeLicenseController) Remove(c *gin.Context) {
|
|||||||
c.JSON(200, result.OkMsg(msg))
|
c.JSON(200, result.OkMsg(msg))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 网元neType和neID查询
|
||||||
|
//
|
||||||
|
// GET /byTypeAndID
|
||||||
|
func (s *NeLicenseController) NeTypeAndID(c *gin.Context) {
|
||||||
|
language := ctx.AcceptLanguage(c)
|
||||||
|
var querys struct {
|
||||||
|
NeType string `form:"neType" binding:"required"`
|
||||||
|
NeId string `form:"neId" binding:"required"`
|
||||||
|
}
|
||||||
|
if err := c.ShouldBindQuery(&querys); err != nil {
|
||||||
|
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
neLicense := s.neLicenseService.SelectByNeTypeAndNeID(querys.NeType, querys.NeId)
|
||||||
|
if neLicense.NeId != querys.NeId {
|
||||||
|
// 没有可访问网元授权激活数据!
|
||||||
|
c.JSON(200, result.ErrMsg(i18n.TKey(language, "neLicense.noData")))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
c.JSON(200, result.OkData(neLicense))
|
||||||
|
}
|
||||||
|
|
||||||
// 网元授权激活授权申请码
|
// 网元授权激活授权申请码
|
||||||
//
|
//
|
||||||
// GET /code
|
// GET /code
|
||||||
|
|||||||
Reference in New Issue
Block a user