正在显示
1 个修改的文件
包含
6 行增加
和
3 行删除
@@ -335,7 +335,9 @@ func (c *OrderController) OrderPurposeToReal() { | @@ -335,7 +335,9 @@ func (c *OrderController) OrderPurposeToReal() { | ||
335 | c.ResponseError(errors.New("json数据解析失败")) | 335 | c.ResponseError(errors.New("json数据解析失败")) |
336 | return | 336 | return |
337 | } | 337 | } |
338 | - cmd := orderCmd.UpdateOrderRealCommand{ | 338 | + orderSrv := orderService.NewOrderService(nil) |
339 | + if param.Id == 0 { | ||
340 | + err = orderSrv.UpdateOrderReal(orderCmd.UpdateOrderRealCommand{ | ||
339 | Id: param.Id, | 341 | Id: param.Id, |
340 | OrderCode: param.OrderId, | 342 | OrderCode: param.OrderId, |
341 | OrderName: param.OrderName, | 343 | OrderName: param.OrderName, |
@@ -347,9 +349,10 @@ func (c *OrderController) OrderPurposeToReal() { | @@ -347,9 +349,10 @@ func (c *OrderController) OrderPurposeToReal() { | ||
347 | PartnerBonusPercent: param.PartnerRatio, | 349 | PartnerBonusPercent: param.PartnerRatio, |
348 | SalesmanBonusPercent: param.SalesmanRatio, | 350 | SalesmanBonusPercent: param.SalesmanRatio, |
349 | OrderStatus: param.OrderStatue, | 351 | OrderStatus: param.OrderStatue, |
352 | + }) | ||
353 | + } else { | ||
354 | + err = c.addOrderReal(param) | ||
350 | } | 355 | } |
351 | - orderSrv := orderService.NewOrderService(nil) | ||
352 | - err = orderSrv.UpdateOrderReal(cmd) | ||
353 | if err != nil { | 356 | if err != nil { |
354 | c.ResponseError(err) | 357 | c.ResponseError(err) |
355 | return | 358 | return |
-
请 注册 或 登录 后发表评论