...
|
...
|
@@ -6,6 +6,7 @@ import ( |
|
|
coreDomain "github.com/linmadan/egglib-go/core/domain"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/domain/event"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/domain/service"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/transaction"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/repository"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/lib"
|
...
|
...
|
@@ -17,8 +18,10 @@ type OrderBonusServices struct { |
|
|
transactionContext *transaction.TransactionContext
|
|
|
}
|
|
|
|
|
|
var _ service.OrderBonusService = (*OrderBonusServices)(nil)
|
|
|
|
|
|
//UpdateBounsWithGoodNumber 分红时,因修改订单中商品的数量发生分红变动
|
|
|
func (serve OrderBonusServices) UpdateBounsByGoodNumber(orderId int64, adminId int64, goodWithNumber map[int64]int) error {
|
|
|
func (serve *OrderBonusServices) UpdateBounsByGoodNumber(orderId int64, adminId int64, goodWithNumber int) error {
|
|
|
var (
|
|
|
userRepository domain.UsersRepository
|
|
|
orderBaseReponsitory domain.OrderBaseRepository
|
...
|
...
|
@@ -66,7 +69,7 @@ func (serve OrderBonusServices) UpdateBounsByGoodNumber(orderId int64, adminId i |
|
|
}
|
|
|
|
|
|
//UpdateBounsByPartnerBonusPercent 分红时,因修改订单中商品的合伙人分行比例发生分红变动
|
|
|
func (serve OrderBonusServices) UpdateBounsByPartnerBonusPercent(orderId int64, adminId int64, goodWithPercent map[int]float64) error {
|
|
|
func (serve *OrderBonusServices) UpdateBounsByPartnerBonusPercent(orderId int64, adminId int64, partnerPercent float64) error {
|
|
|
var (
|
|
|
userRepository domain.UsersRepository
|
|
|
orderBaseReponsitory domain.OrderBaseRepository
|
...
|
...
|
@@ -114,7 +117,7 @@ func (serve OrderBonusServices) UpdateBounsByPartnerBonusPercent(orderId int64, |
|
|
}
|
|
|
|
|
|
//PayOrderGoodBonus 支付订单中货品的分红
|
|
|
func (serve OrderBonusServices) PayOrderGoodBonus(orderId int64, goodId int64, adminId int64) error {
|
|
|
func (serve *OrderBonusServices) PayOrderGoodBonus(orderId int64, goodId int64, adminId int64) error {
|
|
|
var (
|
|
|
userRepository domain.UsersRepository
|
|
|
orderBaseReponsitory domain.OrderBaseRepository
|
...
|
...
|
@@ -158,3 +161,7 @@ func (serve OrderBonusServices) PayOrderGoodBonus(orderId int64, goodId int64, a |
|
|
}
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
func (serve *OrderBonusServices) UpdateOrderRemark(orderId int64, adminId int64, remark string) error {
|
|
|
return nil
|
|
|
} |
...
|
...
|
|