This commit is contained in:
jiangyong27 2023-08-13 21:27:00 +08:00
parent 09994b5aba
commit b414a47c84
1 changed files with 12 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"enterprise/base/wechat/message"
"enterprise/common/config"
"enterprise/common/dao"
"enterprise/common/global"
"enterprise/common/model"
"enterprise/common/weixin"
"fmt"
@ -118,6 +119,17 @@ func (a *Approve) handleRefund(spNo string) {
log.Errorf("pay error :%s", err.Error())
return
}
message := make([]string, 0)
message = append(message, fmt.Sprintf("【红包发放】[%s]", refund.RefundType))
message = append(message, fmt.Sprintf("发放金额:%s", fmt.Sprintf("%.2f", refund.RefundAmount)))
message = append(message, fmt.Sprintf("员工名称:%s", refund.Username))
message = append(message, fmt.Sprintf("费用说明:%s", refund.RefundRemark))
if err := global.SendMessage([]string{"jiangyong"}, strings.Join(message, "\n")); err != nil {
log.Errorf("send message error :%s", err.Error())
}
refund.Status = model.ApprovalRefundStatusPayed
if err := dao.NewApprovalRefundDao().Update(&refund); err != nil {
log.Errorf("db error :%s", err.Error())