You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
825 B
25 lines
825 B
package jixiaokaohe
|
|
|
|
import (
|
|
"github.com/flipped-aurora/gin-vue-admin/server/commonus"
|
|
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
|
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
|
|
"github.com/flipped-aurora/gin-vue-admin/server/model/hrsystem"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
//获取个人信息
|
|
func (a *ApiGroup) MyContent(c *gin.Context) {
|
|
isTrue, userCont := commonus.ClientIdentity()
|
|
if isTrue != true {
|
|
response.Result(101, isTrue, "您的身份令牌已经失效!请重新登录获取身份令牌!", c)
|
|
return
|
|
}
|
|
var myInfo hrsystem.Personnel
|
|
err := global.GVA_DB_HrDataBase.Where("key = ?", userCont.Key).First(&myInfo).Error
|
|
if err != nil {
|
|
response.Result(102, err, "没有获取到数据!", c)
|
|
return
|
|
}
|
|
response.Result(0, myInfo, "获取成功!", c)
|
|
}
|
|
|