dingd
This commit is contained in:
@@ -2,17 +2,26 @@
|
||||
|
||||
namespace app\controller;
|
||||
|
||||
use think\response\Json;
|
||||
|
||||
class Order
|
||||
{
|
||||
|
||||
public function create()
|
||||
/**
|
||||
* Notes : 捐助订单
|
||||
*
|
||||
* @Date : 2022/9/9 16:30
|
||||
* @Author : <Jason.C>
|
||||
* @return Json
|
||||
*/
|
||||
public function create(): Json
|
||||
{
|
||||
$userid = $GLOBALS['data']['userid'];
|
||||
$order = \app\model\Order::create([
|
||||
'student_id' => 1,
|
||||
$amount = $GLOBALS['data']['amount'] ?? 15;
|
||||
|
||||
$order = \app\model\Order::create([
|
||||
'student_id' => 14,
|
||||
'user_id' => $userid,
|
||||
'amount' => 15,
|
||||
'type' => 1,
|
||||
'amount' => $amount,
|
||||
'status' => 0,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user