paychannel2

This commit is contained in:
jiangyong27 2025-04-03 12:09:04 +08:00
parent e39b14a4df
commit 2308020660
1 changed files with 14 additions and 4 deletions

View File

@ -100,11 +100,21 @@ func (s *StaffUser) From(m *model.StaffUser) {
s.PayeeAlipayAuthQrcode, _ = butil.CreateQrcodeBase64V2(s.PayeeAlipayAuthUrl, qrcode.Low, 300) s.PayeeAlipayAuthQrcode, _ = butil.CreateQrcodeBase64V2(s.PayeeAlipayAuthUrl, qrcode.Low, 300)
tags := make([]*Tag, 0) tags := make([]*Tag, 0)
if payee.BankName != "" && payee.BankCard != "" { payChannel := m.GetConfig().PayChannel
tags = append(tags, &Tag{Name: "银行卡", Type: "success"}) if payChannel == "" {
tags = append(tags, &Tag{Name: "未填工资发放渠道", Type: "warning"})
} else {
if payChannel == model.StaffSalaryPaymentAlipay {
tags = append(tags, &Tag{Name: "支付宝", Type: "success"})
} else {
tags = append(tags, &Tag{Name: "银行卡", Type: "success"})
}
} }
if payee.AlipayUid != "" { if payee.BankName == "" || payee.BankCard == "" {
tags = append(tags, &Tag{Name: "支付宝", Type: "success"}) tags = append(tags, &Tag{Name: "未填银行卡", Type: "warning"})
}
if payee.AlipayUid == "" {
tags = append(tags, &Tag{Name: "未绑支付宝", Type: "warning"})
} }
if m.Phone == "" { if m.Phone == "" {
tags = append(tags, &Tag{Name: "未填手机号", Type: "warning"}) tags = append(tags, &Tag{Name: "未填手机号", Type: "warning"})