| | |
| | | if !ok { |
| | | return |
| | | } |
| | | m := make(map[string]interface{}) |
| | | m["status"] = params.Status |
| | | err := model.NewSalesDetailsSearch().SetNumber(params.Number).UpdateByMap(m) |
| | | if err != nil { |
| | | ctx.FailWithMsg(ecode.UnknownErr, "状态更新失败") |
| | | return |
| | | } |
| | | |
| | | client := product_inventory.NewProductInventoryServiceClient(ProductInventoryServiceConn) |
| | | products := make([]*product_inventory.InventoryProduct, 0) |
| | |
| | | p.Amount = product.Amount.String() |
| | | products = append(products, &p) |
| | | } |
| | | _, err := client.CreateOperation(ctx.GetCtx(), &product_inventory.CreateOperationRequest{ |
| | | _, err = client.CreateOperation(ctx.GetCtx(), &product_inventory.CreateOperationRequest{ |
| | | Number: params.Number, |
| | | Addressee: params.Addressee, |
| | | Address: params.Address, |