Skip to content

Commit

Permalink
修改文件目录
Browse files Browse the repository at this point in the history
  • Loading branch information
mss-boot committed Sep 3, 2020
1 parent 41b06c8 commit 01ea376
Show file tree
Hide file tree
Showing 109 changed files with 180 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ temp/
vendor
config/settings.dev.yml
go-admin
middleware/demo.go
common/middleware/demo.go
config/settings.dev.b.yml
temp/logs
config/settings.dev.yml.log
Expand Down
2 changes: 1 addition & 1 deletion apis/log/loginlog.go → app/admin/apis/log/loginlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
)
Expand Down
2 changes: 1 addition & 1 deletion apis/log/operlog.go → app/admin/apis/log/operlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
"go-admin/tools/app/msg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
"go-admin/tools/app/msg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
"go-admin/tools/app/msg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
"go-admin/tools/app/msg"
Expand Down
9 changes: 5 additions & 4 deletions apis/sysjob/sysjob.go → app/admin/apis/sysjob/sysjob.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
package sysjob

import (
"go-admin/common/dto"
"time"

"github.com/gin-gonic/gin"

"go-admin/jobs"
"go-admin/models"
"go-admin/app/admin/models"
"go-admin/app/jobs"
"go-admin/tools"
"go-admin/tools/app"
"go-admin/tools/app/msg"
)

func RemoveJob(c *gin.Context) {
var data models.SysJob
var v tools.GeneralDelDto
var v dto.GeneralDelDto
err := c.BindUri(&v)
tools.HasError(err, "", 500)
data.JobId = v.Id
Expand All @@ -36,7 +37,7 @@ func RemoveJob(c *gin.Context) {

func StartJob(c *gin.Context) {
var data models.SysJob
var v tools.GeneralGetDto
var v dto.GeneralGetDto
err := c.BindUri(&v)
tools.HasError(err, "", 500)
data.JobId = v.Id
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion apis/system/config.go → app/admin/apis/system/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
"go-admin/tools/app/msg"
Expand Down
2 changes: 1 addition & 1 deletion apis/system/dept.go → app/admin/apis/system/dept.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
"go-admin/tools/app/msg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
)
Expand Down Expand Up @@ -44,7 +44,7 @@ func GetDictTypeList(c *gin.Context) {
result, count, err := data.GetPage(pageSize, pageIndex)
tools.HasError(err, "", -1)

app.PageOK(c,result,count,pageIndex,pageSize,"")
app.PageOK(c, result, count, pageIndex, pageSize, "")
}

// @Summary 通过字典id获取字典类型
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion apis/system/info.go → app/admin/apis/system/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package system
import (
"github.com/gin-gonic/gin"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
)
Expand Down
2 changes: 1 addition & 1 deletion apis/system/menu.go → app/admin/apis/system/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
)
Expand Down
2 changes: 1 addition & 1 deletion apis/system/post.go → app/admin/apis/system/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package system
import (
"github.com/gin-gonic/gin"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
)
Expand Down
2 changes: 1 addition & 1 deletion apis/system/role.go → app/admin/apis/system/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package system
import (
"github.com/gin-gonic/gin"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/gin-gonic/gin"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools/app"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import (

"github.com/gin-gonic/gin"

"go-admin/models"
"go-admin/app/admin/models"
"go-admin/tools"
"go-admin/tools/app"

)

// @Summary 查询系统信息
Expand Down
4 changes: 2 additions & 2 deletions apis/system/sysuser.go → app/admin/apis/system/sysuser.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"github.com/gin-gonic/gin/binding"
"github.com/google/uuid"

"go-admin/global"
"go-admin/models"
"go-admin/app/admin/models"
"go-admin/common/global"
"go-admin/tools"
"go-admin/tools/app"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/gin-gonic/gin"

"go-admin/models/tools"
"go-admin/app/admin/models/tools"
tools2 "go-admin/tools"
"go-admin/tools/app"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/gin-gonic/gin"

"go-admin/models/tools"
"go-admin/app/admin/models/tools"
tools2 "go-admin/tools"
"go-admin/tools/app"
"go-admin/tools/config"
Expand Down
6 changes: 3 additions & 3 deletions apis/tools/gen.go → app/admin/apis/tools/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/gin-gonic/gin"

"go-admin/global"
"go-admin/models"
"go-admin/models/tools"
"go-admin/app/admin/models"
"go-admin/app/admin/models/tools"
"go-admin/common/global"
tools2 "go-admin/tools"
"go-admin/tools/app"
"go-admin/tools/config"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/gin-gonic/gin"

"go-admin/models/tools"
"go-admin/app/admin/models/tools"
tools2 "go-admin/tools"
"go-admin/tools/app"
)
Expand Down
2 changes: 1 addition & 1 deletion middleware/auth.go → app/admin/middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package middleware
import (
"time"

"go-admin/handler"
"go-admin/app/admin/middleware/handler"
jwt "go-admin/pkg/jwtauth"
"go-admin/tools/config"
)
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions app/admin/middleware/db.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package middleware

import "go-admin/common/middleware"

var WithContextDb = middleware.WithContextDb
4 changes: 2 additions & 2 deletions handler/auth.go → app/admin/middleware/handler/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/mojocn/base64Captcha"
"github.com/mssola/user_agent"

"go-admin/global"
"go-admin/models"
"go-admin/app/admin/models"
"go-admin/common/global"
jwt "go-admin/pkg/jwtauth"
"go-admin/tools"
"go-admin/tools/config"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/gin-gonic/gin"

jwt "go-admin/pkg/jwtauth"

)

func NoFound(c *gin.Context) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions middleware/logger.go → app/admin/middleware/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import (

"github.com/gin-gonic/gin"

"go-admin/global"
"go-admin/models"
"go-admin/app/admin/models"
"go-admin/common/global"
"go-admin/tools"
config2 "go-admin/tools/config"

)

// 日志记录到文件
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion models/config.go → app/admin/models/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
_ "time"

orm "go-admin/global"
orm "go-admin/common/global"
"go-admin/tools"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion models/dept.go → app/admin/models/dept.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
_ "time"

orm "go-admin/global"
orm "go-admin/common/global"
"go-admin/tools"
)

Expand Down
2 changes: 1 addition & 1 deletion models/dictdata.go → app/admin/models/dictdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package models
import (
"errors"

orm "go-admin/global"
orm "go-admin/common/global"
"go-admin/tools"
)

Expand Down
2 changes: 1 addition & 1 deletion models/dicttype.go → app/admin/models/dicttype.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"gorm.io/gorm"

orm "go-admin/global"
orm "go-admin/common/global"
"go-admin/tools"
)

Expand Down
2 changes: 1 addition & 1 deletion models/filedir.go → app/admin/models/filedir.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package models

import (
orm "go-admin/global"
orm "go-admin/common/global"
"go-admin/tools"
)

Expand Down
4 changes: 2 additions & 2 deletions models/gorm/data.go → app/admin/models/gorm/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package gorm
import (
"gorm.io/gorm"

"go-admin/models"
"go-admin/app/admin/models"
)

func InitData(db *gorm.DB) {
func InitData(db *gorm.DB) {

list := []models.CasbinRule{
{"p", "admin", "/api/v1/menulist", "GET", "", "", ""},
Expand Down
6 changes: 3 additions & 3 deletions models/gorm/gorm.go → app/admin/models/gorm/gorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package gorm
import (
"gorm.io/gorm"

"go-admin/models"
"go-admin/models/tools"
"go-admin/app/admin/models"
"go-admin/app/admin/models/tools"
)

func AutoMigrate(db *gorm.DB) (err error) {
err = db.AutoMigrate(new(models.CasbinRule),
err = db.Migrator().AutoMigrate(new(models.CasbinRule),
new(models.SysDept),
new(models.SysConfig),
new(tools.SysTables),
Expand Down
2 changes: 1 addition & 1 deletion models/initdb.go → app/admin/models/initdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"strings"

"go-admin/global"
"go-admin/common/global"
)

func InitDb() (err error) {
Expand Down
2 changes: 1 addition & 1 deletion models/login.go → app/admin/models/login.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package models

import (
orm "go-admin/global"
orm "go-admin/common/global"
"go-admin/tools"
)

Expand Down
2 changes: 1 addition & 1 deletion models/loginlog.go → app/admin/models/loginlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package models
import (
"time"

orm "go-admin/global"
orm "go-admin/common/global"
)

type LoginLog struct {
Expand Down
Loading

0 comments on commit 01ea376

Please sign in to comment.