安装go-admin
# Get backend code
git clone https://github.com/go-admin-team/go-admin.git
# Get the front-end code
git clone https://github.com/go-admin-team/go-admin-ui.git
router
整个路由系统分成两个部分来处理。
由init_router
进入,分sys_router.go
和router.go
两条线分别处理系统路由和业务路由
api流程
数据请求api接口
api -> 处理逻辑并返回结果
dto -> 分不同功能,处理对应的请求参数
model -> 生成表结构和表名以及id等基本信息
service -> 操作mysql数据