conf
This commit is contained in:
parent
552ca9a699
commit
810da6a9af
|
@ -39,6 +39,7 @@ type QyWeixin struct {
|
||||||
Corpid string `toml:"corpid"`
|
Corpid string `toml:"corpid"`
|
||||||
CheckinAgent string `toml:"checkin_agent"`
|
CheckinAgent string `toml:"checkin_agent"`
|
||||||
CheckinSecret string `toml:"checkin_secret"`
|
CheckinSecret string `toml:"checkin_secret"`
|
||||||
|
CheckinGroup string `toml:"checkin_group"`
|
||||||
EnterpriseAgent string `toml:"enterprise_agent"`
|
EnterpriseAgent string `toml:"enterprise_agent"`
|
||||||
EnterpriseSecret string `toml:"enterprise_secret"`
|
EnterpriseSecret string `toml:"enterprise_secret"`
|
||||||
HrAgent string `toml:"hr_agent"`
|
HrAgent string `toml:"hr_agent"`
|
||||||
|
|
|
@ -23,3 +23,4 @@ enterprise_agent = "1000009"
|
||||||
enterprise_secret = "oMB24UhKe50-XPTg7vhnwoTuhEXaq5XeiHPAUtF4hOs"
|
enterprise_secret = "oMB24UhKe50-XPTg7vhnwoTuhEXaq5XeiHPAUtF4hOs"
|
||||||
checkin_agent = "3010011"
|
checkin_agent = "3010011"
|
||||||
checkin_secret = "6ljYNGt4DonZLmr9SCtgkTlOvtqmsOchBrTWwGl_GpU"
|
checkin_secret = "6ljYNGt4DonZLmr9SCtgkTlOvtqmsOchBrTWwGl_GpU"
|
||||||
|
checkin_group = "1,2"
|
|
@ -17,4 +17,10 @@ password=""
|
||||||
|
|
||||||
[qyweixin]
|
[qyweixin]
|
||||||
corpid = "ww43c49db2e88a17f8"
|
corpid = "ww43c49db2e88a17f8"
|
||||||
|
hr_agent = "3010185"
|
||||||
|
hr_secret = "Ko2UQWZPbdM9N1snukp_1CT_3J7CcReyPAzl3ww2xoo"
|
||||||
|
enterprise_agent = "1000009"
|
||||||
|
enterprise_secret = "oMB24UhKe50-XPTg7vhnwoTuhEXaq5XeiHPAUtF4hOs"
|
||||||
|
checkin_agent = "3010011"
|
||||||
checkin_secret = "6ljYNGt4DonZLmr9SCtgkTlOvtqmsOchBrTWwGl_GpU"
|
checkin_secret = "6ljYNGt4DonZLmr9SCtgkTlOvtqmsOchBrTWwGl_GpU"
|
||||||
|
checkin_group = "1,2"
|
||||||
|
|
|
@ -6,12 +6,13 @@ import (
|
||||||
"enterprise/common/model"
|
"enterprise/common/model"
|
||||||
"enterprise/common/qyweixin"
|
"enterprise/common/qyweixin"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func SyncCheckin(day string) error {
|
func SyncCheckin(day string) error {
|
||||||
cfg := config.GetConfig()
|
cfg := config.GetConfig()
|
||||||
qyw := qyweixin.NewQyWeixin(cfg.QyWeixin.Corpid, cfg.QyWeixin.CheckinSecret)
|
qyw := qyweixin.NewQyWeixin(cfg.QyWeixin.Corpid, cfg.QyWeixin.CheckinSecret)
|
||||||
users, err := qyw.GetCheckinEmployee([]string{"1"})
|
users, err := qyw.GetCheckinEmployee(strings.Split(cfg.QyWeixin.CheckinGroup, ","))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue