瀏覽代碼

分期付

master
huangjiajun 6 月之前
父節點
當前提交
3172de4deb
共有 2 個文件被更改,包括 16 次插入1 次删除
  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 查看文件

@@ -1,7 +1,11 @@
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 {
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 查看文件

@@ -25,3 +25,14 @@ func (i InstallmentPaymentSchemeWithGoodsDb) GetInstallmentPaymentSchemeGoodsByG
}
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…
取消
儲存