2 Star 4 Fork 5

联犀/中台模块

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
wsRoutes.go 43.44 KB
一键复制 编辑 原始数据 按行查看 历史
杨磊 提交于 2024-10-10 21:56 . feat: 更新mod
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650
// Code generated by goctl. DO NOT EDIT.
package handler
import (
ws "gitee.com/unitedrhino/share/websocket"
"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 RegisterWsHandlers(server *ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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),
},
}...,
),
ws.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

搜索帮助