payee
This commit is contained in:
parent
e110515255
commit
ce3256c390
|
@ -103,6 +103,10 @@ func (s *StaffUser) Create(sess *session.AdminSession, req *api.StaffCreateReq)
|
|||
staffUser.Idno = staffInfo.Idno
|
||||
staffUser.EntryDate = staffInfo.EntryDate
|
||||
staffUser.OfficialDate = staffInfo.OfficialDate
|
||||
payee := staffUser.GetPayee()
|
||||
payee.BankName = staffInfo.BankName
|
||||
payee.BankCard = staffInfo.BankCard
|
||||
staffUser.Payee = goutil.EncodeJSON(payee)
|
||||
}
|
||||
|
||||
staffUser.CorpId = sess.GetAdmin().CorpId
|
||||
|
@ -129,6 +133,10 @@ func (s *StaffUser) Update(sess *session.AdminSession, req *api.StaffUpdateReq)
|
|||
staffUser.Idno = goutil.If(staffUser.Idno == "", staffInfo.Idno, staffUser.Idno)
|
||||
staffUser.OfficialDate = goutil.If(staffUser.OfficialDate == "" || staffUser.OfficialDate == "NaN-NaN-NaN", staffInfo.OfficialDate, staffUser.OfficialDate)
|
||||
staffUser.EntryDate = goutil.If(staffUser.EntryDate == "" || staffUser.EntryDate == "NaN-NaN-NaN", staffInfo.EntryDate, staffUser.EntryDate)
|
||||
payee := staffUser.GetPayee()
|
||||
payee.BankName = goutil.If(payee.BankName == "", staffInfo.BankName, payee.BankName)
|
||||
payee.BankCard = goutil.If(payee.BankCard == "", staffInfo.BankCard, payee.BankCard)
|
||||
staffUser.Payee = goutil.EncodeJSON(payee)
|
||||
}
|
||||
|
||||
staffUser.Username = goutil.If(req.Username != "", req.Username, staffUser.Username)
|
||||
|
|
Loading…
Reference in New Issue