提交其他文件
This commit is contained in:
183
app/teamapi/controller/OrderController.php
Normal file
183
app/teamapi/controller/OrderController.php
Normal file
@ -0,0 +1,183 @@
|
||||
<?php
|
||||
|
||||
namespace app\teamapi\controller;
|
||||
use app\teamapi\logic\OrderLogic;
|
||||
|
||||
class OrderController extends BaseApiController
|
||||
{
|
||||
public array $notNeedLogin = [];
|
||||
/**
|
||||
* @notes 茶艺师订单列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/31 15:03
|
||||
* @data id
|
||||
*/
|
||||
public function orderTeamList(){
|
||||
$userId = $this->userId;
|
||||
$data = $this->request->post();
|
||||
$result = OrderLogic::orderTeamList($data,$userId);
|
||||
return $this->success('查询成功', $result, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师订单详情
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/31 15:03
|
||||
* @data id
|
||||
*/
|
||||
public function orderDetails(){
|
||||
$userId = $this->userId;
|
||||
$data = $this->request->post();
|
||||
$result = OrderLogic::orderDetails($data,$userId);
|
||||
if ($result === false) {
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
return $this->success('', $result, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师接单
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/31 15:03
|
||||
* @data id
|
||||
*/
|
||||
public function orderTake(){
|
||||
$userId = $this->userId;
|
||||
$data = $this->request->post();
|
||||
$result = OrderLogic::orderTake($data,$userId);
|
||||
if ($result === false) {
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师取消接单
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/31 15:03
|
||||
* @data idcancel
|
||||
*/
|
||||
public function orderCancel(){
|
||||
$userId = $this->userId;
|
||||
$data = $this->request->post();
|
||||
$result = OrderLogic::orderCancel($data,$userId);
|
||||
if ($result === false) {
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师出发
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/31 15:03
|
||||
* @data idcancel
|
||||
*/
|
||||
public function orderDepart(){
|
||||
$userId = $this->userId;
|
||||
$data = $this->request->post();
|
||||
$result = OrderLogic::orderDepart($data,$userId);
|
||||
if ($result === false) {
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 茶艺师到达
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/31 15:03
|
||||
* @data idcancel
|
||||
*/
|
||||
public function orderArrive(){
|
||||
$userId = $this->userId;
|
||||
$data = $this->request->post();
|
||||
$result = OrderLogic::orderArrive($data,$userId);
|
||||
if ($result === false) {
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师打卡
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/31 15:03
|
||||
* @data idcancel
|
||||
*/
|
||||
public function orderImage(){
|
||||
$userId = $this->userId;
|
||||
$data = $this->request->post();
|
||||
$result = OrderLogic::orderImage($data,$userId);
|
||||
if ($result === false) {
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 完成订单
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/31 15:03
|
||||
* @data idcancel
|
||||
*/
|
||||
public function orderFinish(){
|
||||
$userId = $this->userId;
|
||||
$data = $this->request->post();
|
||||
$result = OrderLogic::orderFinish($data,$userId);
|
||||
if ($result === false) {
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除订单
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/31 15:03
|
||||
* @data idcancel
|
||||
*/
|
||||
public function orderDel(){
|
||||
$userId = $this->userId;
|
||||
$data = $this->request->post();
|
||||
$result = OrderLogic::orderDel($data,$userId);
|
||||
if ($result === false) {
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 费用明细
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/31 15:03
|
||||
* @data idcancel
|
||||
*/
|
||||
public function amountDetails(){
|
||||
$userId = $this->userId;
|
||||
$data = $this->request->post();
|
||||
$result = OrderLogic::amountDetails($data,$userId);
|
||||
if ($result === false) {
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
return $this->success('', $result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user