Xingyu Xian 3 mesi fa
parent
commit
7df3f62a39
2 ha cambiato i file con 23 aggiunte e 19 eliminazioni
  1. 4 4
      config/pro.yaml
  2. 19 15
      route/init.go

+ 4 - 4
config/pro.yaml

@@ -17,14 +17,14 @@
 #   session:
 #     ttl: -1 #minute
 mysql:
-  host: 139.9.53.143
+  host: 1.92.142.62
   port: 3306
-  user: talent
-  password: talentDB_123
+  user: root
+  password: Younggee_root_DB_123
   database: youngmini
 
 redis:
-  host: 139.9.53.143
+  host: 1.92.142.62
   port: 6379
   auth: younggeeRedis_123
   database: 1

+ 19 - 15
route/init.go

@@ -12,21 +12,25 @@ import (
 
 func InitRoute(r *gin.Engine) {
 	r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler)) // nothing
-	r.POST("/register", handler.WrapRegisterHandler)                     // 服务商主账号注册
-	r.POST("/addNewSubAccount", handler.WrapAddNewSubAccountHandler)     // 服务商子账号注册
-	r.POST("/addNewJob", handler.WrapaddNewJobHandler)                   // 服务商新增岗位
-	r.POST("/updateJob", handler.WrapupdateJobHandler)                   // 服务商修改岗位
-	r.POST("/deleteJob", handler.WrapdeleteJobHandler)                   // 服务商删除岗位
-	r.POST("/sendCode", handler.WrapSendCodeHandler)                     // 发送登录验证码
-	r.POST("/login", handler.WrapCodeLoginHandler)                       // 服务商登录
-	r.GET("/test/ping", func(c *gin.Context) {
-		resp := http_model.CommonResponse{
-			Status:  0,
-			Message: "",
-			Data:    "ping",
-		}
-		c.JSON(200, resp)
-	})
+	a := r.Group("/youngee")
+	{
+		a.POST("/register", handler.WrapRegisterHandler)                 // 服务商主账号注册
+		a.POST("/addNewSubAccount", handler.WrapAddNewSubAccountHandler) // 服务商子账号注册
+		a.POST("/addNewJob", handler.WrapaddNewJobHandler)               // 服务商新增岗位
+		a.POST("/updateJob", handler.WrapupdateJobHandler)               // 服务商修改岗位
+		a.POST("/deleteJob", handler.WrapdeleteJobHandler)               // 服务商删除岗位
+		a.POST("/sendCode", handler.WrapSendCodeHandler)                 // 发送登录验证码
+		a.POST("/login", handler.WrapCodeLoginHandler)                   // 服务商登录
+		a.GET("/test/ping", func(c *gin.Context) {
+			resp := http_model.CommonResponse{
+				Status:  0,
+				Message: "",
+				Data:    "ping",
+			}
+			c.JSON(200, resp)
+		})
+	}
+
 	//r.Any("/testDemo", func(c *gin.Context) {
 	//	resp := http_model.CommonResponse{
 	//		Status:  0,