作者 唐旭辉

更新

... ... @@ -111,6 +111,7 @@ func (subscriber *OrderLogSubscriber) HandleEvent(domainEvent coreDomain.DomainE
GoodId: 0,
Descript: []domain.OrderLogDescript{
domain.OrderLogDescript{
GoodId: currentEvent.OrderId,
Title: "编辑备注",
Item: currentEvent.NewRemark,
Action: []string{},
... ...
... ... @@ -16,7 +16,7 @@ type PayOrderGoodBonus struct {
GoodId int64
//管理员id
AdminId int64
//
//分红额度
PartnerBonus float64
}
... ...
... ... @@ -16,6 +16,7 @@ const (
//OrderLogDescript 描述日志内容
type OrderLogDescript struct {
GoodId int64 `json:"goodId"`
Title string `json:"title"` //标题
Item string `json:"item"` //修改的项目
Action []string `json:"action"` //执行的操作
... ...
... ... @@ -275,6 +275,12 @@ func (serve *OrderBonusService) PayOrderGoodBonus(orderId int64, goodId int64, a
continue
}
updateGood = oldOrder.Goods[i]
if updateGood.PartnerBonusPercent < 0 {
return nil
}
if updateGood.BonusStatus == domain.OrderGoodHasPay {
return nil
}
err = updateGood.CurrentBonusStatus.PayPartnerBonus(&updateGood)
if err != nil {
return lib.ThrowError(lib.BUSINESS_ERROR, err.Error())
... ...