2 Star 4 Fork 5

联犀/中台模块

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
routes.go 43.51 KB
一键复制 编辑 原始数据 按行查看 历史
杨磊 提交于 2024-10-10 21:56 . feat: 更新mod
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651
// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.1
package handler
import (
"net/http"
systemaccessapi "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/access/api"
systemaccessinfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/access/info"
systemappinfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/app/info"
systemappmodule "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/app/module"
systemareainfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/area/info"
systemareaprofile "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/area/profile"
systemcommon "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/common"
systemdataarea "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/data/area"
systemdataareauserapply "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/data/area/user/apply"
systemdataopenaccess "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/data/open/access"
systemdataproject "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/data/project"
systemdictdetail "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/dict/detail"
systemdictinfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/dict/info"
systemjobtask "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/job/task"
systemlog "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/log"
systemmoduleinfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/module/info"
systemmodulemenu "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/module/menu"
systemnotifychannel "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/notify/channel"
systemnotifyconfig "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/notify/config"
systemnotifyconfigtemplate "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/notify/config/template"
systemnotifymessageinfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/notify/message/info"
systemnotifytemplate "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/notify/template"
systemopsfeedback "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/ops/feedback"
systemopsworkOrder "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/ops/workOrder"
systemprojectinfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/project/info"
systemprojectprofile "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/project/profile"
systemroleaccess "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/role/access"
systemroleapp "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/role/app"
systemroleinfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/role/info"
systemrolemenu "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/role/menu"
systemrolemodule "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/role/module"
systemslotinfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/slot/info"
systemtenantaccessinfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/tenant/access/info"
systemtenantagreement "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/tenant/agreement"
systemtenantapp "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/tenant/app"
systemtenantappcore "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/tenant/app/core"
systemtenantappmenu "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/tenant/app/menu"
systemtenantappmodule "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/tenant/app/module"
systemtenantconfig "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/tenant/config"
systemtenantcore "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/tenant/core"
systemtenantinfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/tenant/info"
systemuserinfo "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/user/info"
systemuserrole "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/user/role"
systemuserself "gitee.com/unitedrhino/core/service/apisvr/internal/handler/system/user/self"
"gitee.com/unitedrhino/core/service/apisvr/internal/svc"
"github.com/zeromicro/go-zero/rest"
)
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加接口
Method: http.MethodPost,
Path: "/create",
Handler: systemaccessapi.CreateHandler(serverCtx),
},
{
// 删除接口
Method: http.MethodPost,
Path: "/delete",
Handler: systemaccessapi.DeleteHandler(serverCtx),
},
{
// 获取接口列表
Method: http.MethodPost,
Path: "/index",
Handler: systemaccessapi.IndexHandler(serverCtx),
},
{
// 更新接口
Method: http.MethodPost,
Path: "/update",
Handler: systemaccessapi.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/access/api"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加访问权限信息
Method: http.MethodPost,
Path: "/create",
Handler: systemaccessinfo.CreateHandler(serverCtx),
},
{
// 删除访问权限信息
Method: http.MethodPost,
Path: "/delete",
Handler: systemaccessinfo.DeleteHandler(serverCtx),
},
{
// 获取访问权限信息列表
Method: http.MethodPost,
Path: "/index",
Handler: systemaccessinfo.IndexHandler(serverCtx),
},
{
// 批量导入授权
Method: http.MethodPost,
Path: "/multi-import",
Handler: systemaccessinfo.MultiImportHandler(serverCtx),
},
{
// 获取访问权限信息树结构
Method: http.MethodPost,
Path: "/tree",
Handler: systemaccessinfo.TreeHandler(serverCtx),
},
{
// 更新访问权限信息
Method: http.MethodPost,
Path: "/update",
Handler: systemaccessinfo.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/access/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加应用
Method: http.MethodPost,
Path: "/create",
Handler: systemappinfo.CreateHandler(serverCtx),
},
{
// 删除应用
Method: http.MethodPost,
Path: "/delete",
Handler: systemappinfo.DeleteHandler(serverCtx),
},
{
// 获取应用列表
Method: http.MethodPost,
Path: "/index",
Handler: systemappinfo.IndexHandler(serverCtx),
},
{
// 获取应用详情
Method: http.MethodPost,
Path: "/read",
Handler: systemappinfo.ReadHandler(serverCtx),
},
{
// 更新应用
Method: http.MethodPost,
Path: "/update",
Handler: systemappinfo.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/app/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取APP权限列表
Method: http.MethodPost,
Path: "/index",
Handler: systemappmodule.IndexHandler(serverCtx),
},
{
// 更新APP权限
Method: http.MethodPost,
Path: "/multi-update",
Handler: systemappmodule.MultiUpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/app/module"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 新增项目区域
Method: http.MethodPost,
Path: "/create",
Handler: systemareainfo.CreateHandler(serverCtx),
},
{
// 删除项目区域
Method: http.MethodPost,
Path: "/delete",
Handler: systemareainfo.DeleteHandler(serverCtx),
},
{
// 获取项目区域列表
Method: http.MethodPost,
Path: "/index",
Handler: systemareainfo.IndexHandler(serverCtx),
},
{
// 获取项目区域详情
Method: http.MethodPost,
Path: "/read",
Handler: systemareainfo.ReadHandler(serverCtx),
},
{
// 更新项目区域
Method: http.MethodPost,
Path: "/update",
Handler: systemareainfo.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/area/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取区域配置列表
Method: http.MethodPost,
Path: "/index",
Handler: systemareaprofile.ProfileIndexHandler(serverCtx),
},
{
// 获取区域配置详情
Method: http.MethodPost,
Path: "/read",
Handler: systemareaprofile.ProfileReadHandler(serverCtx),
},
{
// 更新区域配置
Method: http.MethodPost,
Path: "/update",
Handler: systemareaprofile.ProfileUpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/area/profile"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取系统配置
Method: http.MethodPost,
Path: "/config",
Handler: systemcommon.ConfigHandler(serverCtx),
},
{
// 获取小程序二维码
Method: http.MethodPost,
Path: "/qr-code/read",
Handler: systemcommon.QRCodeReadReqHandler(serverCtx),
},
{
// 文件直传
Method: http.MethodPost,
Path: "/upload-file",
Handler: systemcommon.UploadFileHandler(serverCtx),
},
{
// 获取文件上传地址
Method: http.MethodPost,
Path: "/upload-url/create",
Handler: systemcommon.UploadUrlCreateHandler(serverCtx),
},
{
// 获取天气情况
Method: http.MethodPost,
Path: "/weather/read",
Handler: systemcommon.WeatherReadHandler(serverCtx),
},
{
// websocket连接
Method: http.MethodGet,
Path: "/websocket/connect",
Handler: systemcommon.WebsocketConnectHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/common"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.InitCtxsWare},
[]rest.Route{
{
// debug
Method: http.MethodPost,
Path: "/debug",
Handler: systemcommon.DebugPostHandler(serverCtx),
},
{
// debug
Method: http.MethodGet,
Path: "/debug",
Handler: systemcommon.DebugGetHandler(serverCtx),
},
{
// debugTencent
Method: http.MethodGet,
Path: "/debug-tencent",
Handler: systemcommon.DebugGetTencentHandler(serverCtx),
},
{
// ntp
Method: http.MethodPost,
Path: "/ntp/read",
Handler: systemcommon.NtpReadHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/common"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取区域权限列表
Method: http.MethodPost,
Path: "/index",
Handler: systemdataarea.IndexHandler(serverCtx),
},
{
// 删除授权区域权限
Method: http.MethodPost,
Path: "/multi-delete",
Handler: systemdataarea.MultiDeleteHandler(serverCtx),
},
{
// 更新授权区域权限
Method: http.MethodPost,
Path: "/multi-update",
Handler: systemdataarea.MultiUpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/data/area"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 授权区域权限
Method: http.MethodPost,
Path: "/deal",
Handler: systemdataareauserapply.DealHandler(serverCtx),
},
{
// 获取区域权限列表
Method: http.MethodPost,
Path: "/index",
Handler: systemdataareauserapply.IndexHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/data/area/user/apply"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 创建开放认证
Method: http.MethodPost,
Path: "/create",
Handler: systemdataopenaccess.CreateHandler(serverCtx),
},
{
// 删除开放认证
Method: http.MethodPost,
Path: "/delete",
Handler: systemdataopenaccess.DeleteHandler(serverCtx),
},
{
// 获取开放认证列表
Method: http.MethodPost,
Path: "/index",
Handler: systemdataopenaccess.IndexHandler(serverCtx),
},
{
// 获取开放认证详情
Method: http.MethodPost,
Path: "/read",
Handler: systemdataopenaccess.ReadHandler(serverCtx),
},
{
// 更新开放认证
Method: http.MethodPost,
Path: "/update",
Handler: systemdataopenaccess.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/open/access"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 批量创建授权项目权限
Method: http.MethodPost,
Path: "/create",
Handler: systemdataproject.CreateHandler(serverCtx),
},
{
// 删除授权项目权限
Method: http.MethodPost,
Path: "/delete",
Handler: systemdataproject.DeleteHandler(serverCtx),
},
{
// 获取项目权限列表
Method: http.MethodPost,
Path: "/index",
Handler: systemdataproject.ProjectIndexHandler(serverCtx),
},
{
// 批量更新授权项目权限
Method: http.MethodPost,
Path: "/multi-update",
Handler: systemdataproject.ProjectMultiUpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/data/project"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加字典详情
Method: http.MethodPost,
Path: "/create",
Handler: systemdictdetail.CreateHandler(serverCtx),
},
{
// 删除字典详情
Method: http.MethodPost,
Path: "/delete",
Handler: systemdictdetail.DeleteHandler(serverCtx),
},
{
// 获取字典详情列表
Method: http.MethodPost,
Path: "/index",
Handler: systemdictdetail.IndexHandler(serverCtx),
},
{
// 获取字典详情单个
Method: http.MethodPost,
Path: "/read",
Handler: systemdictdetail.ReadHandler(serverCtx),
},
{
// 更新字典详情
Method: http.MethodPost,
Path: "/update",
Handler: systemdictdetail.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/dict/detail"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加字典信息
Method: http.MethodPost,
Path: "/create",
Handler: systemdictinfo.CreateHandler(serverCtx),
},
{
// 删除字典信息
Method: http.MethodPost,
Path: "/delete",
Handler: systemdictinfo.DeleteHandler(serverCtx),
},
{
// 获取字典信息列表
Method: http.MethodPost,
Path: "/index",
Handler: systemdictinfo.IndexHandler(serverCtx),
},
{
// 获取字典信息详情
Method: http.MethodPost,
Path: "/read",
Handler: systemdictinfo.ReadHandler(serverCtx),
},
{
// 更新字典信息
Method: http.MethodPost,
Path: "/update",
Handler: systemdictinfo.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/dict/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
Method: http.MethodPost,
Path: "/cancel",
Handler: systemjobtask.CancelHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/group/create",
Handler: systemjobtask.GroupCreateHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/group/delete",
Handler: systemjobtask.GroupDeleteHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/group/index",
Handler: systemjobtask.GroupIndexHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/group/read",
Handler: systemjobtask.GroupReadHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/group/update",
Handler: systemjobtask.GroupUpdateHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/info/create",
Handler: systemjobtask.InfoCreateHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/info/delete",
Handler: systemjobtask.InfoDeleteHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/info/index",
Handler: systemjobtask.InfoIndexHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/info/read",
Handler: systemjobtask.InfoReadHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/info/update",
Handler: systemjobtask.InfoUpdateHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/log/index",
Handler: systemjobtask.LogIndexHandler(serverCtx),
},
{
// 发送延时请求,如果任务不存在,则会自动创建,但是自动创建的需要填写param
Method: http.MethodPost,
Path: "/send",
Handler: systemjobtask.SendHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/job/task"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取登录日志列表
Method: http.MethodPost,
Path: "/login/index",
Handler: systemlog.LoginIndexHandler(serverCtx),
},
{
// 获取操作日志列表
Method: http.MethodPost,
Path: "/oper/index",
Handler: systemlog.OperIndexHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/log"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加模块
Method: http.MethodPost,
Path: "/create",
Handler: systemmoduleinfo.CreateHandler(serverCtx),
},
{
// 删除模块
Method: http.MethodPost,
Path: "/delete",
Handler: systemmoduleinfo.DeleteHandler(serverCtx),
},
{
// 获取模块列表
Method: http.MethodPost,
Path: "/index",
Handler: systemmoduleinfo.IndexHandler(serverCtx),
},
{
// 获取模块详情
Method: http.MethodPost,
Path: "/read",
Handler: systemmoduleinfo.ReadHandler(serverCtx),
},
{
// 更新模块
Method: http.MethodPost,
Path: "/update",
Handler: systemmoduleinfo.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/module/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加菜单
Method: http.MethodPost,
Path: "/create",
Handler: systemmodulemenu.CreateHandler(serverCtx),
},
{
// 删除菜单
Method: http.MethodPost,
Path: "/delete",
Handler: systemmodulemenu.DeleteHandler(serverCtx),
},
{
// 获取菜单列表
Method: http.MethodPost,
Path: "/index",
Handler: systemmodulemenu.IndexHandler(serverCtx),
},
{
// 更新菜单
Method: http.MethodPost,
Path: "/update",
Handler: systemmodulemenu.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/module/menu"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加通知通道
Method: http.MethodPost,
Path: "/create",
Handler: systemnotifychannel.CreateHandler(serverCtx),
},
{
// 删除通知通道
Method: http.MethodPost,
Path: "/delete",
Handler: systemnotifychannel.DeleteHandler(serverCtx),
},
{
// 获取通知通道列表
Method: http.MethodPost,
Path: "/index",
Handler: systemnotifychannel.IndexHandler(serverCtx),
},
{
// 获取通知通道详情
Method: http.MethodPost,
Path: "/read",
Handler: systemnotifychannel.ReadHandler(serverCtx),
},
{
// 更新通知通道
Method: http.MethodPost,
Path: "/update",
Handler: systemnotifychannel.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/notify/channel"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加通知配置
Method: http.MethodPost,
Path: "/create",
Handler: systemnotifyconfig.CreateHandler(serverCtx),
},
{
// 删除通知配置
Method: http.MethodPost,
Path: "/delete",
Handler: systemnotifyconfig.DeleteHandler(serverCtx),
},
{
// 获取通知列表
Method: http.MethodPost,
Path: "/index",
Handler: systemnotifyconfig.IndexHandler(serverCtx),
},
{
// 获取通知详情
Method: http.MethodPost,
Path: "/read",
Handler: systemnotifyconfig.ReadHandler(serverCtx),
},
{
// 获取通知列表树
Method: http.MethodPost,
Path: "/tree",
Handler: systemnotifyconfig.TreeHandler(serverCtx),
},
{
// 更新通知配置
Method: http.MethodPost,
Path: "/update",
Handler: systemnotifyconfig.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/notify/config"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 删除通知绑定模版
Method: http.MethodPost,
Path: "/delete",
Handler: systemnotifyconfigtemplate.DeleteHandler(serverCtx),
},
{
// 获取通知绑定模版列表
Method: http.MethodPost,
Path: "/index",
Handler: systemnotifyconfigtemplate.IndexHandler(serverCtx),
},
{
// 更新通知绑定模版
Method: http.MethodPost,
Path: "/update",
Handler: systemnotifyconfigtemplate.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/notify/config/template"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 删除消息
Method: http.MethodPost,
Path: "/delete",
Handler: systemnotifymessageinfo.DeleteHandler(serverCtx),
},
{
// 获取消息列表
Method: http.MethodPost,
Path: "/index",
Handler: systemnotifymessageinfo.IndexHandler(serverCtx),
},
{
// 发送消息
Method: http.MethodPost,
Path: "/send",
Handler: systemnotifymessageinfo.SendHandler(serverCtx),
},
{
// 更新消息
Method: http.MethodPost,
Path: "/update",
Handler: systemnotifymessageinfo.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/notify/message/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加通知模版
Method: http.MethodPost,
Path: "/create",
Handler: systemnotifytemplate.CreateHandler(serverCtx),
},
{
// 删除通知模版
Method: http.MethodPost,
Path: "/delete",
Handler: systemnotifytemplate.DeleteHandler(serverCtx),
},
{
// 获取通知模版列表
Method: http.MethodPost,
Path: "/index",
Handler: systemnotifytemplate.IndexHandler(serverCtx),
},
{
// 获取通知模版详情
Method: http.MethodPost,
Path: "/read",
Handler: systemnotifytemplate.ReadHandler(serverCtx),
},
{
// 更新通知模版
Method: http.MethodPost,
Path: "/update",
Handler: systemnotifytemplate.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/notify/template"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加帮助与反馈
Method: http.MethodPost,
Path: "/feedback/create",
Handler: systemopsfeedback.CreateHandler(serverCtx),
},
{
// 获取帮助与反馈
Method: http.MethodPost,
Path: "/feedback/index",
Handler: systemopsfeedback.IndexHandler(serverCtx),
},
{
// 更新帮助与反馈
Method: http.MethodPost,
Path: "/feedback/update",
Handler: systemopsfeedback.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/ops"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加工单
Method: http.MethodPost,
Path: "/work-order/create",
Handler: systemopsworkOrder.CreateHandler(serverCtx),
},
{
// 获取工单列表
Method: http.MethodPost,
Path: "/work-order/index",
Handler: systemopsworkOrder.IndexHandler(serverCtx),
},
{
// 更新工单
Method: http.MethodPost,
Path: "/work-order/update",
Handler: systemopsworkOrder.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/ops"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 新增项目
Method: http.MethodPost,
Path: "/create",
Handler: systemprojectinfo.CreateHandler(serverCtx),
},
{
// 删除项目
Method: http.MethodPost,
Path: "/delete",
Handler: systemprojectinfo.DeleteHandler(serverCtx),
},
{
// 获取项目列表
Method: http.MethodPost,
Path: "/index",
Handler: systemprojectinfo.IndexHandler(serverCtx),
},
{
// 获取项目详情
Method: http.MethodPost,
Path: "/read",
Handler: systemprojectinfo.ReadHandler(serverCtx),
},
{
// 更新项目
Method: http.MethodPost,
Path: "/update",
Handler: systemprojectinfo.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/project/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取项目配置列表
Method: http.MethodPost,
Path: "/index",
Handler: systemprojectprofile.ProfileIndexHandler(serverCtx),
},
{
// 获取项目配置详情
Method: http.MethodPost,
Path: "/read",
Handler: systemprojectprofile.ProfileReadHandler(serverCtx),
},
{
// 更新项目配置
Method: http.MethodPost,
Path: "/update",
Handler: systemprojectprofile.ProfileUpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/project/profile"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取操作权限列表
Method: http.MethodPost,
Path: "/index",
Handler: systemroleaccess.IndexHandler(serverCtx),
},
{
// 更新操作权限
Method: http.MethodPost,
Path: "/multi-update",
Handler: systemroleaccess.MultiUpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/role/access"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取APP权限列表
Method: http.MethodPost,
Path: "/index",
Handler: systemroleapp.IndexHandler(serverCtx),
},
{
// 更新APP权限
Method: http.MethodPost,
Path: "/multi-update",
Handler: systemroleapp.MultiUpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/role/app"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加角色
Method: http.MethodPost,
Path: "/create",
Handler: systemroleinfo.CreateHandler(serverCtx),
},
{
// 删除角色
Method: http.MethodPost,
Path: "/delete",
Handler: systemroleinfo.DeleteHandler(serverCtx),
},
{
// 获取角色列表
Method: http.MethodPost,
Path: "/index",
Handler: systemroleinfo.IndexHandler(serverCtx),
},
{
// 更新角色
Method: http.MethodPost,
Path: "/update",
Handler: systemroleinfo.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/role/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取角色对应菜单列表
Method: http.MethodPost,
Path: "/index",
Handler: systemrolemenu.IndexHandler(serverCtx),
},
{
// 更新角色对应菜单列表
Method: http.MethodPost,
Path: "/multi-update",
Handler: systemrolemenu.MulitUpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/role/menu"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取角色对应模块列表
Method: http.MethodPost,
Path: "/index",
Handler: systemrolemodule.IndexHandler(serverCtx),
},
{
// 更新角色对应模块列表
Method: http.MethodPost,
Path: "/multi-update",
Handler: systemrolemodule.MulitUpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/role/module"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 新增插槽
Method: http.MethodPost,
Path: "/create",
Handler: systemslotinfo.CreateHandler(serverCtx),
},
{
// 删除插槽
Method: http.MethodPost,
Path: "/delete",
Handler: systemslotinfo.DeleteHandler(serverCtx),
},
{
// 获取插槽列表
Method: http.MethodPost,
Path: "/index",
Handler: systemslotinfo.IndexHandler(serverCtx),
},
{
// 获取插槽详情
Method: http.MethodPost,
Path: "/read",
Handler: systemslotinfo.ReadHandler(serverCtx),
},
{
// 更新插槽
Method: http.MethodPost,
Path: "/update",
Handler: systemslotinfo.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/slot/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取租户操作权限列表
Method: http.MethodPost,
Path: "/index",
Handler: systemtenantaccessinfo.IndexHandler(serverCtx),
},
{
// 批量创建租户操作权限
Method: http.MethodPost,
Path: "/multi-create",
Handler: systemtenantaccessinfo.MultiCreateHandler(serverCtx),
},
{
// 批量删除租户操作权限
Method: http.MethodPost,
Path: "/multi-delete",
Handler: systemtenantaccessinfo.MultiDeleteHandler(serverCtx),
},
{
// 批量更新租户操作权限
Method: http.MethodPost,
Path: "/multi-update",
Handler: systemtenantaccessinfo.MultiUpdateHandler(serverCtx),
},
{
// 获取租户操作权限树
Method: http.MethodPost,
Path: "/tree",
Handler: systemtenantaccessinfo.TreeHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/tenant/access/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加协议
Method: http.MethodPost,
Path: "/create",
Handler: systemtenantagreement.CreateHandler(serverCtx),
},
{
// 删除协议
Method: http.MethodPost,
Path: "/delete",
Handler: systemtenantagreement.DeleteHandler(serverCtx),
},
{
// 获取协议列表
Method: http.MethodPost,
Path: "/index",
Handler: systemtenantagreement.IndexHandler(serverCtx),
},
{
// 更新协议
Method: http.MethodPost,
Path: "/update",
Handler: systemtenantagreement.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/tenant/agreement"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取协议详情
Method: http.MethodPost,
Path: "/read",
Handler: systemtenantagreement.ReadHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/tenant/agreement"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 绑定租户应用
Method: http.MethodPost,
Path: "/create",
Handler: systemtenantapp.CreateHandler(serverCtx),
},
{
// 解绑租户应用
Method: http.MethodPost,
Path: "/delete",
Handler: systemtenantapp.DeleteHandler(serverCtx),
},
{
// 获取租户应用列表
Method: http.MethodPost,
Path: "/index",
Handler: systemtenantapp.IndexHandler(serverCtx),
},
{
// 更新租户应用
Method: http.MethodPost,
Path: "/update",
Handler: systemtenantapp.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/tenant/app"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取应用信息
Method: http.MethodPost,
Path: "/read",
Handler: systemtenantappcore.ReadHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/tenant/app/core"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 创建租户应用菜单
Method: http.MethodPost,
Path: "/create",
Handler: systemtenantappmenu.CreateHandler(serverCtx),
},
{
// 删除租户应用菜单
Method: http.MethodPost,
Path: "/delete",
Handler: systemtenantappmenu.DeleteHandler(serverCtx),
},
{
// 获取租户应用菜单列表
Method: http.MethodPost,
Path: "/index",
Handler: systemtenantappmenu.IndexHandler(serverCtx),
},
{
// 更新租户应用菜单
Method: http.MethodPost,
Path: "/update",
Handler: systemtenantappmenu.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/tenant/app/menu"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 新增租户应用模块
Method: http.MethodPost,
Path: "/create",
Handler: systemtenantappmodule.CreateHandler(serverCtx),
},
{
// 删除租户应用模块
Method: http.MethodPost,
Path: "/delete",
Handler: systemtenantappmodule.DeleteHandler(serverCtx),
},
{
// 获取租户应用模块列表
Method: http.MethodPost,
Path: "/index",
Handler: systemtenantappmodule.IndexHandler(serverCtx),
},
{
// 批量新增租户应用模块
Method: http.MethodPost,
Path: "/multi-create",
Handler: systemtenantappmodule.MultiCreateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/tenant/app/module"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取租户配置
Method: http.MethodPost,
Path: "/read",
Handler: systemtenantconfig.ReadHandler(serverCtx),
},
{
// 更新租户配置
Method: http.MethodPost,
Path: "/update",
Handler: systemtenantconfig.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/tenant/config"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.InitCtxsWare},
[]rest.Route{
{
// 搜索租户信息
Method: http.MethodPost,
Path: "/index",
Handler: systemtenantcore.IndexHandler(serverCtx),
},
{
// 获取租户信息
Method: http.MethodPost,
Path: "/read",
Handler: systemtenantcore.ReadHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/tenant/core"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 添加租户
Method: http.MethodPost,
Path: "/create",
Handler: systemtenantinfo.CreateHandler(serverCtx),
},
{
// 删除租户
Method: http.MethodPost,
Path: "/delete",
Handler: systemtenantinfo.DeleteHandler(serverCtx),
},
{
// 获取租户列表
Method: http.MethodPost,
Path: "/index",
Handler: systemtenantinfo.IndexHandler(serverCtx),
},
{
// 获取租户详情
Method: http.MethodPost,
Path: "/read",
Handler: systemtenantinfo.ReadHandler(serverCtx),
},
{
// 更新租户
Method: http.MethodPost,
Path: "/update",
Handler: systemtenantinfo.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/tenant/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 创建用户信息
Method: http.MethodPost,
Path: "/create",
Handler: systemuserinfo.CreateHandler(serverCtx),
},
{
// 刪除用户
Method: http.MethodPost,
Path: "/delete",
Handler: systemuserinfo.DeleteHandler(serverCtx),
},
{
// 查询用户信息列表
Method: http.MethodPost,
Path: "/index",
Handler: systemuserinfo.IndexHandler(serverCtx),
},
{
// 获取用户信息
Method: http.MethodPost,
Path: "/read",
Handler: systemuserinfo.ReadHandler(serverCtx),
},
{
// 更新用户基本数据
Method: http.MethodPost,
Path: "/update",
Handler: systemuserinfo.UpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/user/info"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取用户角色列表
Method: http.MethodPost,
Path: "/index",
Handler: systemuserrole.RoleIndexHandler(serverCtx),
},
{
// 更新用户的角色列表
Method: http.MethodPost,
Path: "/multi-update",
Handler: systemuserrole.RoleMultiUpdateHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/user/role"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.CheckTokenWare, serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取用户授权树
Method: http.MethodPost,
Path: "/access/tree",
Handler: systemuserself.AccessTreeHandler(serverCtx),
},
{
// 获取用户应用列表
Method: http.MethodPost,
Path: "/app/index",
Handler: systemuserself.AppIndexHandler(serverCtx),
},
{
// 申请用户区域权限
Method: http.MethodPost,
Path: "/area/apply/create",
Handler: systemuserself.AreaApplyCreateHandler(serverCtx),
},
{
// 注销用户
Method: http.MethodPost,
Path: "/cancel",
Handler: systemuserself.CancelHandler(serverCtx),
},
{
// 更新用户密码
Method: http.MethodPost,
Path: "/change-pwd",
Handler: systemuserself.ChangePwdHandler(serverCtx),
},
{
// 获取用户菜单列表
Method: http.MethodPost,
Path: "/menu/index",
Handler: systemuserself.MenuIndexHandler(serverCtx),
},
{
// 用户消息列表
Method: http.MethodPost,
Path: "/message/index",
Handler: systemuserself.MessageIndexHandler(serverCtx),
},
{
// 用户消息批量已读
Method: http.MethodPost,
Path: "/message/multi-is-read",
Handler: systemuserself.MessageMultiIsReadHandler(serverCtx),
},
{
// 用户消息统计
Method: http.MethodPost,
Path: "/message/statistics",
Handler: systemuserself.MessageStatisticsHandler(serverCtx),
},
{
// 获取用户模块列表
Method: http.MethodPost,
Path: "/module/index",
Handler: systemuserself.ModuleIndexHandler(serverCtx),
},
{
// 获取用户配置列表
Method: http.MethodPost,
Path: "/profile/index",
Handler: systemuserself.ProfileIndexHandler(serverCtx),
},
{
// 获取用户配置详情
Method: http.MethodPost,
Path: "/profile/read",
Handler: systemuserself.ProfileReadHandler(serverCtx),
},
{
// 更新用户配置
Method: http.MethodPost,
Path: "/profile/update",
Handler: systemuserself.ProfileUpdateHandler(serverCtx),
},
{
// 获取用户信息
Method: http.MethodPost,
Path: "/read",
Handler: systemuserself.ReadHandler(serverCtx),
},
{
// 更新用户基本数据
Method: http.MethodPost,
Path: "/update",
Handler: systemuserself.UpdateHandler(serverCtx),
},
{
// 精准搜索用户
Method: http.MethodPost,
Path: "/user/search",
Handler: systemuserself.UserSearchHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/user/self"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.InitCtxsWare},
[]rest.Route{
{
// 获取用户应用详情
Method: http.MethodPost,
Path: "/app/read",
Handler: systemuserself.AppReadHandler(serverCtx),
},
{
// 获取验证码
Method: http.MethodPost,
Path: "/captcha",
Handler: systemuserself.CaptchaHandler(serverCtx),
},
{
// 忘记密码
Method: http.MethodPost,
Path: "/forget-pwd",
Handler: systemuserself.ForgetPwdHandler(serverCtx),
},
{
// 用户登录
Method: http.MethodPost,
Path: "/login",
Handler: systemuserself.LoginHandler(serverCtx),
},
{
// 用户注册
Method: http.MethodPost,
Path: "/register",
Handler: systemuserself.RegisterHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/system/user/self"),
)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/unitedrhino/core.git
git@gitee.com:unitedrhino/core.git
unitedrhino
core
中台模块
v0.2.3

搜索帮助