🎨 清理多余文件,修改项目model
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ package initialize
|
||||
|
||||
import (
|
||||
"context"
|
||||
commonModel "git.echol.cn/loser/Go-Web-Template/server/model/common"
|
||||
sysModel "git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/service/system"
|
||||
adapter "github.com/casbin/gorm-adapter/v3"
|
||||
commonModel "github.com/flipped-aurora/gin-vue-admin/server/model/common"
|
||||
sysModel "github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/service/system"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ package initialize
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
commonModel "github.com/flipped-aurora/gin-vue-admin/server/model/common"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
commonModel "git.echol.cn/loser/Go-Web-Template/server/model/common"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/model/system"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
func bizModel() error {
|
||||
|
||||
@@ -10,9 +10,9 @@ package initialize
|
||||
*/
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/initialize/internal"
|
||||
"gorm.io/driver/sqlserver"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/initialize/internal"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/initialize/internal"
|
||||
oracle "github.com/dzwvip/gorm-oracle"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/initialize/internal"
|
||||
"gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/initialize/internal"
|
||||
"github.com/glebarez/sqlite"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/utils"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/utils"
|
||||
)
|
||||
|
||||
// 初始化全局函数
|
||||
|
||||
@@ -3,7 +3,7 @@ package internal
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/logger"
|
||||
"gorm.io/gorm/schema"
|
||||
|
||||
@@ -2,8 +2,8 @@ package internal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"gorm.io/gorm/logger"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ package initialize
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/utils"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/initialize/internal"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/utils"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/qiniu/qmgo"
|
||||
"github.com/qiniu/qmgo/options"
|
||||
|
||||
@@ -3,8 +3,8 @@ package initialize
|
||||
import (
|
||||
"github.com/songzhibin97/gkit/cache/local_cache"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/utils"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/utils"
|
||||
)
|
||||
|
||||
func OtherInit() {
|
||||
|
||||
@@ -3,8 +3,8 @@ package initialize
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/config"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/config"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
|
||||
"github.com/redis/go-redis/v9"
|
||||
"go.uber.org/zap"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
_ "github.com/flipped-aurora/gin-vue-admin/server/source/common"
|
||||
_ "github.com/flipped-aurora/gin-vue-admin/server/source/system"
|
||||
_ "git.echol.cn/loser/Go-Web-Template/server/source/common"
|
||||
_ "git.echol.cn/loser/Go-Web-Template/server/source/system"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/docs"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/middleware"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/router"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/docs"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/middleware"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/router"
|
||||
"github.com/gin-gonic/gin"
|
||||
swaggerFiles "github.com/swaggo/files"
|
||||
ginSwagger "github.com/swaggo/gin-swagger"
|
||||
@@ -54,7 +54,7 @@ func Routers() *gin.Engine {
|
||||
Router.StaticFS(global.GVA_CONFIG.Local.StorePath, justFilesFilesystem{http.Dir(global.GVA_CONFIG.Local.StorePath)})
|
||||
// Router.Use(middleware.LoadTls()) // 如果需要使用https 请打开此中间件 然后前往 core/server.go 将启动模式 更变为 Router.RunTLS("端口","你的cre/pem文件","你的key文件")
|
||||
// 跨域,如需跨域可以打开下面的注释
|
||||
// Router.Use(middleware.Cors()) // 直接放行全部跨域请求
|
||||
Router.Use(middleware.Cors()) // 直接放行全部跨域请求
|
||||
// Router.Use(middleware.CorsByRules()) // 按照配置的规则放行跨域请求
|
||||
// global.GVA_LOG.Info("use middleware cors")
|
||||
docs.SwaggerInfo.BasePath = global.GVA_CONFIG.System.RouterPrefix
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/router"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/router"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ package initialize
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/task"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/task"
|
||||
|
||||
"github.com/robfig/cron/v3"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"git.echol.cn/loser/Go-Web-Template/server/global"
|
||||
)
|
||||
|
||||
func Timer() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package initialize
|
||||
|
||||
import "github.com/flipped-aurora/gin-vue-admin/server/utils"
|
||||
import "git.echol.cn/loser/Go-Web-Template/server/utils"
|
||||
|
||||
func init() {
|
||||
_ = utils.RegisterRule("PageVerify",
|
||||
|
||||
Reference in New Issue
Block a user