|
|
@@ -1,7 +1,9 @@ |
|
|
|
package implement |
|
|
|
package implement |
|
|
|
|
|
|
|
import ( |
|
|
|
"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" |
|
|
|
) |
|
|
|
|
|
|
@@ -12,3 +14,14 @@ type InstallmentPaymentSchemeWithGoodsDb struct { |
|
|
|
func NewInstallmentPaymentSchemeWithGoodsDb(engine *xorm.Engine) dao.InstallmentPaymentSchemeWithGoodsDao { |
|
|
|
return &InstallmentPaymentSchemeWithGoodsDb{Db: engine} |
|
|
|
} |
|
|
|
func (i InstallmentPaymentSchemeWithGoodsDb) GetInstallmentPaymentSchemeGoodsByGoodsId(goodsId int) (m *models.InstallmentPaymentSchemeWithGoods, err error) { |
|
|
|
m = new(models.InstallmentPaymentSchemeWithGoods) |
|
|
|
has, err := i.Db.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 |
|
|
|
} |