sync
This commit is contained in:
parent
9eeeed8e2b
commit
93e6f387bd
|
@ -2,6 +2,7 @@ package controller
|
|||
|
||||
import (
|
||||
"enterprise/server/service"
|
||||
"enterprise/worker"
|
||||
"github.com/gin-gonic/gin"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -30,3 +31,11 @@ func (s *Staff) Salary(ctx *gin.Context) {
|
|||
serv.Summary(month, ctx)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Staff) SyncStaffInfo(ctx *gin.Context) {
|
||||
go worker.SyncStaffInfo()
|
||||
}
|
||||
|
||||
func (s *Staff) SyncStaffSalary(ctx *gin.Context) {
|
||||
go worker.SyncStaffSalary("")
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@ func initRoutge(engine *gin.Engine) {
|
|||
apiGroup.Any("/qyweixin/approve", qyweixin.Approve)
|
||||
|
||||
group.GET("/staff/salary", staff.Salary)
|
||||
group.GET("/staff/snyc/salary", staff.SyncStaffSalary)
|
||||
group.GET("/staff/snyc/info", staff.SyncStaffInfo)
|
||||
|
||||
engine.LoadHTMLGlob("conf/template/*")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue