feat: 网元参数配置应用申请列表功能接口

This commit is contained in:
TsMask
2024-07-15 18:00:19 +08:00
parent 12025f6ac7
commit 33e58a3118
2 changed files with 8 additions and 14 deletions

View File

@@ -26,20 +26,14 @@ type PtNeConfigApplyController struct {
ptNeConfigDataService service.IPtNeConfigDataService
}
// 网元参数配置应用申请信息
// 网元参数配置应用申请列表
//
// GET /
func (s *PtNeConfigApplyController) Info(c *gin.Context) {
language := ctx.AcceptLanguage(c)
id, idOk := c.GetQuery("id")
if !idOk {
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
return
}
// GET /list
func (s *PtNeConfigApplyController) List(c *gin.Context) {
querys := ctx.QueryMap(c)
data := s.ptNeConfigApplyService.SelectPage(querys)
data := s.ptNeConfigApplyService.SelectById(id)
c.JSON(200, result.OkData(data))
c.JSON(200, result.Ok(data))
}
// 网元参数配置应用申请提交(仅学生操作)

View File

@@ -66,9 +66,9 @@ func Setup(router *gin.Engine) {
// 网元参数配置应用申请
neConfigApplyGroup := ptGroup.Group("/neConfigApply")
{
neConfigApplyGroup.GET("",
neConfigApplyGroup.GET("/list",
middleware.PreAuthorize(nil),
controller.NewPtNeConfigApply.Info,
controller.NewPtNeConfigApply.List,
)
neConfigApplyGroup.POST("",
middleware.PreAuthorize(map[string][]string{"hasRoles": {"student"}}),