@@ -1,5 +1,7 @@ | |||||
package dao | package dao | ||||
import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | |||||
type InstallmentPaymentListDao interface { | type InstallmentPaymentListDao interface { | ||||
//TODO:: You can add specific method definitions here | |||||
GetInstallmentPaymentListById(id int) (m *models.InstallmentPaymentList, err error) | |||||
} | } |
@@ -2,13 +2,27 @@ | |||||
import ( | import ( | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | "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" | "xorm.io/xorm" | ||||
) | ) | ||||
func NewInstallmentPaymentListDb(engine *xorm.Engine) dao.InstallmentPaymentListDao { | |||||
return &InstallmentPaymentListDb{Db: engine} | |||||
} | |||||
type InstallmentPaymentListDb struct { | type InstallmentPaymentListDb struct { | ||||
Db *xorm.Engine | 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 | |||||
} | } |
@@ -2,6 +2,7 @@ package implement | |||||
import ( | import ( | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | |||||
"xorm.io/xorm" | "xorm.io/xorm" | ||||
) | ) | ||||
@@ -9,6 +10,11 @@ type SuperCloudIssuancePackageOrdDb struct { | |||||
Db *xorm.Engine | Db *xorm.Engine | ||||
} | } | ||||
func (s SuperCloudIssuancePackageOrdDb) GetCloudIssuancePackageOrd(ordNo string) (m *models.SuperCloudIssuancePackageOrd, err error) { | |||||
//TODO implement me | |||||
panic("implement me") | |||||
} | |||||
func NewSuperCloudIssuancePackageOrdDb(engine *xorm.Engine) dao.SuperCloudIssuancePackageOrdDao { | func NewSuperCloudIssuancePackageOrdDb(engine *xorm.Engine) dao.SuperCloudIssuancePackageOrdDao { | ||||
return &SuperCloudIssuancePackageOrdDb{Db: engine} | return &SuperCloudIssuancePackageOrdDb{Db: engine} | ||||
} | } |