feat: 网元参数配置应用申请列表功能接口
This commit is contained in:
@@ -26,20 +26,14 @@ type PtNeConfigApplyController struct {
|
|||||||
ptNeConfigDataService service.IPtNeConfigDataService
|
ptNeConfigDataService service.IPtNeConfigDataService
|
||||||
}
|
}
|
||||||
|
|
||||||
// 网元参数配置应用申请信息
|
// 网元参数配置应用申请列表
|
||||||
//
|
//
|
||||||
// GET /
|
// GET /list
|
||||||
func (s *PtNeConfigApplyController) Info(c *gin.Context) {
|
func (s *PtNeConfigApplyController) List(c *gin.Context) {
|
||||||
language := ctx.AcceptLanguage(c)
|
querys := ctx.QueryMap(c)
|
||||||
id, idOk := c.GetQuery("id")
|
data := s.ptNeConfigApplyService.SelectPage(querys)
|
||||||
if !idOk {
|
|
||||||
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
data := s.ptNeConfigApplyService.SelectById(id)
|
c.JSON(200, result.Ok(data))
|
||||||
|
|
||||||
c.JSON(200, result.OkData(data))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 网元参数配置应用申请提交(仅学生操作)
|
// 网元参数配置应用申请提交(仅学生操作)
|
||||||
|
|||||||
@@ -66,9 +66,9 @@ func Setup(router *gin.Engine) {
|
|||||||
// 网元参数配置应用申请
|
// 网元参数配置应用申请
|
||||||
neConfigApplyGroup := ptGroup.Group("/neConfigApply")
|
neConfigApplyGroup := ptGroup.Group("/neConfigApply")
|
||||||
{
|
{
|
||||||
neConfigApplyGroup.GET("",
|
neConfigApplyGroup.GET("/list",
|
||||||
middleware.PreAuthorize(nil),
|
middleware.PreAuthorize(nil),
|
||||||
controller.NewPtNeConfigApply.Info,
|
controller.NewPtNeConfigApply.List,
|
||||||
)
|
)
|
||||||
neConfigApplyGroup.POST("",
|
neConfigApplyGroup.POST("",
|
||||||
middleware.PreAuthorize(map[string][]string{"hasRoles": {"student"}}),
|
middleware.PreAuthorize(map[string][]string{"hasRoles": {"student"}}),
|
||||||
|
|||||||
Reference in New Issue
Block a user