作者 tangxvhui

更新

@@ -120,23 +120,24 @@ func (c *OrderDividendController) OrderDividendDetail() { @@ -120,23 +120,24 @@ func (c *OrderDividendController) OrderDividendDetail() {
120 allGoods := []map[string]interface{}{} 120 allGoods := []map[string]interface{}{}
121 for _, v := range orderinfo.Goods { 121 for _, v := range orderinfo.Goods {
122 detail := map[string]interface{}{ 122 detail := map[string]interface{}{
123 - "productName": v.GoodName,  
124 - "orderNum": v.PlanGoodNumber,  
125 - "univalence": v.Price,  
126 - "partnerRatio": v.PartnerBonusPercent,  
127 - "orderPrice": v.GoodCompute.PlanAmount, 123 + "productName": v.GoodName,
  124 + "orderNum": v.PlanGoodNumber,
  125 + "univalence": v.Price,
  126 + "partnerRatio": v.PartnerBonusPercent,
  127 + "amount": v.GoodCompute.PlanAmount,
  128 +
128 "partnerDividendsReceivable": v.GoodCompute.PlanPartnerBonus, 129 "partnerDividendsReceivable": v.GoodCompute.PlanPartnerBonus,
129 } 130 }
130 m := map[string]interface{}{ 131 m := map[string]interface{}{
131 - "detail": detail,  
132 - "quantityControl": "",  
133 - "id": v.Id,  
134 - "stateOfPayment": v.BonusStatus,  
135 - "remark": v.Remark,  
136 - "orderPriceControl": "", 132 + "detail": detail,
  133 + "quantityControl": "",
  134 + "id": v.Id,
  135 + "stateOfPayment": v.BonusStatus,
  136 + "remark": v.Remark,
  137 + "amountControl": "",
137 } 138 }
138 if v.GoodCompute.UseAmount >= 0 { 139 if v.GoodCompute.UseAmount >= 0 {
139 - m["orderPriceControl"] = fmt.Sprint(v.GoodCompute.UseAmount) 140 + m["amountControl"] = fmt.Sprint(v.GoodCompute.UseAmount)
140 } 141 }
141 if v.UseGoodNumber >= 0 { 142 if v.UseGoodNumber >= 0 {
142 m["quantityControl"] = fmt.Sprint(v.UseGoodNumber) 143 m["quantityControl"] = fmt.Sprint(v.UseGoodNumber)
@@ -149,7 +150,7 @@ func (c *OrderDividendController) OrderDividendDetail() { @@ -149,7 +150,7 @@ func (c *OrderDividendController) OrderDividendDetail() {
149 "orderDist": orderinfo.RegionInfo.RegionName, 150 "orderDist": orderinfo.RegionInfo.RegionName,
150 "partner": orderinfo.PartnerInfo.PartnerName, 151 "partner": orderinfo.PartnerInfo.PartnerName,
151 "id": orderinfo.Id, 152 "id": orderinfo.Id,
152 - "orderNumber": orderinfo.OrderCode, 153 + "orderId": orderinfo.OrderCode,
153 } 154 }
154 dividendCount := map[string]interface{}{ 155 dividendCount := map[string]interface{}{
155 "orderNum": orderinfo.OrderCompute.PlanOrderCount, 156 "orderNum": orderinfo.OrderCompute.PlanOrderCount,
@@ -188,3 +189,20 @@ func (c *OrderDividendController) OrderDividendDetail() { @@ -188,3 +189,20 @@ func (c *OrderDividendController) OrderDividendDetail() {
188 c.ResponseData(rsp) 189 c.ResponseData(rsp)
189 return 190 return
190 } 191 }
  192 +
  193 +type postOrderDividend struct {
  194 + Id string `json:"id"`
  195 +}
  196 +
  197 +func (c *OrderDividendController) EditOrderDividend() {
  198 + var (
  199 + param postOrderDividend
  200 + err error
  201 + )
  202 + if err = c.BindJsonData(&param); err != nil {
  203 + logs.Error(err)
  204 + c.ResponseError(errors.New("json数据解析失败"))
  205 + return
  206 + }
  207 + return
  208 +}