no message

This commit is contained in:
hajimi
2026-06-11 12:15:29 +08:00
parent 10ebe39c30
commit 96efa1d905
5859 changed files with 815501 additions and 5 deletions
@@ -0,0 +1,49 @@
<?php
namespace app\api\controller;
use app\api\logic\PointsOrderLogic;
use app\api\validate\PointsOrderValidate;
class PointsOrderController extends BaseApiController
{
public function products()
{
return $this->data(PointsOrderLogic::products());
}
public function preOrder()
{
$params = (new PointsOrderValidate())->post()->goCheck('preOrder');
$result = PointsOrderLogic::preOrder($params);
if (false === $result) {
return $this->fail(PointsOrderLogic::getError());
}
return $this->data($result);
}
public function createOrder()
{
$params = (new PointsOrderValidate())->post()->goCheck('createOrder', [
'user_id' => $this->userId,
'terminal' => $this->userInfo['terminal'],
]);
$result = PointsOrderLogic::createOrder($params);
if (false === $result) {
return $this->fail(PointsOrderLogic::getError());
}
return $this->data($result);
}
public function detail()
{
$params = (new PointsOrderValidate())->goCheck('detail', [
'user_id' => $this->userId,
]);
$result = PointsOrderLogic::detail($params);
if (false === $result) {
return $this->fail(PointsOrderLogic::getError());
}
return $this->data($result);
}
}