|
@@ -40,6 +40,17 @@ func (i InstallmentPaymentListDb) UpdateInstallmentPaymentListBySess(sess *xorm. |
|
|
} |
|
|
} |
|
|
return affected, nil |
|
|
return affected, nil |
|
|
} |
|
|
} |
|
|
|
|
|
func (i InstallmentPaymentListDb) GetInstallmentPaymentListByOid(id string) (m *models.InstallmentPaymentList, err error) { |
|
|
|
|
|
m = new(models.InstallmentPaymentList) |
|
|
|
|
|
has, err := i.Db.Where("ord_id =?", id).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) GetInstallmentPaymentListById(id int) (m *models.InstallmentPaymentList, err error) { |
|
|
func (i InstallmentPaymentListDb) GetInstallmentPaymentListById(id int) (m *models.InstallmentPaymentList, err error) { |
|
|
m = new(models.InstallmentPaymentList) |
|
|
m = new(models.InstallmentPaymentList) |
|
@@ -63,6 +74,17 @@ func (i InstallmentPaymentListDb) GetInstallmentPaymentListByIdSess(sess *xorm.S |
|
|
} |
|
|
} |
|
|
return m, nil |
|
|
return m, nil |
|
|
} |
|
|
} |
|
|
|
|
|
func (i InstallmentPaymentListDb) GetInstallmentPaymentListByOidSess(sess *xorm.Session, id string) (m *models.InstallmentPaymentList, err error) { |
|
|
|
|
|
m = new(models.InstallmentPaymentList) |
|
|
|
|
|
has, err := sess.Where("ord_id =?", id).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) { |
|
|
func (i InstallmentPaymentListDb) FinInstallmentPaymentList(arg map[string]string) (m *[]models.InstallmentPaymentList, err error) { |
|
|
mm := make([]models.InstallmentPaymentList, 0) |
|
|
mm := make([]models.InstallmentPaymentList, 0) |
|
|
sess := i.Db.Where("uid=?", arg["uid"]) |
|
|
sess := i.Db.Where("uid=?", arg["uid"]) |
|
|