作者 王智

文档修改

... ... @@ -280,7 +280,6 @@ class GuanYiCloud extends Api
//获取订单oid
public function OrderUpdate($OrderSn,$Oid)
{
dump($Oid);
$data = array();
$data['appkey'] = APPKEY;
$data['sessionkey'] = SESSIONKEY;
... ...
... ... @@ -356,32 +356,32 @@ class Order extends Api
{
$UserId = $this->is_token($this->request->header());
$params = $this->request->param();
// $data = [
// 'user_id' => $UserId,
// 'OrderSn' => $params['OrderSn'],
// 'createtime' => time()
// ];
// $res = Db::name('tuikuan')->insert($data);
// if (!$res) {
// $this->error('申请失败', 0);
// die;
// }
// //修改订单状态
// $res2 = Db::name('order')->where('OrderSn', $params['OrderSn'])->update(
// [
// 'status' => 4,
// 'updatetime' => time()
// ]
// );
$data = [
'user_id' => $UserId,
'OrderSn' => $params['OrderSn'],
'createtime' => time()
];
$res = Db::name('tuikuan')->insert($data);
if (!$res) {
$this->error('申请失败', 0);
die;
}
//修改订单状态
$res2 = Db::name('order')->where('OrderSn', $params['OrderSn'])->update(
[
'status' => 4,
'updatetime' => time()
]
);
$GuanYiCloud = new GuanYiCloud();
$Oid = $GuanYiCloud->GetOrderOid($params['OrderSn']);
$GuanYiCloud->OrderUpdate($params['OrderSn'], $Oid);
// if (!$res2) {
// $this->error('订单状态更改失败', 0);
// die;
// } else {
// $this->success('成功', 1);
// }
if (!$res2) {
$this->error('订单状态更改失败', 0);
die;
} else {
$this->success('成功', 1);
}
}
... ...
... ... @@ -131,6 +131,10 @@ class User extends Api
$this->success('成功', $return);
}
public function ceshi()
{
dump(date('Y-m-d', 1615882950));
}
/**
* 用户接口
... ...