update
This commit is contained in:
parent
9e9af1dc38
commit
738c178094
@ -8,6 +8,10 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
func GenerateCaptchaHandler(c *gin.Context) {
|
func GenerateCaptchaHandler(c *gin.Context) {
|
||||||
id, b64s, err := captcha.DriverDigitFunc()
|
id, b64s, err := captcha.DriverDigitFunc()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -10,6 +10,10 @@ import (
|
|||||||
"github.com/gin-gonic/gin/binding"
|
"github.com/gin-gonic/gin/binding"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
// @Summary 分页部门列表数据
|
// @Summary 分页部门列表数据
|
||||||
// @Description 分页列表
|
// @Description 分页列表
|
||||||
// @Tags 部门
|
// @Tags 部门
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
const INDEX = `
|
const INDEX = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
@ -8,6 +8,10 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
func GetInfo(c *gin.Context) {
|
func GetInfo(c *gin.Context) {
|
||||||
|
|
||||||
var roles = make([]string, 1)
|
var roles = make([]string, 1)
|
||||||
|
@ -9,6 +9,10 @@ import (
|
|||||||
"github.com/gin-gonic/gin/binding"
|
"github.com/gin-gonic/gin/binding"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
// @Summary Menu列表数据
|
// @Summary Menu列表数据
|
||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 菜单
|
// @Tags 菜单
|
||||||
|
@ -8,6 +8,10 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
// @Summary 职位列表数据
|
// @Summary 职位列表数据
|
||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 职位
|
// @Tags 职位
|
||||||
|
@ -9,6 +9,10 @@ import (
|
|||||||
"github.com/gin-gonic/gin/binding"
|
"github.com/gin-gonic/gin/binding"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
// @Summary 角色列表数据
|
// @Summary 角色列表数据
|
||||||
// @Description Get JSON
|
// @Description Get JSON
|
||||||
// @Tags 角色/Role
|
// @Tags 角色/Role
|
||||||
|
@ -8,6 +8,10 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
// @Summary RoleMenu列表数据
|
// @Summary RoleMenu列表数据
|
||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 角色菜单
|
// @Tags 角色菜单
|
||||||
|
@ -11,6 +11,10 @@ import (
|
|||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
// @Summary 列表数据
|
// @Summary 列表数据
|
||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 用户
|
// @Tags 用户
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
//casbin_rule
|
//casbin_rule
|
||||||
type CasbinRule struct {
|
type CasbinRule struct {
|
||||||
PType string `json:"p_type" gorm:"type:varchar(100);"`
|
PType string `json:"p_type" gorm:"type:varchar(100);"`
|
||||||
|
@ -7,6 +7,10 @@ import (
|
|||||||
_ "time"
|
_ "time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
type Dept struct {
|
type Dept struct {
|
||||||
DeptId int `json:"deptId" gorm:"primary_key;AUTO_INCREMENT"` //部门编码
|
DeptId int `json:"deptId" gorm:"primary_key;AUTO_INCREMENT"` //部门编码
|
||||||
ParentId int `json:"parentId" gorm:"type:int(11);"` //上级部门
|
ParentId int `json:"parentId" gorm:"type:int(11);"` //上级部门
|
||||||
|
@ -8,6 +8,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
func InitDb() error {
|
func InitDb() error {
|
||||||
filePath := "config/db.sql"
|
filePath := "config/db.sql"
|
||||||
if config2.DatabaseConfig.Dbtype == "sqlite3" {
|
if config2.DatabaseConfig.Dbtype == "sqlite3" {
|
||||||
|
@ -5,6 +5,10 @@ import (
|
|||||||
"ferry/tools"
|
"ferry/tools"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
type Login struct {
|
type Login struct {
|
||||||
Username string `form:"UserName" json:"username" binding:"required"`
|
Username string `form:"UserName" json:"username" binding:"required"`
|
||||||
Password string `form:"Password" json:"password" binding:"required"`
|
Password string `form:"Password" json:"password" binding:"required"`
|
||||||
|
@ -5,6 +5,10 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
type LoginLog struct {
|
type LoginLog struct {
|
||||||
InfoId int `json:"infoId" gorm:"primary_key;AUTO_INCREMENT"` //主键
|
InfoId int `json:"infoId" gorm:"primary_key;AUTO_INCREMENT"` //主键
|
||||||
Username string `json:"username" gorm:"type:varchar(128);"` //用户名
|
Username string `json:"username" gorm:"type:varchar(128);"` //用户名
|
||||||
|
@ -6,6 +6,10 @@ import (
|
|||||||
"ferry/tools"
|
"ferry/tools"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
type Menu struct {
|
type Menu struct {
|
||||||
MenuId int `json:"menuId" gorm:"primary_key;AUTO_INCREMENT"`
|
MenuId int `json:"menuId" gorm:"primary_key;AUTO_INCREMENT"`
|
||||||
MenuName string `json:"menuName" gorm:"type:varchar(128);"`
|
MenuName string `json:"menuName" gorm:"type:varchar(128);"`
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"ferry/global/orm"
|
"ferry/global/orm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
type Post struct {
|
type Post struct {
|
||||||
PostId int `gorm:"primary_key;AUTO_INCREMENT" json:"postId"` //岗位编号
|
PostId int `gorm:"primary_key;AUTO_INCREMENT" json:"postId"` //岗位编号
|
||||||
PostName string `gorm:"type:varchar(128);" json:"postName"` //岗位名称
|
PostName string `gorm:"type:varchar(128);" json:"postName"` //岗位名称
|
||||||
|
@ -6,6 +6,10 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
type SysRole struct {
|
type SysRole struct {
|
||||||
RoleId int `json:"roleId" gorm:"primary_key;AUTO_INCREMENT"` // 角色编码
|
RoleId int `json:"roleId" gorm:"primary_key;AUTO_INCREMENT"` // 角色编码
|
||||||
RoleName string `json:"roleName" gorm:"type:varchar(128);"` // 角色名称
|
RoleName string `json:"roleName" gorm:"type:varchar(128);"` // 角色名称
|
||||||
|
@ -5,6 +5,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
//sys_role_dept
|
//sys_role_dept
|
||||||
type SysRoleDept struct {
|
type SysRoleDept struct {
|
||||||
RoleId int `gorm:"type:int(11)"`
|
RoleId int `gorm:"type:int(11)"`
|
||||||
|
@ -6,6 +6,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
type RoleMenu struct {
|
type RoleMenu struct {
|
||||||
RoleId int `gorm:"type:int(11)"`
|
RoleId int `gorm:"type:int(11)"`
|
||||||
MenuId int `gorm:"type:int(11)"`
|
MenuId int `gorm:"type:int(11)"`
|
||||||
|
@ -10,6 +10,10 @@ import (
|
|||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Author : lanyulei
|
||||||
|
*/
|
||||||
|
|
||||||
// User
|
// User
|
||||||
type User struct {
|
type User struct {
|
||||||
// key
|
// key
|
||||||
|
Loading…
x
Reference in New Issue
Block a user