Browse Source

修改一些提交变动

master
超级管理员 3 years ago
parent
commit
0cf2971b03
  1. 46
      README.md
  2. 8
      api/admin/systemuser/systemmenu.go
  3. 3
      api/index/evaluation/evaluation.go
  4. 6
      api/index/evaluation/flowsendnew.go
  5. 18
      api/index/evaluation/lookquantita.go
  6. 6
      api/index/evaluation/type.go
  7. 3
      api/reply/qual/controller.go
  8. 15
      api/reply/quan/ration.go
  9. 1
      api/statistics/quantification/quant.go
  10. 6
      api/v1/custom/customhandle.go
  11. 33
      commonus/publichaneld.go
  12. 390
      config_yun.yaml
  13. BIN
      gin_server_admin
  14. 1
      go.sum
  15. 6
      initialize/router.go
  16. 6
      middleware/myjwt.go
  17. 1
      model/testpage/myuser.go
  18. 1
      router/statisticsrouter/statistics.go

46
README.md

@ -206,3 +206,49 @@ rectification 整改措施
1、 考核维度
2、考核指标相关d:\Program Files\Git\cmd\git.exe
```
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Administrator\AppData\Local\go-build
set GOENV=C:\Users\Administrator\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=F:\goobject\pkg\mod
set GONOPROXY=devops.gitlab.xxx.com
set GONOSUMDB=devops.gitlab.xxx.com
set GOOS=windows
set GOPATH=F:\goobject
set GOPRIVATE=devops.gitlab.xxx.com
set GOPROXY=https://goproxy.cn
set GOROOT=F:\gosub18
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=F:\gosub18\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.19
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=F:\goobject\src\gin_server_admin\go.mod
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\Administrator\AppData\Local\Temp\go-build1942724735=/tmp/go-build -gno-record-gcc-switches
```

8
api/admin/systemuser/systemmenu.go

@ -1,6 +1,7 @@
package systemuser
import (
"sort"
"strconv"
"time"
@ -8,6 +9,7 @@ import (
"gin_server_admin/global"
"gin_server_admin/model/common/response"
"gin_server_admin/model/systemuser"
"github.com/gin-gonic/gin"
)
@ -74,12 +76,16 @@ func MenuOperation(jurisd int, menuId int64) (isTrue bool, operation []systemuse
// 获取左侧菜单栏
func (s *SysTemMenuApi) GetMenu(c *gin.Context) {
var systemMenuList []systemuser.SystemMenu
menuOperErr := global.GVA_DB_Master.Where("`m_steat` IN ? AND m_id IN ?", []int{1, 2}, global.Gva_Authority_Authentication_Subsidiary).Order("m_id desc").Find(&systemMenuList).Error
menuOperErr := global.GVA_DB_Master.Where("`m_steat` = ? AND m_id IN ?", 1, global.Gva_Authority_Authentication_Subsidiary).Order("m_sort asc").Order("m_id desc").Find(&systemMenuList).Error
if menuOperErr != nil {
response.Result(101, menuOperErr, "数据获取失败!", c)
return
}
systemListMenu := GetMenuThree(2, 0, systemMenuList)
//按照最大值排序
sort.Slice(systemListMenu, func(i int, j int) bool {
return systemListMenu[i].Sort < systemListMenu[j].Sort
})
sendData := commonus.MapOut()
sendData["list"] = systemListMenu
response.Result(0, sendData, "数据获取成功!", c)

3
api/index/evaluation/evaluation.go

@ -13,6 +13,7 @@ import (
"gin_server_admin/global"
"gin_server_admin/model/assessmentmodel"
"gin_server_admin/model/common/response"
"github.com/gin-gonic/gin"
)
@ -2037,7 +2038,7 @@ func (e *EvaluationInterface) NewLookRationkScoreFlow(c *gin.Context) {
outListMap["flowall"] = flowAllMapList
outListMap["title"] = ""
outListMap["isset"] = isShenPi
outListMap["orderid"] = requestData.Id
outListMap["orderid"] = strconv.FormatInt(requestData.Id, 10)
if getErrs == nil {
titlekUserInfo, _ := commonus.GetNewHrPeopleInfo(map[string]interface{}{"`key`": flowLogInfo.EvaluationUser}, "`name`")
// titlekUserInfo, _ := commonus.GetWorkUser(strconv.FormatInt(flowLogInfo.EvaluationUser, 10))

6
api/index/evaluation/flowsendnew.go

@ -12,6 +12,7 @@ import (
"gin_server_admin/global"
"gin_server_admin/model/assessmentmodel"
"gin_server_admin/model/common/response"
"github.com/gin-gonic/gin"
)
@ -336,6 +337,7 @@ func (e *EvaluationInterface) PlusOrMinusPointsNew(c *gin.Context) {
response.Result(102, err, "数据获取失败!", c)
return
}
// fmt.Printf("%v\n", requestData)
if requestData.PlanId == "" {
response.Result(103, requestData, "未知考核项目!请检查你的提交是否正确!", c)
return
@ -427,6 +429,10 @@ func (e *EvaluationInterface) PlusOrMinusPointsNew(c *gin.Context) {
addScore.Count = countFrequency //发生次数
timeOccurrence := commonus.DateToTimeStamp(requestData.Addtime) //发生时间
if timeOccurrence < 0 {
addTimeStr := fmt.Sprintf("%v:00", requestData.Addtime)
timeOccurrence = commonus.DateToTimeStamp(addTimeStr)
}
addScore.HappenTime = timeOccurrence
// addScore.HappenTime = commonus.DateToTimeStamp(requestData.Addtime) //发生时间
departmentId, departmentIdErr := strconv.ParseInt(userCont.Deparment, 10, 64)

18
api/index/evaluation/lookquantita.go

@ -10,6 +10,7 @@ import (
"gin_server_admin/global"
"gin_server_admin/model/assessmentmodel"
"gin_server_admin/model/common/response"
"github.com/gin-gonic/gin"
)
@ -204,12 +205,17 @@ func (e *EvaluationInterface) SeeFlowLogOld(c *gin.Context) {
flowLogListCont.IsSet = 1
isSetUser := strings.Split(v.NextExecutor, ",")
fmt.Printf("\n\nIsSet----1--%v--->%v\n\n", orderId, flowLogListCont.IsSet)
if len(isSetUser) > 0 {
fmt.Printf("\n\nIsSet----2--%v--->%v\n\n", orderId, flowLogListCont.IsSet)
if commonus.IsItTrueString(userCont.Key, isSetUser) == true {
flowLogListCont.IsSet = 2
fmt.Printf("\n\nIsSet---%v--3---->%v\n\n", orderId, flowLogListCont.IsSet)
}
}
fmt.Printf("\n\nIsSet---4------%v----->%v\n\n", orderId, flowLogListCont.IsSet)
fmt.Printf("TypeClass ---------%v\n", v.TypeClass)
if v.TypeClass == 1 {
//获取考核项目关联项目
@ -620,22 +626,32 @@ func (e *EvaluationInterface) SeeFlowLog(c *gin.Context) {
case 1:
flowLogListCont.Result = "起草"
flowLogListCont.Condition = "起草"
flowLogListCont.StateType = 1
case 2:
flowLogListCont.Result = "审批中"
flowLogListCont.Condition = "审批中"
flowLogListCont.StateType = 2
case 3:
flowLogListCont.Result = "审批通过"
flowLogListCont.Condition = "已结束"
flowLogListCont.StateType = 3
case 4:
flowLogListCont.Result = "驳回"
flowLogListCont.Condition = "审批中"
flowLogListCont.StateType = 4
default:
flowLogListCont.Result = "审批中"
flowLogListCont.Condition = "审批中"
flowLogListCont.StateType = 0
}
flowLogListOut = append(flowLogListOut, flowLogListCont)
}
countSum := len(flowLogListOut)
printData := commonus.OutPutList(total, int64(countSum), requestData.Page, requestData.PageSize, flowLogListOut)
response.Result(0, printData, "查询成功!", c)
if countSum > 0 {
response.Result(0, printData, "查询成功!", c)
} else {
response.Result(3000, printData, "没有数据", c)
}
}

6
api/index/evaluation/type.go

@ -286,7 +286,7 @@ type FlowLogType struct {
// 流程记录输出
type FlowLogListOut struct {
OutId string `json:"outid"` //id
Title string `json:"tittle"` //流程名
Title string `json:"title"` //流程名
Node string `json:"node"` //当前节点
CurrentPeo string `json:"currentpeo"` //当前负责人
FounDer string `json:"founder"` //创建人
@ -303,8 +303,8 @@ type FlowLogListOut struct {
Week int64 `json:"week"` //周"`
Days int64 `json:"days"` //天
MonthDays string `json:"monthdays"` //提报日期
IsSet int `json:"isset"` //是否已经审批
StateType int `json:"statetype"` //1:起草,2:审批中;3:通过;4:驳回;0:审批中
IsSet int `json:"isset"` //是否已经审批
}
// 新定性考核列表

3
api/reply/qual/controller.go

@ -11,6 +11,7 @@ import (
"gin_server_admin/global"
"gin_server_admin/model/assessmentmodel"
"gin_server_admin/model/common/response"
"github.com/gin-gonic/gin"
)
@ -674,6 +675,6 @@ func (a *ApiGroup) Operation(c *gin.Context) {
return
}
}
response.Result(0, outMap, "审批流不存在!请检查您的数据!", c)
response.Result(0, outMap, "审批成功!", c)
}

15
api/reply/quan/ration.go

@ -12,6 +12,7 @@ import (
"gin_server_admin/global"
"gin_server_admin/model/assessmentmodel"
"gin_server_admin/model/common/response"
"github.com/gin-gonic/gin"
)
@ -339,17 +340,17 @@ func (a *ApiGroup) SendRationFlow(c *gin.Context) {
}
userKey, userKeyErr := strconv.ParseInt(userCont.Key, 10, 64)
if userKeyErr != nil {
response.Result(102, isTrue, "您的身份令牌已经失效!请重新登录获取身份令牌!", c)
response.Result(102, userKeyErr, "您的身份令牌已经失效!请重新登录获取身份令牌!", c)
return
}
departmentId, departmentIdErr := strconv.ParseInt(userCont.Deparment, 10, 64)
departmentId, departmentIdErr := strconv.ParseInt(userCont.MainDeparment, 10, 64)
if departmentIdErr != nil {
response.Result(103, isTrue, "您的身份令牌已经失效!请重新登录获取身份令牌!", c)
response.Result(103, userCont, "您的身份令牌已经失效!请重新登录获取身份令牌!", c)
return
}
userGroup, userGroupErr := strconv.ParseInt(userCont.Company, 10, 64)
if userGroupErr != nil {
response.Result(104, isTrue, "您的身份令牌已经失效!请重新登录获取身份令牌!", c)
response.Result(104, userGroupErr, "您的身份令牌已经失效!请重新登录获取身份令牌!", c)
return
}
@ -464,9 +465,9 @@ func (a *ApiGroup) SendRationFlow(c *gin.Context) {
var evaluationIdStr string
global.GVA_DB_Performanceappraisal.Model(&assessmentmodel.FlowLog{}).Select("fl_evaluation_id").Where(existenceProess).First(&evaluationIdStr)
var evaluationIdStrAry []string
// if evaluationIdStr != "" {
// evaluationIdStrAry = strings.Split(evaluationIdStr, ",")
// }
if evaluationIdStr != "" { //判断已经提交过的数据
evaluationIdStrAry = strings.Split(evaluationIdStr, ",")
}
var flowDataLogAry []assessmentmodel.FlowLogData
var reason string

1
api/statistics/quantification/quant.go

@ -9,6 +9,7 @@ import (
"gin_server_admin/model/assessmentmodel"
"gin_server_admin/model/common/response"
"gin_server_admin/model/hrsystem"
"github.com/gin-gonic/gin"
)

6
api/v1/custom/customhandle.go

@ -28,7 +28,8 @@ func (cu *CustomHandle) CustomLogin(c *gin.Context) {
// return
// }
userAgent := c.Request.Header.Get("User-Agent")
userAgent = "250"
// userAgent = "250"
userAgent = global.GVA_CONFIG.MyConfig.AppKey
// store
// if store.Verify(l.CaptchaId, l.Captcha, true) {
userErr, user := staff.GetUserWork(l.Username, l.Password)
@ -352,7 +353,8 @@ func (cu *CustomHandle) ScanCodeLogin(c *gin.Context) {
// return
// }
userAgent := c.Request.Header.Get("User-Agent")
userAgent = "250"
// userAgent = "250"
userAgent = global.GVA_CONFIG.MyConfig.AppKey
userAdminErr, userAdmin := systemuser.GetSysAdminLoginInfo(l.Username, l.Password)
// fmt.Printf("jieguo----------------->%v\n", userAdminErr)

33
commonus/publichaneld.go

@ -21,6 +21,7 @@ import (
"gin_server_admin/model/testpage"
"gin_server_admin/model/wechat"
"gin_server_admin/utils/redishandel"
"github.com/mitchellh/mapstructure"
"github.com/mozillazg/go-pinyin"
"gorm.io/gorm"
@ -673,21 +674,22 @@ func getPeopleInfo() (redisUserInfo testpage.RedisUserInfo, isTrue bool) {
if ueInfo.WorkWechat != "" {
wechatStr = ueInfo.WorkWechat
}
redisUserInfo.Id = strconv.FormatInt(ueInfo.Id, 10) // `json:"id"`
redisUserInfo.Key = strconv.FormatInt(ueInfo.Key, 10) // `json:"key"`
redisUserInfo.Number = ueInfo.Number // `json:"number"`
redisUserInfo.Name = ueInfo.Name // `json:"name"`
redisUserInfo.Positionleveles = strconv.FormatInt(ueInfo.JobLeve, 10) // `json:"positionleveles"`
redisUserInfo.Position = strconv.FormatInt(ueInfo.Position, 10) // `json:"position"`
redisUserInfo.Adminorg = strconv.FormatInt(ueInfo.AdminOrg, 10) // `json:"adminorg"`
redisUserInfo.Company = strconv.FormatInt(ueInfo.Company, 10) // `json:"company"`
redisUserInfo.Emptype = fmt.Sprintf("%v", ueInfo.EmpType) // `json:"emptype"`
redisUserInfo.Deparment = ueInfo.Deparment // `json:"deparment"`
redisUserInfo.Jobclass = strconv.FormatInt(ueInfo.JobClass, 10) // `json:"jobclass"`
redisUserInfo.Positiongrade = strconv.FormatInt(ueInfo.JobLeve, 10) // `json:"positiongrade"`
redisUserInfo.Role = ueInfo.Role // `json:"role"`
redisUserInfo.Icon = ueInfo.Icon // `json:"icon"`
redisUserInfo.Wechat = wechatStr // `json:"wechat"`
redisUserInfo.Id = strconv.FormatInt(ueInfo.Id, 10) // `json:"id"`
redisUserInfo.Key = strconv.FormatInt(ueInfo.Key, 10) // `json:"key"`
redisUserInfo.Number = ueInfo.Number // `json:"number"`
redisUserInfo.Name = ueInfo.Name // `json:"name"`
redisUserInfo.Positionleveles = strconv.FormatInt(ueInfo.JobLeve, 10) // `json:"positionleveles"`
redisUserInfo.Position = strconv.FormatInt(ueInfo.Position, 10) // `json:"position"`
redisUserInfo.Adminorg = strconv.FormatInt(ueInfo.AdminOrg, 10) // `json:"adminorg"`
redisUserInfo.Company = strconv.FormatInt(ueInfo.Company, 10) // `json:"company"`
redisUserInfo.Emptype = fmt.Sprintf("%v", ueInfo.EmpType) // `json:"emptype"`
redisUserInfo.MainDeparment = strconv.FormatInt(ueInfo.MainDeparment, 10) // `json:"company"`
redisUserInfo.Deparment = ueInfo.Deparment // `json:"deparment"`
redisUserInfo.Jobclass = strconv.FormatInt(ueInfo.JobClass, 10) // `json:"jobclass"`
redisUserInfo.Positiongrade = strconv.FormatInt(ueInfo.JobLeve, 10) // `json:"positiongrade"`
redisUserInfo.Role = ueInfo.Role // `json:"role"`
redisUserInfo.Icon = ueInfo.Icon // `json:"icon"`
redisUserInfo.Wechat = wechatStr // `json:"wechat"`
menuStr, buttonStr := getRoleInt(ueInfo.Role)
redisUserInfo.Jurisdiction = buttonStr // `json:"jurisdiction"`
redisUserInfo.Menuoper = menuStr // `json:"menuoper"`
@ -714,6 +716,7 @@ func getPeopleInfo() (redisUserInfo testpage.RedisUserInfo, isTrue bool) {
"adminorg": strconv.FormatInt(ueInfo.AdminOrg, 10),
"company": strconv.FormatInt(ueInfo.Company, 10),
"emptype": fmt.Sprintf("%v", ueInfo.EmpType),
"maindeparment": ueInfo.MainDeparment,
"deparment": ueInfo.Deparment,
"jobclass": strconv.FormatInt(ueInfo.JobClass, 10),
"positiongrade": strconv.FormatInt(ueInfo.JobLeve, 10),

390
config_yun.yaml

@ -0,0 +1,390 @@
# gin_server_admin Global Configuration
# jwt configuration
jwt:
signing-key: 'qmPlus'
expires-time: 604800
buffer-time: 86400
issuer: 'qmPlus'
signing-key: a77a9442-4c2b-466b-a650-9495e04d285c
# zap logger configuration
zap:
level: 'info'
format: 'console'
prefix: '[gin_server_admin]'
director: 'log'
show-line: true
encode-level: 'LowercaseColorLevelEncoder'
stacktrace-key: 'stacktrace'
log-in-console: true
# redis configuration
redis:
db: 0
addr: 127.0.0.1:6379
password: ""
rediswechat:
db: 1
addr: 127.0.0.1:6379
password: ""
rediswechat2:
db: 2
addr: 127.0.0.1:6379
password: ""
rediswechat5:
db: 5
addr: 127.0.0.1:6379
password: ""
redisprefix:
prefix: "HXGK_GO_ZhixingCollege"
alias: "dev"
# email configuration
email:
to: 'xxx@qq.com'
port: 465
from: 'xxx@163.com'
host: 'smtp.163.com'
is-ssl: true
secret: 'xxx'
nickname: 'test'
# casbin configuration
casbin:
model-path: './resource/rbac_model.conf'
# system configuration
system:
env: 'public' # Change to "develop" to skip authentication for development mode
addr: 8888
#addr: 8889
db-type: 'mysql'
oss-type: 'local' # 控制oss选择走本期还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置
use-multipoint: false
# IP限制次数 一个小时15000次
iplimit-count: 15000
# IP限制一个小时
iplimit-time: 3600
# captcha configuration
captcha:
key-long: 6
img-width: 240
img-height: 80
# mysql connect configuration
# 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://www.gin_server_admin.com/docs/first)
mysql:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'gva'
username: 'gva'
password: 'YNsk3zbP4sTASmzJ'
max-idle-conns: 100
max-open-conns: 1500
log-mode: false
log-zap: ""
# local configuration
local:
path: 'uploads/file'
# autocode configuration
autocode:
transfer-restart: true
# root 自动适配项目根目录
# 请不要手动配置,他会在项目加载的时候识别出根路径
root: ""
server: /gin_server_admin
server-api: /api/v1/autocode
server-initialize: /initialize
server-model: /model/autocode
server-request: /model/autocode/request/
server-router: /router/autocode
server-service: /service/autocode
web: /web/src
web-api: /api
web-form: /view
web-table: /view
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
qiniu:
zone: 'ZoneHuaDong'
bucket: ''
img-path: ''
use-https: false
access-key: ''
secret-key: ''
use-cdn-domains: false
# aliyun oss configuration
aliyun-oss:
endpoint: 'yourEndpoint'
access-key-id: 'yourAccessKeyId'
access-key-secret: 'yourAccessKeySecret'
bucket-name: 'yourBucketName'
bucket-url: 'yourBucketUrl'
base-path: 'yourBasePath'
# tencent cos configuration
tencent-cos:
bucket: 'xxxxx-10005608'
region: 'ap-shanghai'
secret-id: 'xxxxxxxx'
secret-key: 'xxxxxxxx'
base-url: 'https://gin.vue.admin'
path-prefix: 'gin_server_admin'
# excel configuration
excel:
dir: './resource/excel/'
# timer task db clear table
Timer:
start: true
spec: "@daily" # 定时任务详细配置参考 https://pkg.go.dev/github.com/robfig/cron/v3
detail: [
# tableName: 需要清理的表名
# compareField: 需要比较时间的字段
# interval: 时间间隔, 具体配置详看 time.ParseDuration() 中字符串表示 且不能为负数
# 2160h = 24 * 30 * 3 -> 三个月
{ tableName: "sys_operation_records" , compareField: "created_at", interval: "2160h" },
{ tableName: "jwt_blacklists" , compareField: "created_at", interval: "168h" }
#{ tableName: "log2" , compareField: "created_at", interval: "2160h" }
]
# mysql connect configuration
# 其他数据库配置
#app主数据库
mysqlMaster:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'hengxingaoke_tes'
username: 'hengxingaoke_tes'
password: 'JsTt6iTpkZ85wDnF'
max-idle-conns: 100
max-open-conns: 1500
log-mode: false
log-zap: ""
#文档属性数据库
mysqlBookDate:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'learnmessage'
username: 'learnmessage'
password: 'JyppSdcLT27f7dpB'
max-idle-conns: 10
max-open-conns: 100
log-mode: false
log-zap: ""
#微信员工信息表
mysqlWatchDate:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'wechatuser'
username: 'wechatuser'
password: '8jrFG2AzpJPxs88m'
max-idle-conns: 10
max-open-conns: 100
log-mode: false
log-zap: ""
#错题库
mysqlErrorSubjectDate:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'errorsubject'
username: 'errorsubject'
password: 'abRcXzraCMFYC4Me'
max-idle-conns: 10
max-open-conns: 100
log-mode: false
log-zap: ""
#自我测验
mysqlMyTestDate:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'selftestdatabase'
username: 'selftestdatabase'
password: 'mXDWEBJCd5acnCjD'
max-idle-conns: 10
max-open-conns: 100
log-mode: false
log-zap: ""
#图文信息数据库
mysqlBooImgkDate:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'readdocument'
username: 'readdocument'
password: 'CY2yanCmAP8p8bxj'
max-idle-conns: 10
max-open-conns: 100
log-mode: false
log-zap: ""
#计分明细数据库
mysqlIntegralDate:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'leaguetabledata'
username: 'leaguetabledata'
password: 'PxeX8Dnw88G4Jpnr'
max-idle-conns: 10
max-open-conns: 100
log-mode: false
log-zap: ""
#趣味问答
mysqlQADate:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'ques_and_answers'
username: 'ques_and_answers'
password: 'CT7XGBrAwdnXkTNX'
max-idle-conns: 10
max-open-conns: 100
log-mode: false
log-zap: ""
#风云榜统计数据库
mysqlBillboardDate:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'statisticsing'
username: 'statisticsing'
password: '4iMZNtMT8fk8imEb'
max-idle-conns: 10
max-open-conns: 100
log-mode: false
log-zap: ""
#健康上报数据库
mysqlHealthReportDate:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'location'
username: 'location'
password: 'XreBJrkYh7K3jfbm'
max-idle-conns: 10
max-open-conns: 100
log-mode: false
log-zap: ""
#审批流程数据库
mysqlApprovalProcess:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'workflow'
username: 'workflow'
password: 'kSwXD3LBsnJ8dsz4'
max-idle-conns: 100
max-open-conns: 1500
log-mode: false
log-zap: ""
#绩效考核数据库
mysqlPerformanceappraisal:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'perform'
username: 'perform'
password: 'amtzSrN5WnMsS4hb'
max-idle-conns: 100
max-open-conns: 1500
log-mode: false
log-zap: ""
#企业微信回调记录
mysqlWechatCallBack:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'wechatlog'
username: 'wechatlog'
password: 'j7Hs8Tb6SkZzy2ee'
max-idle-conns: 100
max-open-conns: 1500
log-mode: false
log-zap: ""
#HR系统
hrdatabase:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'hr_new'
username: 'hr_new'
password: 'kPMP6NafMsdccxDX'
max-idle-conns: 100
max-open-conns: 1500
log-mode: false
log-zap: ""
#HR系统(新)
hrdatabasekingdee:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'human_resources'
username: 'human_resources'
password: 'hn4FaeBtePdnw2K6'
max-idle-conns: 100
max-open-conns: 1500
log-mode: false
log-zap: ""
#企业微信相关设置
workwechatid:
companyid: 'ww02f310301953277a' #企业ID
workwechatschool: #知行学院
agentid: 1000008
secretstr: 'YJOHrmHtvevAdctg-06TMLnPokIaLHdfrQMyQolZQC8'
#知行学院API接收消息
wechattokening: 'kkUA3s2s3' #Token
encodingaeskey: 'ZI29of85mTgQPik8LLjDnYKlAECDbI23Pq886VJ9Azf' #EncodingAESKey
workwechatappmaillist: #通讯录
secretstr: 'yjcQXkh6_116QKjfZfbRSyzdrFFZ9jbVlKJtL2tn3OU'
token: ''
encodingaeskey: ''
healthreport: #健康上报
secretstr: 'smjpGmFo5wp18BZGiLaECFr84Blv429v_GFdKp4_0YQ'
#测试企业
workwechatids:
companyid: 'ww708746402de33ba7' #企业ID
#知行学院API接收消息
workwechattoken: 'kkUA3s2s3' #Token
encodingaeskey: 'ZI29of85mTgQPik8LLjDnYKlAECDbI23Pq886VJ9Azf' #EncodingAESKey
workwechatschools: #测试
agentid: 1000021
secretstr: 'rbqos2un6vVY5k_c2aOFK6HUuONeJsiBqwRZXTDVBKU'
#知行学院API接收消息
wechattokening: 'kkUA3s2s3' #Token
encodingaeskey: 'ZI29of85mTgQPik8LLjDnYKlAECDbI23Pq886VJ9Azf' #EncodingAESKey
workwechatappmaillists: #通讯录
secretstr: 'TSSsJXiqh3RKl0NYIoB-sPc43MUIRJ1ppALWtzyLY94'
token: ''
encodingaeskey: ''
healthreports: #健康上报
secretstr: 'smjpGmFo5wp18BZGiLaECFr84Blv429v_GFdKp4_0YQ'
privateConfig: #私人配置
# visit: 'http://docu.hxgk.net/uploadfileing/uploadimging'
visit: 'http://docs.hxgk.group/uploadfileing/uploadimging'
appKey: 'heng_xin_gao_ke_AppKey'

BIN
server.exe → gin_server_admin

Binary file not shown.

1
go.sum

@ -106,7 +106,6 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6 h1:6VSn3hB5U5GeA6kQw4TwWIWbOhtvR2hmbBJnTOtqTWc=
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6/go.mod h1:YxOVT5+yHzKvwhsiSIWmbAYM3Dr9AEEbER2dVayfBkg=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/gzip v0.0.1 h1:ezvKOL6jH+jlzdHNE4h9h8q8uMpDQjyl0NN0Jd7jozc=
github.com/gin-contrib/gzip v0.0.1/go.mod h1:fGBJBCdt6qCZuCAOwWuFhBB4OOq9EFqlo5dEaFhhu5w=
github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=

6
initialize/router.go

@ -7,9 +7,9 @@ import (
"gin_server_admin/global"
"gin_server_admin/middleware"
"gin_server_admin/router"
"github.com/gin-gonic/gin"
ginSwagger "github.com/swaggo/gin-swagger"
"github.com/swaggo/gin-swagger/swaggerFiles"
// ginSwagger "github.com/swaggo/gin-swagger"
)
// 初始化总路由
@ -32,7 +32,7 @@ func Routers() *gin.Engine {
// 跨域
//Router.Use(middleware.Cors()) // 如需跨域可以打开
global.GVA_LOG.Info("use middleware cors")
Router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
// Router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
global.GVA_LOG.Info("register swagger handler")
// 方便统一添加路由组前缀 多服务器上线使用

6
middleware/myjwt.go

@ -11,6 +11,7 @@ import (
"gin_server_admin/model/hrsystem"
"gin_server_admin/service"
"gin_server_admin/utils/redishandel"
"github.com/gin-gonic/gin"
"github.com/mitchellh/mapstructure"
)
@ -255,7 +256,8 @@ func ScanCodeLogin() gin.HandlerFunc {
c.Abort()
return
}
userAgent = "250"
// userAgent = "250"
userAgent = global.GVA_CONFIG.MyConfig.AppKey
var md5JiaMi commonus.Md5Encryption
md5JiaMi.Md5EncryptionInit(userAgent)
md5Token := md5JiaMi.Md5EncryptionAlgorithm()
@ -266,7 +268,7 @@ func ScanCodeLogin() gin.HandlerFunc {
sha1Str := userKeyCode + myCustomIdentify.UserNumber + myCustomIdentify.UserPwd + md5Token
sha1Token := commonus.Sha1Encryption(sha1Str)
// fmt.Printf("token=========>%v---->%v---->%v\n", md5Token, sha1Token, userAgent)
// fmt.Printf("token=========>%v---->%v---->%v---->%v---->%v\n", userKeyCode, myCustomIdentify.UserNumber, myCustomIdentify.UserPwd, md5Token, sha1Token)
if sha1Token != userToken {
response.FailWithDetailed(gin.H{"reload": true, "code": 104, "sha1Token": sha1Token, "userToken": userToken}, "授权已过期", c)
c.Abort()

1
model/testpage/myuser.go

@ -67,6 +67,7 @@ type RedisUserInfo struct {
Adminorg string `json:"adminorg"`
Company string `json:"company"`
Emptype string `json:"emptype"`
MainDeparment string `json:"maindeparment"`
Deparment string `json:"deparment"`
Jobclass string `json:"jobclass"`
Positiongrade string `json:"positiongrade"`

1
router/statisticsrouter/statistics.go

@ -2,6 +2,7 @@ package statisticsrouter
import (
"gin_server_admin/api/statistics"
"github.com/gin-gonic/gin"
)

Loading…
Cancel
Save