Merge branch 'main' of https://gitea.lihaink.cn/mkm/multi-store into main
This commit is contained in:
commit
c3dbd9a6de
@ -10,6 +10,7 @@ use app\api\validate\OrderValidate;
|
|||||||
use app\common\enum\PayEnum;
|
use app\common\enum\PayEnum;
|
||||||
use app\common\logic\PaymentLogic;
|
use app\common\logic\PaymentLogic;
|
||||||
use app\common\logic\PayNotifyLogic;
|
use app\common\logic\PayNotifyLogic;
|
||||||
|
use app\common\model\retail\Cashierclass;
|
||||||
use app\common\model\store_order\StoreOrder;
|
use app\common\model\store_order\StoreOrder;
|
||||||
use app\common\model\user\UserAddress;
|
use app\common\model\user\UserAddress;
|
||||||
use Webman\RedisQueue\Redis;
|
use Webman\RedisQueue\Redis;
|
||||||
@ -234,6 +235,20 @@ class OrderController extends BaseApiController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function order_count()
|
||||||
|
{
|
||||||
|
$userId = $this->request->userId;
|
||||||
|
$where = ['uid' => $userId, 'paid' => 0];
|
||||||
|
$no_pay = StoreOrder::where($where)->count();
|
||||||
|
$where['paid'] = 1;
|
||||||
|
$where['status'] = 0;
|
||||||
|
$waiting = StoreOrder::where($where)->count();
|
||||||
|
$where['status'] = 1;
|
||||||
|
$receiving = StoreOrder::where($where)->count();
|
||||||
|
return $this->success('ok', ['no_pay' => $no_pay, 'waiting' => $waiting, 'receiving' => $receiving]);
|
||||||
|
}
|
||||||
|
|
||||||
#[
|
#[
|
||||||
ApiDoc\Title('订单支付'),
|
ApiDoc\Title('订单支付'),
|
||||||
ApiDoc\url('/api/order/order/pay'),
|
ApiDoc\url('/api/order/order/pay'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user