28 lines
789 B
Go
28 lines
789 B
Go
package dao
|
|
|
|
import (
|
|
"hospital-admin-api/api/model"
|
|
"hospital-admin-api/global"
|
|
)
|
|
|
|
type DoctorWithdrawalBankDao struct {
|
|
}
|
|
|
|
// GetDoctorWithdrawalBankById 获取医生提现关联银行数据-id
|
|
func (r *DoctorWithdrawalBankDao) GetDoctorWithdrawalBankById(withdrawalBankId int64) (m *model.DoctorWithdrawalBank, err error) {
|
|
err = global.Db.First(&m, withdrawalBankId).Error
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// GetDoctorWithdrawalBankByWithdrawalId 获取医生提现关联银行数据-提现id
|
|
func (r *DoctorWithdrawalBankDao) GetDoctorWithdrawalBankByWithdrawalId(withdrawalId int64) (m *model.DoctorWithdrawalBank, err error) {
|
|
err = global.Db.Where("withdrawal_id = ?", withdrawalId).First(&m).Error
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|