Browse Source

分期付

master
huangjiajun 6 months ago
parent
commit
3172de4deb
2 changed files with 16 additions and 1 deletions
  1. +5
    -1
      src/dao/installment_payment_scheme_with_goods_dao.go
  2. +11
    -0
      src/implement/installment_payment_scheme_with_goods_db.go

+ 5
- 1
src/dao/installment_payment_scheme_with_goods_dao.go View File

@@ -1,7 +1,11 @@
package dao package dao


import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"
import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models"
"xorm.io/xorm"
)


type InstallmentPaymentSchemeWithGoodsDao interface { type InstallmentPaymentSchemeWithGoodsDao interface {
GetInstallmentPaymentSchemeGoodsByGoodsId(goodsId int) (m *models.InstallmentPaymentSchemeWithGoods, err error) GetInstallmentPaymentSchemeGoodsByGoodsId(goodsId int) (m *models.InstallmentPaymentSchemeWithGoods, err error)
GetInstallmentPaymentSchemeGoodsByGoodsIdSess(sess *xorm.Session, goodsId int) (m *models.InstallmentPaymentSchemeWithGoods, err error)
} }

+ 11
- 0
src/implement/installment_payment_scheme_with_goods_db.go View File

@@ -25,3 +25,14 @@ func (i InstallmentPaymentSchemeWithGoodsDb) GetInstallmentPaymentSchemeGoodsByG
} }
return m, nil return m, nil
} }
func (i InstallmentPaymentSchemeWithGoodsDb) GetInstallmentPaymentSchemeGoodsByGoodsIdSess(sess *xorm.Session, goodsId int) (m *models.InstallmentPaymentSchemeWithGoods, err error) {
m = new(models.InstallmentPaymentSchemeWithGoods)
has, err := sess.Where("goods_id =?", goodsId).Get(m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return m, nil
}

Loading…
Cancel
Save