|
@@ -15,23 +15,9 @@ func InitRoute(r *gin.Engine) {
|
|
|
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
|
|
business := r.Group("/youngee")
|
|
|
{
|
|
|
- business.POST("/register", handler.WrapRegisterHandler) // 商家主账号注册
|
|
|
- business.POST("/sendCode", handler.WrapSendCodeHandler) // 发送登录验证码
|
|
|
- business.POST("/login", handler.WrapCodeLoginHandler) // 商家登录
|
|
|
- business.POST("/subAccount/create", handler.WrapAddNewSubAccountHandler) // 商家子账号注册
|
|
|
- business.POST("/subAccount/get", handler.WrapFindAllSubAccountHandler) // 查找商家全部所属子账号
|
|
|
- business.POST("/subAccount/delete", handler.WrapDeleteSubAccountHandler) // 删除商家子账号
|
|
|
- business.POST("/subAccount/update", handler.WrapFindAllSubAccountHandler) // 修改商家子账号
|
|
|
- business.POST("/job/get", handler.WrapFindAllJobHandler) // 查找商家全部所属岗位
|
|
|
- business.POST("/job/create", handler.WrapaddNewJobHandler) // 商家新增岗位
|
|
|
- business.POST("/job/update", handler.WrapupdateJobHandler) // 商家修改岗位
|
|
|
- business.POST("/job/delete", handler.WrapdeleteJobHandler) // 商家删除岗位
|
|
|
- business.POST("/getUserInfo", handler.WrapGetUserInfoHandler) // 商家用户信息
|
|
|
- business.POST("/accountInfo/get", handler.WrapGetAccountInfoHandler) // 账号管理-账号信息查询
|
|
|
- business.POST("/accountInfo/update", handler.WrapUpdateAccountInfoHandler) // 账号管理-账号信息更新
|
|
|
- business.POST("/reviewInfo/get", handler.WrapGetReviewInfoHandler) // 账号管理-认证信息查询
|
|
|
- business.POST("/contactInfo/get", handler.WrapGetContactInfoHandler) // 联系方式-查询
|
|
|
- business.POST("/contactInfo/update", handler.WrapUpdateContactInfoHandler) // 联系方式-更新
|
|
|
+ business.POST("/register", handler.WrapRegisterHandler) // 商家主账号注册
|
|
|
+ business.POST("/sendCode", handler.WrapSendCodeHandler) // 发送登录验证码
|
|
|
+ business.POST("/login", handler.WrapCodeLoginHandler) // 商家登录
|
|
|
business.GET("/test/ping", func(c *gin.Context) {
|
|
|
resp := http_model.CommonResponse{
|
|
|
Status: 20000,
|
|
@@ -41,6 +27,36 @@ func InitRoute(r *gin.Engine) {
|
|
|
c.JSON(200, resp)
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ subAccount := r.Group("/youngee/subAccount")
|
|
|
+ {
|
|
|
+ subAccount.Use(middleware.LoginAuthMiddleware)
|
|
|
+ subAccount.POST("/create", handler.WrapAddNewSubAccountHandler) // 商家子账号注册
|
|
|
+ subAccount.POST("/get", handler.WrapFindAllSubAccountHandler) // 查找商家全部所属子账号
|
|
|
+ subAccount.POST("/delete", handler.WrapDeleteSubAccountHandler) // 删除商家子账号
|
|
|
+ subAccount.POST("/update", handler.WrapFindAllSubAccountHandler) // 修改商家子账号
|
|
|
+ }
|
|
|
+
|
|
|
+ job := r.Group("/youngee/job")
|
|
|
+ {
|
|
|
+ job.Use(middleware.LoginAuthMiddleware)
|
|
|
+ job.POST("/get", handler.WrapFindAllJobHandler) // 查找商家全部所属岗位
|
|
|
+ job.POST("/create", handler.WrapaddNewJobHandler) // 商家新增岗位
|
|
|
+ job.POST("/update", handler.WrapupdateJobHandler) // 商家修改岗位
|
|
|
+ job.POST("/delete", handler.WrapdeleteJobHandler) // 商家删除岗位
|
|
|
+ }
|
|
|
+
|
|
|
+ accountInfo := r.Group("/youngee")
|
|
|
+ {
|
|
|
+ accountInfo.Use(middleware.LoginAuthMiddleware)
|
|
|
+ accountInfo.POST("/getUserInfo", handler.WrapGetUserInfoHandler) // 商家用户信息
|
|
|
+ accountInfo.POST("/accountInfo/get", handler.WrapGetAccountInfoHandler) // 账号管理-账号信息查询
|
|
|
+ accountInfo.POST("/accountInfo/update", handler.WrapUpdateAccountInfoHandler) // 账号管理-账号信息更新
|
|
|
+ accountInfo.POST("/reviewInfo/get", handler.WrapGetReviewInfoHandler) // 账号管理-认证信息查询
|
|
|
+ accountInfo.POST("/contactInfo/get", handler.WrapGetContactInfoHandler) // 联系方式-查询
|
|
|
+ accountInfo.POST("/contactInfo/update", handler.WrapUpdateContactInfoHandler) // 联系方式-更新
|
|
|
+ }
|
|
|
+
|
|
|
//r.Any("/testDemo", func(c *gin.Context) {
|
|
|
// resp := http_model.CommonResponse{
|
|
|
// Status: 0,
|