feat: 网元参数配置应用申请列表功能接口
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
// 网元参数配置应用申请提交(仅学生操作)
|
||||
|
||||
@@ -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"}}),
|
||||
|
||||
Reference in New Issue
Block a user