update
This commit is contained in:
parent
9e9af1dc38
commit
738c178094
@ -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 {
|
||||
|
@ -10,6 +10,10 @@ import (
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
// @Summary 分页部门列表数据
|
||||
// @Description 分页列表
|
||||
// @Tags 部门
|
||||
|
@ -4,6 +4,10 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
const INDEX = `
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
@ -8,6 +8,10 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
func GetInfo(c *gin.Context) {
|
||||
|
||||
var roles = make([]string, 1)
|
||||
|
@ -9,6 +9,10 @@ import (
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
// @Summary Menu列表数据
|
||||
// @Description 获取JSON
|
||||
// @Tags 菜单
|
||||
|
@ -8,6 +8,10 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
// @Summary 职位列表数据
|
||||
// @Description 获取JSON
|
||||
// @Tags 职位
|
||||
|
@ -9,6 +9,10 @@ import (
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
// @Summary 角色列表数据
|
||||
// @Description Get JSON
|
||||
// @Tags 角色/Role
|
||||
|
@ -8,6 +8,10 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
// @Summary RoleMenu列表数据
|
||||
// @Description 获取JSON
|
||||
// @Tags 角色菜单
|
||||
|
@ -11,6 +11,10 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
// @Summary 列表数据
|
||||
// @Description 获取JSON
|
||||
// @Tags 用户
|
||||
|
@ -1,5 +1,9 @@
|
||||
package system
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
//casbin_rule
|
||||
type CasbinRule struct {
|
||||
PType string `json:"p_type" gorm:"type:varchar(100);"`
|
||||
|
@ -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);"` //上级部门
|
||||
|
@ -8,6 +8,10 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
func InitDb() error {
|
||||
filePath := "config/db.sql"
|
||||
if config2.DatabaseConfig.Dbtype == "sqlite3" {
|
||||
|
@ -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"`
|
||||
|
@ -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);"` //用户名
|
||||
|
@ -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);"`
|
||||
|
@ -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"` //岗位名称
|
||||
|
@ -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);"` // 角色名称
|
||||
|
@ -5,6 +5,10 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
//sys_role_dept
|
||||
type SysRoleDept struct {
|
||||
RoleId int `gorm:"type:int(11)"`
|
||||
|
@ -6,6 +6,10 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
type RoleMenu struct {
|
||||
RoleId int `gorm:"type:int(11)"`
|
||||
MenuId int `gorm:"type:int(11)"`
|
||||
|
@ -10,6 +10,10 @@ import (
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
/*
|
||||
@Author : lanyulei
|
||||
*/
|
||||
|
||||
// User
|
||||
type User struct {
|
||||
// key
|
||||
|
Loading…
x
Reference in New Issue
Block a user