|
|
@@ -2,13 +2,27 @@ |
|
|
|
|
|
|
|
import ( |
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" |
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" |
|
|
|
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
|
func NewInstallmentPaymentListDb(engine *xorm.Engine) dao.InstallmentPaymentListDao { |
|
|
|
return &InstallmentPaymentListDb{Db: engine} |
|
|
|
} |
|
|
|
|
|
|
|
type InstallmentPaymentListDb struct { |
|
|
|
Db *xorm.Engine |
|
|
|
} |
|
|
|
|
|
|
|
func NewInstallmentPaymentListDb(engine *xorm.Engine) dao.InstallmentPaymentListDao { |
|
|
|
return &InstallmentPaymentListDb{Db: engine} |
|
|
|
func (i InstallmentPaymentListDb) GetInstallmentPaymentListById(id int) (m *models.InstallmentPaymentList, err error) { |
|
|
|
m = new(models.InstallmentPaymentList) |
|
|
|
has, err := i.Db.Where("id =?", id).Get(m) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
if has == false { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |