|
|
@@ -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 |
|
|
|
} |