// @APIVersion 1.0.0
// @Title web Test API
// @Description web has a very cool tools to autogenerate documents for your API
// @Contact astaxie@gmail.com
// @TermsOfServiceUrl http://web.me/
// @License Apache 2.0
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
package routers

import (
	"git.rosy.net.cn/jx-callback/controllers"
	"github.com/astaxie/beego/server/web"
	beecontext "github.com/astaxie/beego/server/web/context"
)

func init() {
	ns := web.NewNamespace("/v2",
		web.NSNamespace("/order",
			web.NSInclude(
				&controllers.OrderController{},
			),
		),
		web.NSNamespace("/jxorder",
			web.NSInclude(
				&controllers.JxOrderController{},
			),
		),
		web.NSNamespace("/sku",
			web.NSInclude(
				&controllers.SkuController{},
			),
		),
		web.NSNamespace("/store",
			web.NSInclude(
				&controllers.StoreController{},
			),
		),
		// web.NSNamespace("/auth",
		// 	web.NSInclude(
		// 		&controllers.AuthController{},
		// 	),
		// ),
		web.NSNamespace("/cms",
			web.NSInclude(
				&controllers.CmsController{},
			),
		),
		// web.NSNamespace("/user",
		// 	web.NSInclude(
		// 		&controllers.UserController{},
		// 	),
		// ),
		web.NSNamespace("/store/sku",
			web.NSInclude(
				&controllers.StoreSkuController{},
			),
		),
		web.NSNamespace("/task",
			web.NSInclude(
				&controllers.TaskController{},
			),
		),
		web.NSNamespace("/financial",
			web.NSInclude(
				&controllers.FinancialController{},
			),
		),
		web.NSNamespace("/sync",
			web.NSInclude(
				&controllers.SyncController{},
			),
		),
		web.NSNamespace("/initdata",
			web.NSInclude(
				&controllers.InitDataController{},
			),
		),
		web.NSNamespace("/msg",
			web.NSInclude(
				&controllers.MsgController{},
			),
		),
		web.NSNamespace("/auth2",
			web.NSInclude(
				&controllers.Auth2Controller{},
			),
		),
		web.NSNamespace("/user2",
			web.NSInclude(
				&controllers.User2Controller{},
			),
		),
		web.NSNamespace("/ddapi",
			web.NSInclude(
				&controllers.DDAPIController{},
			),
		),
		web.NSNamespace("/tempop",
			web.NSInclude(
				&controllers.TempOpController{},
			),
		),
		web.NSNamespace("/sys",
			web.NSInclude(
				&controllers.SysController{},
			),
		),
		web.NSNamespace("/netspider",
			web.NSInclude(
				&controllers.NetSpiderController{},
			),
		),
		web.NSNamespace("/act",
			web.NSInclude(
				&controllers.ActController{},
			),
		),
		web.NSNamespace("/jxshop",
			web.NSInclude(
				&controllers.JxShopController{},
			),
		),
		web.NSNamespace("/foodrecipe",
			web.NSInclude(
				&controllers.FoodRecipeController{},
			),
		),
		web.NSNamespace("/report",
			web.NSInclude(
				&controllers.ReportController{},
			),
		),
		web.NSNamespace("/yonghui",
			web.NSInclude(
				&controllers.YongHuiController{},
			),
		),
		web.NSNamespace("/event",
			web.NSInclude(
				&controllers.EventController{},
			),
		),
		web.NSNamespace("/power",
			web.NSInclude(
				&controllers.PowerController{},
			),
		),
		web.NSNamespace("/know",
			web.NSInclude(
				&controllers.KnowController{},
			),
		),
		web.NSNamespace("/bind",
			web.NSInclude(
				&controllers.BiddingController{},
			),
		),
		web.NSNamespace("/session",
			web.NSInclude(
				&controllers.SessionController{},
			),
		),
		web.NSNamespace("/lakala",
			web.NSInclude(
				&controllers.LaKaLaController{},
			),
		),
		web.NSNamespace("/version",
			web.NSInclude(
				&controllers.VersionController{},
			),
		),
		web.NSNamespace("/im",
			web.NSInclude(
				&controllers.IMController{},
			),
		),
	)
	web.AddNamespace(ns)

	web.AutoRouter(&controllers.DjswController{})
	web.AutoRouter(&controllers.MtpsController{})
	web.AutoRouter(&controllers.ElemeController{})
	web.AutoRouter(&controllers.DadaDeliveryController{})
	web.AutoRouter(&controllers.EbaiController{})
	web.AutoRouter(&controllers.MtwmController{})
	web.AutoRouter(&controllers.WeimobController{})
	web.AutoRouter(&controllers.WeixinController{})
	web.AutoRouter(&controllers.DingDingController{})
	web.AutoRouter(&controllers.WXPayController{})
	web.AutoRouter(&controllers.Djsw2Controller{})
	web.AutoRouter(&controllers.TongLianController{})
	web.AutoRouter(&controllers.EclpController{})
	web.AutoRouter(&controllers.JdsController{})
	web.AutoRouter(&controllers.FnController{})
	web.AutoRouter(&controllers.UuPtController{})
	web.AutoRouter(&controllers.SFPSController{})
	web.AutoRouter(&controllers.KnowUploadController{})
	web.AutoRouter(&controllers.AliApiController{})
	web.AutoRouter(&controllers.TicTocController{})
	web.AutoRouter(&controllers.EnterpriseController{})

	web.AutoRouter(&controllers.TiktokController{})          // 订单
	web.AutoRouter(&controllers.TiktokShopController{})      // 门店授权
	web.AutoRouter(&controllers.LogisticsController{})       // 抖音快递信息同步
	web.AutoRouter(&controllers.KuaiShouController{})        // 快手支付回调
	web.AutoRouter(&controllers.TaoBaoVegetableController{}) // 淘菜菜回调
	//web.AutoRouter(&controllers.IMController{})         //im
	web.AutoRouter(&controllers.LaKaLaCallbackController{}) // 拉卡拉回调

	// 如下都是用于检测存活的空接口
	web.Any("/", func(ctx *beecontext.Context) {
		ctx.WriteString("pong\n")
	})
	web.Any("/res", func(ctx *beecontext.Context) {
		ctx.WriteString("pong\n")
	})
	web.Any("/addstoremsg", func(ctx *beecontext.Context) {
		ctx.WriteString("pong\n")
	})
}
