alipay
This commit is contained in:
parent
7443a95a24
commit
68e58ce194
|
@ -122,14 +122,16 @@ func (s *Staff) PayStaffSalary(corpId int64, month string) {
|
||||||
log.Errorf("db error :%s", err.Error())
|
log.Errorf("db error :%s", err.Error())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if staffUser.GetConfig().PayChannel != model.StaffSalaryPaymentAlipay {
|
||||||
|
continue
|
||||||
|
}
|
||||||
message := make([]string, 0)
|
message := make([]string, 0)
|
||||||
message = append(message, fmt.Sprintf("【工资发放】[%s]", staffUser.Realname))
|
message = append(message, fmt.Sprintf("【支付宝工资发放】[%s]", staffUser.Realname))
|
||||||
message = append(message, fmt.Sprintf("实发工资:%.2f", staffSalary.GetRealSalary()))
|
message = append(message, fmt.Sprintf("实发工资:%.2f", staffSalary.GetRealSalary()))
|
||||||
message = append(message, fmt.Sprintf(`<a href="%s">查看明细</a>`, staffSalary.GetBillUrl()))
|
message = append(message, fmt.Sprintf(`<a href="%s">查看明细</a>`, staffSalary.GetBillUrl()))
|
||||||
|
|
||||||
if staffUser.Username == "jiangyong" {
|
if staffUser.Username == "jiangyong" {
|
||||||
err = service.NewPay().Pay(corp, staffUser, model.StaffSalaryPaymentAlipay, "", int64(100*staffSalary.GetRealSalary()))
|
err = service.NewPay().Pay(corp, staffUser, fmt.Sprintf("[%s]工资", staffSalary.Month), model.StaffSalaryPaymentAlipay, int64(100*staffSalary.GetRealSalary()))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
staffSalary.Status = model.StaffSalaryStatusPayed
|
staffSalary.Status = model.StaffSalaryStatusPayed
|
||||||
message = append(message, "发放成功")
|
message = append(message, "发放成功")
|
||||||
|
|
|
@ -19,6 +19,9 @@ func InitCorp1002(cron *gocron.Scheduler) {
|
||||||
corpId := int64(1002)
|
corpId := int64(1002)
|
||||||
staff := new(Staff)
|
staff := new(Staff)
|
||||||
|
|
||||||
|
cron.Every(1).Day().At("09:00").Do(func() {
|
||||||
|
go NewStaff().MontorWorkAge(corpId)
|
||||||
|
})
|
||||||
//同步每日考勤数据
|
//同步每日考勤数据
|
||||||
cron.Every(1).Day().At("05:00").Do(func() {
|
cron.Every(1).Day().At("05:00").Do(func() {
|
||||||
checkIn := NewCheckin(corpId)
|
checkIn := NewCheckin(corpId)
|
||||||
|
|
Loading…
Reference in New Issue