| 123456789101112131415161718192021222324252627 |
- package controllers
- import (
- "github.com/kataras/iris/v12/mvc"
- "xps/service/system"
- )
- type AppPermitController struct {
- Base
- Service system.AppPermitService
- }
- func (c *AppPermitController) BeforeActivation(b mvc.BeforeActivation) {
- b.Handle("GET", "/", "GetByList")
- }
- func (c *AppPermitController) GetByList() *JsonResult {
- var appKey = c.Ctx.Values().GetString("appKey")
- var keywords string
- if c.Ctx.URLParamExists("keywords") {
- keywords = c.Ctx.URLParam("keywords")
- }
- data := c.Service.GetByList(appKey, 1, keywords)
- return ResultOk("获取成功", data)
- }
|