作者 唐旭辉

修复:bug-26

@@ -815,10 +815,10 @@ func (service OrderInfoService) ListOrderBonusForExcel(listOrderQuery query.List @@ -815,10 +815,10 @@ func (service OrderInfoService) ListOrderBonusForExcel(listOrderQuery query.List
815 "bonus_status": "", 815 "bonus_status": "",
816 "update_time": result[i].UpdateTime, 816 "update_time": result[i].UpdateTime,
817 "create_time": result[i].CreateTime, 817 "create_time": result[i].CreateTime,
818 - "partner_bonus": fmt.Sprint(result[i].PartnerBonus),  
819 - "partner_bonus_has": fmt.Sprint(result[i].PartnerBonusHas),  
820 - "partner_bonus_not": fmt.Sprint(result[i].PartnerBonusNot),  
821 - "partner_bonus_expense": fmt.Sprint(result[i].PartnerBonusExpense), 818 + "partner_bonus": fmt.Sprintf("%10.2f", result[i].PartnerBonus),
  819 + "partner_bonus_has": fmt.Sprintf("%10.2f", result[i].PartnerBonusHas),
  820 + "partner_bonus_not": fmt.Sprintf("%10.2f", result[i].PartnerBonusNot),
  821 + "partner_bonus_expense": fmt.Sprintf("%10.2f", result[i].PartnerBonusExpense),
822 } 822 }
823 if result[i].HasBonusPercent == 0 { 823 if result[i].HasBonusPercent == 0 {
824 m["partner_bonus"] = "-" 824 m["partner_bonus"] = "-"
@@ -894,13 +894,19 @@ func (service OrderInfoService) ListOrderForExcel(listOrderQuery query.ListOrder @@ -894,13 +894,19 @@ func (service OrderInfoService) ListOrderForExcel(listOrderQuery query.ListOrder
894 "update_time": ordersData[i].UpdateTime, 894 "update_time": ordersData[i].UpdateTime,
895 "create_time": ordersData[i].CreateTime, 895 "create_time": ordersData[i].CreateTime,
896 "plan_order_count": fmt.Sprint(ordersData[i].PlanOrderCount), 896 "plan_order_count": fmt.Sprint(ordersData[i].PlanOrderCount),
897 - "use_order_count": fmt.Sprint(ordersData[i].UseOrderCount), 897 + "use_order_count": "",
898 "region_name": fmt.Sprint(ordersData[i].RegionName), 898 "region_name": fmt.Sprint(ordersData[i].RegionName),
899 - "plan_order_amount": fmt.Sprint(ordersData[i].PlanOrderAmount),  
900 - "user_order_amount": fmt.Sprint(ordersData[i].UseOrderAmount), 899 + "plan_order_amount": fmt.Sprintf("%10.2f", ordersData[i].PlanOrderAmount),
  900 + "use_order_amount": "",
901 "partner_category": ordersData[i].PartnerCategory, 901 "partner_category": ordersData[i].PartnerCategory,
902 "buyer_name": ordersData[i].BuyerName, 902 "buyer_name": ordersData[i].BuyerName,
903 } 903 }
  904 + if ordersData[i].UseOrderCount >= 0 {
  905 + m["use_order_count"] = fmt.Sprint(ordersData[i].UseOrderCount)
  906 + }
  907 + if ordersData[i].UseOrderAmount >= 0 {
  908 + m["use_order_amount"] = fmt.Sprintf("%10.2f", ordersData[i].UseOrderAmount)
  909 + }
904 resultMaps = append(resultMaps, m) 910 resultMaps = append(resultMaps, m)
905 } 911 }
906 column := [][2]string{ 912 column := [][2]string{
@@ -8,6 +8,8 @@ const ( @@ -8,6 +8,8 @@ const (
8 BATCH_PAY_ORDER_GOOD_BONUS_EVENT string = "BatchPayOrderGoodBonus" 8 BATCH_PAY_ORDER_GOOD_BONUS_EVENT string = "BatchPayOrderGoodBonus"
9 ) 9 )
10 10
  11 +//BatchPayOrderGoodBonus
  12 +//事件:批量支付一个订单中货品的分红
11 type BatchPayOrderGoodBonus []PayOrderGoodBonus 13 type BatchPayOrderGoodBonus []PayOrderGoodBonus
12 14
13 func (p BatchPayOrderGoodBonus) EventType() string { 15 func (p BatchPayOrderGoodBonus) EventType() string {
@@ -15,7 +17,7 @@ func (p BatchPayOrderGoodBonus) EventType() string { @@ -15,7 +17,7 @@ func (p BatchPayOrderGoodBonus) EventType() string {
15 } 17 }
16 18
17 //PayOrderGoodBonus 19 //PayOrderGoodBonus
18 -//事件:批量支付一个订单中货品的分红 20 +//事件:支付一个订单中货品的分红
19 type PayOrderGoodBonus struct { 21 type PayOrderGoodBonus struct {
20 OrderBase *domain.OrderBase 22 OrderBase *domain.OrderBase
21 Goods []domain.OrderGood 23 Goods []domain.OrderGood