Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提交订单失败 #14

Open
Geekiter opened this issue Feb 16, 2019 · 2 comments
Open

提交订单失败 #14

Geekiter opened this issue Feb 16, 2019 · 2 comments
Labels
question Further information is requested

Comments

@Geekiter
Copy link

  • api:

{status: false, code: 400, message: "订单提交失败"}

  • laravel.log:

local.INFO: Call to undefined method Illuminate\Database\Query\Builder::increaseSales()

  • ShoppingController.php

//6. remove goods store. foreach ($order->getItems() as $item) { $product = $item->getModel(); $product->reduceStock($item->quantity); $product->increaseSales($item->quantity); $product->save(); }

@chenbidepro chenbidepro added the question Further information is requested label Feb 21, 2019
@chenbidepro
Copy link
Member

返回的是一个 QueryBuilder 所以才会这样,开源和商业项目这里都没出过这种异常,具体的自己先排查下,同时我们这里再优化下。

@Strangeralonel
Copy link

那个好像是这个方法没有写,我直接注释掉了。我这边是做毕设所以无所谓,正式环境增加一个方法内容呗。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants