From 23080206608841ddfe7c8411c56ad6adeeda995e Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Thu, 3 Apr 2025 12:09:04 +0800 Subject: [PATCH] paychannel2 --- server/api/staff.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/server/api/staff.go b/server/api/staff.go index 5060b5d..cac90ce 100644 --- a/server/api/staff.go +++ b/server/api/staff.go @@ -100,11 +100,21 @@ func (s *StaffUser) From(m *model.StaffUser) { s.PayeeAlipayAuthQrcode, _ = butil.CreateQrcodeBase64V2(s.PayeeAlipayAuthUrl, qrcode.Low, 300) tags := make([]*Tag, 0) - if payee.BankName != "" && payee.BankCard != "" { - tags = append(tags, &Tag{Name: "银行卡", Type: "success"}) + payChannel := m.GetConfig().PayChannel + 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 != "" { - tags = append(tags, &Tag{Name: "支付宝", Type: "success"}) + if payee.BankName == "" || payee.BankCard == "" { + tags = append(tags, &Tag{Name: "未填银行卡", Type: "warning"}) + } + if payee.AlipayUid == "" { + tags = append(tags, &Tag{Name: "未绑支付宝", Type: "warning"}) } if m.Phone == "" { tags = append(tags, &Tag{Name: "未填手机号", Type: "warning"})