From 0b785160190dd5746a26a8508eeda3ae18a10871 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期三, 30 八月 2023 11:43:32 +0800
Subject: [PATCH] fix

---
 router/index.go |   57 +++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 49 insertions(+), 8 deletions(-)

diff --git a/router/index.go b/router/index.go
index 4adef30..ea98b63 100644
--- a/router/index.go
+++ b/router/index.go
@@ -3,6 +3,7 @@
 import (
 	"aps_crm/conf"
 	_ "aps_crm/docs"
+	"aps_crm/middleware"
 	"github.com/gin-contrib/cors"
 	"github.com/gin-gonic/gin"
 	swaggerFiles "github.com/swaggo/files"
@@ -11,9 +12,17 @@
 )
 
 type Group struct {
-    ServiceContractStatusRouter
-    OrderTypeRouter
-    ReportSourceRouter
+	CurrencyRouter
+	QuotationStatusRouter
+	RepositoryRouter
+	SalesReturnStatusRouter
+	AccountIdRouter
+	IsInvoiceRouter
+	RefundMethodRouter
+	ServiceContractTypeRouter
+	ServiceContractStatusRouter
+	OrderTypeRouter
+	ReportSourceRouter
 	IsVisitRouter
 	SolveRateRouter
 	TimelyRateRouter
@@ -61,6 +70,9 @@
 	DataRouter
 	DepartmentRouter
 	SatisfactionRouter
+	AssignRouter
+	CollectionProjectionRouter
+	ContactInformationRouter
 }
 
 func InitRouter() *gin.Engine {
@@ -76,6 +88,7 @@
 
 	routerGroup := new(Group)
 	PublicGroup := Router.Group("api")
+
 	{
 		// 鍋ュ悍鐩戞祴
 		PublicGroup.GET("/health", func(c *gin.Context) {
@@ -89,7 +102,7 @@
 
 	PrivateGroup := Router.Group("api")
 	//PrivateGroup.Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
-	//PrivateGroup.Use(middleware.JWTAuth())
+	PrivateGroup.Use(middleware.JWTAuth2())
 	//PrivateGroup.Use(middleware.CasbinHandler())
 	{
 		routerGroup.InitJwtRouter(PrivateGroup)                  // jwt鐩稿叧璺敱
@@ -138,9 +151,37 @@
 		routerGroup.InitTimelyRateRouter(PrivateGroup)
 		routerGroup.InitSolveRateRouter(PrivateGroup)
 		routerGroup.InitIsVisitRouter(PrivateGroup)
-        routerGroup.InitReportSourceRouter(PrivateGroup)
-        routerGroup.InitOrderTypeRouter(PrivateGroup)
-        routerGroup.InitServiceContractStatusRouter(PrivateGroup)
+		routerGroup.InitReportSourceRouter(PrivateGroup)
+		routerGroup.InitOrderTypeRouter(PrivateGroup)
+		routerGroup.InitServiceContractStatusRouter(PrivateGroup)
+		routerGroup.InitServiceContractTypeRouter(PrivateGroup)
+		routerGroup.InitRefundMethodRouter(PrivateGroup)
+		routerGroup.InitIsInvoiceRouter(PrivateGroup)
+		routerGroup.InitAccountIdRouter(PrivateGroup)
+		routerGroup.InitSalesReturnStatusRouter(PrivateGroup)
+		routerGroup.InitRepositoryRouter(PrivateGroup)
+		routerGroup.InitQuotationStatusRouter(PrivateGroup)
+		routerGroup.InitCurrencyRouter(PrivateGroup)
+		routerGroup.InitAssignRouter(PrivateGroup)
+		InitServiceOrderRouter(PrivateGroup)
+		InitFaqRouter(PrivateGroup)
+		InitPriorityLevelRouter(PrivateGroup)
+		InitServiceTypeRouter(PrivateGroup)
+		InitSeverityRouter(PrivateGroup)
+		InitTimeSpentRouter(PrivateGroup)
+		InitFaultTypeRouter(PrivateGroup)
+		InitServiceCollectionPlanRouter(PrivateGroup)
+		InitReceiptRouter(PrivateGroup)
+		InitBankAccountRouter(PrivateGroup)
+		InitPaymentTypeRouter(PrivateGroup)
+		InitFileRouter(PrivateGroup)
+		InitInvoiceRouter(PrivateGroup)
+		InitInvoiceStatusRouter(PrivateGroup)
+		InitInvoiceTypeRouter(PrivateGroup)
+		InitCourierCompanyRouter(PrivateGroup)
+		InitProductRouter(PrivateGroup)
+		routerGroup.InitCollectionProjectionRouter(PrivateGroup)
+		routerGroup.InitContactInformationRouter(PrivateGroup)
 	}
 	return Router
-}
\ No newline at end of file
+}

--
Gitblit v1.8.0