作者 tangxvhui

bug 修复

... ... @@ -335,7 +335,9 @@ func (c *OrderController) OrderPurposeToReal() {
c.ResponseError(errors.New("json数据解析失败"))
return
}
cmd := orderCmd.UpdateOrderRealCommand{
orderSrv := orderService.NewOrderService(nil)
if param.Id == 0 {
err = orderSrv.UpdateOrderReal(orderCmd.UpdateOrderRealCommand{
Id: param.Id,
OrderCode: param.OrderId,
OrderName: param.OrderName,
... ... @@ -347,9 +349,10 @@ func (c *OrderController) OrderPurposeToReal() {
PartnerBonusPercent: param.PartnerRatio,
SalesmanBonusPercent: param.SalesmanRatio,
OrderStatus: param.OrderStatue,
})
} else {
err = c.addOrderReal(param)
}
orderSrv := orderService.NewOrderService(nil)
err = orderSrv.UpdateOrderReal(cmd)
if err != nil {
c.ResponseError(err)
return
... ...