作者 唐旭辉

更新

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