This commit is contained in:
jiangyong27 2023-10-07 14:18:46 +08:00
parent 9eeeed8e2b
commit 93e6f387bd
2 changed files with 11 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package controller
import ( import (
"enterprise/server/service" "enterprise/server/service"
"enterprise/worker"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"strings" "strings"
"time" "time"
@ -30,3 +31,11 @@ func (s *Staff) Salary(ctx *gin.Context) {
serv.Summary(month, ctx) serv.Summary(month, ctx)
} }
} }
func (s *Staff) SyncStaffInfo(ctx *gin.Context) {
go worker.SyncStaffInfo()
}
func (s *Staff) SyncStaffSalary(ctx *gin.Context) {
go worker.SyncStaffSalary("")
}

View File

@ -17,6 +17,8 @@ func initRoutge(engine *gin.Engine) {
apiGroup.Any("/qyweixin/approve", qyweixin.Approve) apiGroup.Any("/qyweixin/approve", qyweixin.Approve)
group.GET("/staff/salary", staff.Salary) group.GET("/staff/salary", staff.Salary)
group.GET("/staff/snyc/salary", staff.SyncStaffSalary)
group.GET("/staff/snyc/info", staff.SyncStaffInfo)
engine.LoadHTMLGlob("conf/template/*") engine.LoadHTMLGlob("conf/template/*")
} }