This commit is contained in:
YuleiLan 2020-07-17 15:51:05 +08:00
parent 9e9af1dc38
commit 738c178094
20 changed files with 80 additions and 0 deletions

View File

@ -8,6 +8,10 @@ import (
"github.com/gin-gonic/gin"
)
/*
@Author : lanyulei
*/
func GenerateCaptchaHandler(c *gin.Context) {
id, b64s, err := captcha.DriverDigitFunc()
if err != nil {

View File

@ -10,6 +10,10 @@ import (
"github.com/gin-gonic/gin/binding"
)
/*
@Author : lanyulei
*/
// @Summary 分页部门列表数据
// @Description 分页列表
// @Tags 部门

View File

@ -4,6 +4,10 @@ import (
"github.com/gin-gonic/gin"
)
/*
@Author : lanyulei
*/
const INDEX = `
<!DOCTYPE html>
<html>

View File

@ -8,6 +8,10 @@ import (
"github.com/gin-gonic/gin"
)
/*
@Author : lanyulei
*/
func GetInfo(c *gin.Context) {
var roles = make([]string, 1)

View File

@ -9,6 +9,10 @@ import (
"github.com/gin-gonic/gin/binding"
)
/*
@Author : lanyulei
*/
// @Summary Menu列表数据
// @Description 获取JSON
// @Tags 菜单

View File

@ -8,6 +8,10 @@ import (
"github.com/gin-gonic/gin"
)
/*
@Author : lanyulei
*/
// @Summary 职位列表数据
// @Description 获取JSON
// @Tags 职位

View File

@ -9,6 +9,10 @@ import (
"github.com/gin-gonic/gin/binding"
)
/*
@Author : lanyulei
*/
// @Summary 角色列表数据
// @Description Get JSON
// @Tags 角色/Role

View File

@ -8,6 +8,10 @@ import (
"github.com/gin-gonic/gin"
)
/*
@Author : lanyulei
*/
// @Summary RoleMenu列表数据
// @Description 获取JSON
// @Tags 角色菜单

View File

@ -11,6 +11,10 @@ import (
log "github.com/sirupsen/logrus"
)
/*
@Author : lanyulei
*/
// @Summary 列表数据
// @Description 获取JSON
// @Tags 用户

View File

@ -1,5 +1,9 @@
package system
/*
@Author : lanyulei
*/
//casbin_rule
type CasbinRule struct {
PType string `json:"p_type" gorm:"type:varchar(100);"`

View File

@ -7,6 +7,10 @@ import (
_ "time"
)
/*
@Author : lanyulei
*/
type Dept struct {
DeptId int `json:"deptId" gorm:"primary_key;AUTO_INCREMENT"` //部门编码
ParentId int `json:"parentId" gorm:"type:int(11);"` //上级部门

View File

@ -8,6 +8,10 @@ import (
"strings"
)
/*
@Author : lanyulei
*/
func InitDb() error {
filePath := "config/db.sql"
if config2.DatabaseConfig.Dbtype == "sqlite3" {

View File

@ -5,6 +5,10 @@ import (
"ferry/tools"
)
/*
@Author : lanyulei
*/
type Login struct {
Username string `form:"UserName" json:"username" binding:"required"`
Password string `form:"Password" json:"password" binding:"required"`

View File

@ -5,6 +5,10 @@ import (
"time"
)
/*
@Author : lanyulei
*/
type LoginLog struct {
InfoId int `json:"infoId" gorm:"primary_key;AUTO_INCREMENT"` //主键
Username string `json:"username" gorm:"type:varchar(128);"` //用户名

View File

@ -6,6 +6,10 @@ import (
"ferry/tools"
)
/*
@Author : lanyulei
*/
type Menu struct {
MenuId int `json:"menuId" gorm:"primary_key;AUTO_INCREMENT"`
MenuName string `json:"menuName" gorm:"type:varchar(128);"`

View File

@ -4,6 +4,10 @@ import (
"ferry/global/orm"
)
/*
@Author : lanyulei
*/
type Post struct {
PostId int `gorm:"primary_key;AUTO_INCREMENT" json:"postId"` //岗位编号
PostName string `gorm:"type:varchar(128);" json:"postName"` //岗位名称

View File

@ -6,6 +6,10 @@ import (
"github.com/pkg/errors"
)
/*
@Author : lanyulei
*/
type SysRole struct {
RoleId int `json:"roleId" gorm:"primary_key;AUTO_INCREMENT"` // 角色编码
RoleName string `json:"roleName" gorm:"type:varchar(128);"` // 角色名称

View File

@ -5,6 +5,10 @@ import (
"fmt"
)
/*
@Author : lanyulei
*/
//sys_role_dept
type SysRoleDept struct {
RoleId int `gorm:"type:int(11)"`

View File

@ -6,6 +6,10 @@ import (
"fmt"
)
/*
@Author : lanyulei
*/
type RoleMenu struct {
RoleId int `gorm:"type:int(11)"`
MenuId int `gorm:"type:int(11)"`

View File

@ -10,6 +10,10 @@ import (
"golang.org/x/crypto/bcrypt"
)
/*
@Author : lanyulei
*/
// User
type User struct {
// key