enterprise/cmd/enterprise.go

45 lines
718 B
Go

package main
import (
"enterprise/common/config"
"enterprise/common/global"
"enterprise/common/weixin"
"enterprise/server"
"enterprise/worker"
)
func main() {
config.LoadServerConfig()
global.InitGlobal()
/*
if err := worker.Init(); err != nil {
panic(err)
}
*/
if err := server.Start(); err != nil {
panic(err)
}
}
func main3() {
config.LoadServerConfig()
global.InitGlobal()
//cfg := config.GetConfig()
worker.SyncStaffSalary("")
}
func main2() {
config.LoadServerConfig()
//global.InitGlobal()
pay := weixin.NewQyPay()
if err := pay.PayRedMoney(&weixin.RedMoneyReq{
TotalAmount: 200,
Title: "加班补贴",
Userid: "jiangyong",
}); err != nil {
panic(err)
}
}