项目技术栈:Go+Vue+PGSQL
开发工具:IDEA2021.1
后端开发语言:Go
前端框架:Vue3.0(集成ElementUI组件)
后端框架:Gin、Gorm
数据库:PostgreSQL13
Go(又称 Golang)是 Google 的 Robert Griesemer,Rob Pike 及 Ken Thompson 开发的一种静态强类型、编译型语言。Go 语言语法与 C 相近,但功能上有:内存安全,GC(垃圾回收),结构形态及 CSP-style 并发计算。
Vue 是一套用于构建用户界面的渐进式框架。与其它大型框架不同的是,Vue 被设计为可以自底向上逐层应用。Vue 的核心库只关注视图层,不仅易于上手,还便于与第三方库或既有项目整合。另一方面,当与现代化的工具链以及各种支持类库结合使用时,Vue 也完全能够为复杂的单页应用提供驱动。
Gin 是一个基于 Go 语言编写的 Web 框架,与 martini 框架类似,但拥有更好的性能,借助高性能的 httprouter,速度提升了近 40 倍。
基于GoLand语言的 ORM(Object Relation Mapping),对象关系映射,实际上就是对数据库的操作进行封装,对上层开发人员屏蔽数据操作的细节,开发人员看到的就是一个个对象,大大简化了开发工作,提高了生产效率。
PostgreSQL是一个功能强大的开源对象关系型数据库系统,他使用和扩展了SQL语言,并结合了许多安全存储和扩展最复杂数据工作负载的功能。PostgreSQL的起源可以追溯到1986年,作为加州大学伯克利分校POSTGRES项目的一部分,并且在核心平台上进行了30多年的积极开发。
项目源代码我放在码云了点击跳转,下载到本地之后先配置前后端的依赖和数据库配置,再运行项目。
项目展示我已放在云服务器上点击跳转,总裁账号20210001密码123456,主管账号20210002密码123456,员工账号20210008密码123456
根据总裁、主管、员工三种身份,实现不同的前台导航栏和监听路由
func AdminMapper(re *gin.Engine) {
re.POST("/AdminLogin", Controller.AdminLogin)
re.POST("/AllMenu", Controller.AllMenu)
re.POST("/EmployeeBasic", Controller.EmployeeBasic)
re.POST("/EmployeeBasic/Update", Controller.EmployeeBasicUpdate)
re.POST("/EmployeeBasic/Delete", Controller.EmployeeBasicDelete)
re.POST("/EmployeeBasic/MultiDelete", Controller.EmployeeBasicMultiDelete)
re.POST("/EmployeeBasic/Add", Controller.EmployeeBasicAdd)
re.POST("/EmployeeBasic/Search", Controller.EmployeeBasicSearch)
re.POST("/EmployeeBasic/SearchDate", Controller.EmployeeBasicSearchDate)
re.POST("/EmployeeBasic/SearchAdvance", Controller.EmployeeBasicSearchAdvance)
re.POST("/EmployeeBasic/Import", Controller.EmployeeBasicImport)
re.POST("/EmployeeBasic/Export", Controller.EmployeeBasicExport)
re.POST("/DepartmentTransfer", Controller.DepartmentTransfer)
re.POST("/DepartmentTransfer/Search", Controller.DepartmentTransferSearch)
re.POST("/PostTransfer", Controller.PostTransfer)
re.POST("/PostTransfer/Search", Controller.PostTransferSearch)
re.POST("/EmployeeQuit", Controller.EmployeeQuit)
re.POST("/EmployeeQuit/SearchByDate", Controller.EmployeeQuitSearchByDate)
re.POST("/ExpelEmployee", Controller.ExpelEmployee)
re.POST("/AdminInitExamine", Controller.AdminInitExamine)
re.POST("/TalentPool/Add", Controller.TalentPoolAdd)
re.POST("/Edit", Controller.Edit)
re.POST("/TalentApply", Controller.TalentApply)
re.POST("/TalentAgreeApply", Controller.TalentAgreeApply)
re.POST("/TalentRefuseApply", Controller.TalentRefuseApply)
re.POST("/Department/Basic", Controller.DepartmentBasic)
re.POST("/Department/Init", Controller.DepartmentInit)
re.POST("/Department/Post", Controller.DepartmentPost)
re.POST("/Department/Update", Controller.DepartmentUpdate)
re.POST("/Department/Delete", Controller.DepartmentDelete)
re.POST("/Department/Add", Controller.DepartmentAdd)
re.POST("/Post/Init", Controller.PostInit)
re.POST("/Post/Add", Controller.PostAdd)
re.POST("/Post/Update", Controller.PostUpdate)
re.POST("/Post/Delete", Controller.PostDelete)
re.POST("/SearchByDepartmentNumber", Controller.SearchByDepartmentNumber)
re.POST("/SearchByPostNumber", Controller.SearchByPostNumber)
re.POST("/DepartmentTransfer/SearchByDate", Controller.DepartmentTransferSearchByDate)
re.POST("/PostTransfer/SearchByDate", Controller.PostTransferSearchByDate)
}
func DirectorMapper(re *gin.Engine) {
re.POST("/DirectorDepartment", Controller.DirectorDepartment)
re.POST("/DirectorInitExamine", Controller.DirectorInitExamine)
re.POST("/DirectorAgreeApply", Controller.DirectorAgreeApply)
re.POST("/DirectorRefuseApply", Controller.DirectorRefuseApply)
re.POST("/EmployeeBasicByDirector", Controller.EmployeeBasicByDirector)
re.POST("/EmployeeBasic/SearchByDirector", Controller.EmployeeBasicSearchByDirector)
re.POST("/EmployeeBasic/SearchDateByDirector", Controller.EmployeeBasicSearchDateByDirector)
re.POST("/EmployeeQuitByDirector", Controller.EmployeeQuitByDirector)
re.POST("/EmployeeQuitByDirector/SearchByDate", Controller.EmployeeBasicByDirectorBySearchByDate)
re.POST("/GetDepartmentName", Controller.GetDepartmentName)
re.POST("/TalentApplyPart", Controller.TalentApplyPart)
}
func EmployeeMapper(re *gin.Engine) {
re.POST("/ApplyPostInformation", Controller.ApplyPostInformation)
re.POST("/ApplyNewPost", Controller.ApplyNewPost)
re.POST("/ApplyResignedInformation", Controller.ApplyResignedInformation)
re.POST("/ApplyResigned", Controller.ApplyResigned)
re.POST("/EmployeeBasicByEmployee", Controller.EmployeeBasicByEmployee)
re.POST("/EmployeeBasic/SearchByEmployee", Controller.EmployeeBasicSearchByEmployee)
re.POST("/EmployeeBasic/SearchDateByEmployee", #Controller.EmployeeBasicSearchDateByEmployee)
}
注:本文是博主软件工程课程设计的总结,不支持任何商用,转载请注明出处!如果你也对Go语言开发大型项目的学习有一定的兴趣和理解,欢迎随时找博主交流~