作者 yangfu

修改:分红状态修改

@@ -59,13 +59,13 @@ func orderStatus(order *domain.OrderBase) int { @@ -59,13 +59,13 @@ func orderStatus(order *domain.OrderBase) int {
59 } 59 }
60 } 60 }
61 if hasBonus { 61 if hasBonus {
62 - if order.UseOrderCount > 0 && order.UseOrderCount < order.PlanOrderCount { 62 + if order.UseOrderCount >= 0 && order.UseOrderCount < order.PlanOrderCount {
63 return 3 // 已支付退货 63 return 3 // 已支付退货
64 } 64 }
65 return 2 // 已支付分红 65 return 2 // 已支付分红
66 } 66 }
67 if !hasBonus { 67 if !hasBonus {
68 - if order.UseOrderCount > 0 && order.UseOrderCount < order.PlanOrderCount { 68 + if order.UseOrderCount >= 0 && order.UseOrderCount < order.PlanOrderCount {
69 return 4 // 待支付退货 69 return 4 // 待支付退货
70 } 70 }
71 return 1 71 return 1
@@ -37,13 +37,13 @@ type OrderGood struct { @@ -37,13 +37,13 @@ type OrderGood struct {
37 } 37 }
38 38
39 func (g *OrderGood) Status() GoodStatus { 39 func (g *OrderGood) Status() GoodStatus {
40 - if g.BonusStatus == BonusWaitPay && g.UseGoodNumber > 0 && g.UseGoodNumber < g.PlanGoodNumber { 40 + if g.BonusStatus == BonusWaitPay && g.UseGoodNumber >= 0 && g.UseGoodNumber < g.PlanGoodNumber {
41 return goodStatusWithGoodsReturn 41 return goodStatusWithGoodsReturn
42 } 42 }
43 if g.BonusStatus == BonusWaitPay { 43 if g.BonusStatus == BonusWaitPay {
44 return goodStatusWait 44 return goodStatusWait
45 } 45 }
46 - if g.BonusStatus == BonusPaid && g.UseGoodNumber > 0 && g.UseGoodNumber < g.PlanGoodNumber { 46 + if g.BonusStatus == BonusPaid && g.UseGoodNumber >= 0 && g.UseGoodNumber < g.PlanGoodNumber {
47 return goodStatusPayWithGoodsReturn 47 return goodStatusPayWithGoodsReturn
48 } 48 }
49 if g.BonusStatus == BonusPaid { 49 if g.BonusStatus == BonusPaid {