File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 11package router
22
33import (
4- "time"
5-
64ginzap "github.com/gin-contrib/zap"
75"github.com/gin-gonic/gin"
86swaggerFiles "github.com/swaggo/files"
@@ -12,7 +10,7 @@ import (
1210"controller"
1311)
1412
15- // 初始化路由
13+ // InitRouter 初始化路由
1614func InitRouter (port string ) {
1715r := gin .New ()
1816
@@ -23,17 +21,12 @@ func InitRouter(port string) {
2321r .Use (gin .Recovery ())
2422
2523// 将api调用记录全部存放到zap日志中去
26- r .Use (ginzap .Ginzap (zap .L (), time . RFC3339 , false ))
24+ r .Use (ginzap .Ginzap (zap .L (), "2006-01-02 15:04:05.000" , false ))
2725
28- // 添加用户
2926r .POST ("/gwt/api/v1/user" , controller .AddUser )
30- // 删除用户
3127r .DELETE ("/gwt/api/v1/user" , controller .DeleteUser )
32- // 修改用户
3328r .PUT ("/gwt/api/v1/user" , controller .UpdateUser )
34- // id查询单用户
3529r .GET ("/gwt/api/v1/user/:id" , controller .GetUser )
36- // 多条件分页查询
3730r .POST ("/gwt/api/v1/users" )
3831
3932// swagger
You can’t perform that action at this time.
0 commit comments