enterprise
This commit is contained in:
parent
21c8e8af2e
commit
2f14e5f435
|
@ -37,19 +37,8 @@ type Redis struct {
|
|||
|
||||
type QyWeixin struct {
|
||||
Corpid string `toml:"corpid"`
|
||||
|
||||
CheckinAgent string `toml:"checkin_agent"`
|
||||
CheckinSecret string `toml:"checkin_secret"`
|
||||
CheckinGroup string `toml:"checkin_group"`
|
||||
CheckinPayThresold float64 `toml:"checkin_pay_thresold"`
|
||||
CheckinOndutyPayDay string `toml:"checkin_onduty_pay_day"`
|
||||
|
||||
EnterpriseAgent string `toml:"enterprise_agent"`
|
||||
EnterpriseSecret string `toml:"enterprise_secret"`
|
||||
HrAgent string `toml:"hr_agent"`
|
||||
HrSecret string `toml:"hr_secret"`
|
||||
PaySecret string `toml:"pay_secret"`
|
||||
PayAgent string `toml:"pay_agent"`
|
||||
ApproveAgent string `toml:"approve_agent"`
|
||||
ApproveSecret string `toml:"approve_secret"`
|
||||
}
|
||||
|
|
|
@ -46,8 +46,8 @@ func (q *QyWeixin) Pay(ctx *gin.Context) {
|
|||
// 获取openid
|
||||
approve := qyweixin.NewAppApprove(&qyweixin.AppConfig{
|
||||
Corpid: config.GetConfig().QyWeixin.Corpid,
|
||||
Secret: config.GetConfig().QyWeixin.ApproveSecret,
|
||||
Agent: config.GetConfig().QyWeixin.ApproveAgent,
|
||||
Secret: config.GetConfig().QyWeixin.EnterpriseSecret,
|
||||
Agent: config.GetConfig().QyWeixin.EnterpriseAgent,
|
||||
})
|
||||
openid, err := approve.GetOpenid(userid)
|
||||
if err != nil {
|
||||
|
@ -62,8 +62,8 @@ func (q *QyWeixin) Pay(ctx *gin.Context) {
|
|||
req.TotalAmount = amount
|
||||
qyPay := qyweixin.NewAppPay(&qyweixin.PayConfig{
|
||||
Corpid: config.GetConfig().QyWeixin.Corpid,
|
||||
Secret: config.GetConfig().QyWeixin.PaySecret,
|
||||
Agent: config.GetConfig().QyWeixin.PayAgent,
|
||||
Secret: config.GetConfig().QyWeixin.EnterpriseSecret,
|
||||
Agent: config.GetConfig().QyWeixin.EnterpriseAgent,
|
||||
SerialNumber: config.GetConfig().WxPay.PaySerialNumber,
|
||||
ApiKey: config.GetConfig().WxPay.PayApiKeyV2,
|
||||
MchId: config.GetConfig().WxPay.PayMchId,
|
||||
|
|
|
@ -162,8 +162,8 @@ func (a *Approve) handleRefund(detail *qyweixin.ApproveDetail) {
|
|||
req.TotalAmount = int64(100 * newData.RefundAmount)
|
||||
qyPay := qyweixin.NewAppPay(&qyweixin.PayConfig{
|
||||
Corpid: config.GetConfig().QyWeixin.Corpid,
|
||||
Secret: config.GetConfig().QyWeixin.PaySecret,
|
||||
Agent: config.GetConfig().QyWeixin.PayAgent,
|
||||
Secret: config.GetConfig().QyWeixin.EnterpriseSecret,
|
||||
Agent: config.GetConfig().QyWeixin.EnterpriseAgent,
|
||||
SerialNumber: config.GetConfig().WxPay.PaySerialNumber,
|
||||
ApiKey: config.GetConfig().WxPay.PayApiKeyV2,
|
||||
MchId: config.GetConfig().WxPay.PayMchId,
|
||||
|
|
|
@ -25,8 +25,8 @@ func (c *Checkin) SyncCheckinMonth(month string) error {
|
|||
|
||||
qyw := qyweixin.NewAppCheckin(&qyweixin.AppConfig{
|
||||
Corpid: cfg.QyWeixin.Corpid,
|
||||
Secret: cfg.QyWeixin.CheckinSecret,
|
||||
Agent: cfg.QyWeixin.CheckinAgent,
|
||||
Secret: cfg.QyWeixin.EnterpriseSecret,
|
||||
Agent: cfg.QyWeixin.EnterpriseAgent,
|
||||
})
|
||||
users, err := qyw.GetCheckinEmployee(nil)
|
||||
if err != nil {
|
||||
|
@ -48,8 +48,8 @@ func (c *Checkin) SyncCheckinDay(day string) {
|
|||
cfg := config.GetConfig()
|
||||
qyw := qyweixin.NewAppCheckin(&qyweixin.AppConfig{
|
||||
Corpid: cfg.QyWeixin.Corpid,
|
||||
Secret: cfg.QyWeixin.CheckinSecret,
|
||||
Agent: cfg.QyWeixin.CheckinAgent,
|
||||
Secret: cfg.QyWeixin.EnterpriseSecret,
|
||||
Agent: cfg.QyWeixin.EnterpriseAgent,
|
||||
})
|
||||
if day == "" {
|
||||
day = time.Now().AddDate(0, 0, -1).Format("2006-01-02")
|
||||
|
|
|
@ -49,8 +49,8 @@ func (s *Staff) SyncStaffInfo() {
|
|||
cfg := config.GetConfig()
|
||||
hrAssiant := qyweixin.NewAppHr(&qyweixin.AppConfig{
|
||||
Corpid: cfg.QyWeixin.Corpid,
|
||||
Secret: cfg.QyWeixin.HrSecret,
|
||||
Agent: cfg.QyWeixin.HrSecret,
|
||||
Secret: cfg.QyWeixin.EnterpriseSecret,
|
||||
Agent: cfg.QyWeixin.EnterpriseAgent,
|
||||
})
|
||||
|
||||
userConfigs, err := dao.NewUserConfigDao().Query(model.UserConfigStatusNormal)
|
||||
|
|
Loading…
Reference in New Issue