初始版本
This commit is contained in:
90
server/app/shopapi/controller/OrderController.php
Executable file
90
server/app/shopapi/controller/OrderController.php
Executable file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
namespace app\shopapi\controller;
|
||||
use app\shopapi\lists\CoachOrderLists;
|
||||
use app\shopapi\lists\IncomeLists;
|
||||
use app\shopapi\logic\OrderLogic;
|
||||
|
||||
|
||||
/**
|
||||
* 订单控制器类
|
||||
* Class OrderController
|
||||
* @package app\shopapi\controller
|
||||
*/
|
||||
class OrderController extends BaseShopController
|
||||
{
|
||||
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 订单详情
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/9/20 02:18
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$id = $this->request->get('id');
|
||||
$result = (new OrderLogic())->detail($id);
|
||||
return $this->success('', $result);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 师傅订单
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/12/8 21:55
|
||||
*/
|
||||
public function coachOrderLists()
|
||||
{
|
||||
return $this->dataLists((new CoachOrderLists()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 收入列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/5 18:11
|
||||
*/
|
||||
public function incomeLists()
|
||||
{
|
||||
return $this->dataLists((new IncomeLists()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 订单更换技师时获取技师列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/9/29 10:25
|
||||
*/
|
||||
public function coachLists()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = (new OrderLogic())->coachLists($params,$this->shopId);
|
||||
if (false !== $result) {
|
||||
return $this->success('', $result);
|
||||
}
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 指派技师
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/10 23:05
|
||||
*/
|
||||
public function dispatchCoach()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$params['shop_id'] = $this->shopId;
|
||||
$result = (new OrderLogic())->dispatchCoach($params);
|
||||
if (false !== $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user