Explorar el Código

分期付

master
huangjiajun hace 6 meses
padre
commit
7681773b89
Se han modificado 2 ficheros con 12 adiciones y 0 borrados
  1. +1
    -0
      src/dao/installment_payment_list_dao.go
  2. +11
    -0
      src/implement/installment_payment_list_db.go

+ 1
- 0
src/dao/installment_payment_list_dao.go Ver fichero

@@ -7,6 +7,7 @@ import (

type InstallmentPaymentListDao interface {
GetInstallmentPaymentListById(id int) (m *models.InstallmentPaymentList, err error)
GetInstallmentPaymentListByOidSess(sess *xorm.Session, oid string) (m *models.InstallmentPaymentList, err error)
FinInstallmentPaymentList(arg map[string]string) (m *[]models.InstallmentPaymentList, err error)
UpdateInstallmentPaymentListBySess(sess *xorm.Session, m *models.InstallmentPaymentList, forceColums ...string) (int64, error)
InsertInstallmentPaymentList(m *models.InstallmentPaymentList) (id int, err error)


+ 11
- 0
src/implement/installment_payment_list_db.go Ver fichero

@@ -52,6 +52,17 @@ func (i InstallmentPaymentListDb) GetInstallmentPaymentListById(id int) (m *mode
}
return m, nil
}
func (i InstallmentPaymentListDb) GetInstallmentPaymentListByOidSess(sess *xorm.Session, oid string) (m *models.InstallmentPaymentList, err error) {
m = new(models.InstallmentPaymentList)
has, err := sess.Where("ord_id =?", oid).Get(m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return m, nil
}
func (i InstallmentPaymentListDb) FinInstallmentPaymentList(arg map[string]string) (m *[]models.InstallmentPaymentList, err error) {
mm := make([]models.InstallmentPaymentList, 0)
sess := i.Db.Where("uid=?", arg["uid"])


Cargando…
Cancelar
Guardar