作者 yangfu

分红编辑修改

@@ -37,8 +37,8 @@ func (c *DividendsController) Prepare() { @@ -37,8 +37,8 @@ func (c *DividendsController) Prepare() {
37 func (c *DividendsController) Edit() { 37 func (c *DividendsController) Edit() {
38 //用与适配前端定义的数据结构 38 //用与适配前端定义的数据结构
39 type DividendPaymentItem struct { 39 type DividendPaymentItem struct {
40 - PaymentForGoods string `json:"paymentForGoods"`  
41 - StateOfPayment string `json:"stateOfPayment"` 40 + PaymentForGoods float64 `json:"paymentForGoods"`
  41 + StateOfPayment int `json:"stateOfPayment"`
42 } 42 }
43 type Parameter struct { 43 type Parameter struct {
44 Id string `json:"id"` //订单编号 44 Id string `json:"id"` //订单编号
@@ -67,8 +67,8 @@ func (c *DividendsController) Edit() { @@ -67,8 +67,8 @@ func (c *DividendsController) Edit() {
67 for i := range param.DividendPayment { 67 for i := range param.DividendPayment {
68 item := param.DividendPayment[i] 68 item := param.DividendPayment[i]
69 paymentItem := OrderPaymentCmd.DivdendPyamentItem{} 69 paymentItem := OrderPaymentCmd.DivdendPyamentItem{}
70 - paymentItem.PaymentForGoods, _ = strconv.ParseFloat(item.PaymentForGoods, 64)  
71 - paymentItem.StateOfPayment, _ = strconv.Atoi(item.StateOfPayment) 70 + paymentItem.PaymentForGoods = item.PaymentForGoods
  71 + paymentItem.StateOfPayment = item.StateOfPayment
72 paymentItem.PaymentSn = i + 1 72 paymentItem.PaymentSn = i + 1
73 73
74 if paymentItem.StateOfPayment == domain.BonusPaid { 74 if paymentItem.StateOfPayment == domain.BonusPaid {