315 lines
9.0 KiB
PHP
Executable File
315 lines
9.0 KiB
PHP
Executable File
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | likeshop开源商城系统
|
||
// +----------------------------------------------------------------------
|
||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||
// | github下载:https://github.com/likeshop-github
|
||
// | 访问官网:https://www.likeshop.cn
|
||
// | 访问社区:https://home.likeshop.cn
|
||
// | 访问手册:http://doc.likeshop.cn
|
||
// | 微信公众号:likeshop技术社区
|
||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||
// | likeshop团队版权所有并拥有最终解释权
|
||
// +----------------------------------------------------------------------
|
||
// | author: likeshop.cn.team
|
||
// +----------------------------------------------------------------------
|
||
|
||
namespace app\adminapi\controller\order;
|
||
|
||
|
||
use app\adminapi\controller\BaseAdminController;
|
||
use app\adminapi\lists\order\OrderLists;
|
||
use app\adminapi\logic\order\OrderLogic;
|
||
use app\adminapi\validate\order\OrderValidate;
|
||
use app\common\service\generator\core\ValidateGenerator;
|
||
|
||
class OrderController extends BaseAdminController
|
||
{
|
||
/**
|
||
* @notes 查看订单列表
|
||
* @return \think\response\Json
|
||
* @author ljj
|
||
* @date 2022/2/11 11:39 上午
|
||
*/
|
||
public function lists()
|
||
{
|
||
return $this->dataLists(new OrderLists());
|
||
}
|
||
|
||
/**
|
||
* @notes 订单详情
|
||
* @return \think\response\Json
|
||
* @author ljj
|
||
* @date 2022/2/11 3:01 下午
|
||
*/
|
||
public function detail()
|
||
{
|
||
$params = (new OrderValidate())->get()->goCheck('detail');
|
||
$result = (new OrderLogic())->detail($params['id']);
|
||
return $this->success('获取成功',$result);
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 子订单列表
|
||
* @return \think\response\Json
|
||
* @author cjhao
|
||
* @date 2024/11/4 18:33
|
||
*/
|
||
public function subOrderLists()
|
||
{
|
||
$params = (new OrderValidate())->get()->goCheck('detail');
|
||
$result = (new OrderLogic())->subOrderLists($params['id']);
|
||
return $this->success('获取成功',$result);
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 获取订单退款信息
|
||
* @return \think\response\Json
|
||
* @author cjhao
|
||
* @date 2024/11/21 11:38
|
||
*/
|
||
public function getRefundInfo()
|
||
{
|
||
$params = $this->request->post();
|
||
$result = (new OrderLogic())->getRefundInfo($params);
|
||
if(is_array($result)){
|
||
return $this->success('获取成功',$result);
|
||
}
|
||
return $this->fail($result);
|
||
}
|
||
|
||
/**
|
||
* @notes 取消订单
|
||
* @return \think\response\Json
|
||
* @author ljj
|
||
* @date 2022/2/11 4:10 下午
|
||
*/
|
||
public function cancel()
|
||
{
|
||
$params = (new OrderValidate())->post()->goCheck('cancel');
|
||
$params['admin_id'] = $this->adminId;
|
||
$result = (new OrderLogic())->cancel($params);
|
||
if (true !== $result) {
|
||
return $this->fail($result);
|
||
}
|
||
return $this->success('操作成功',[],1,1);
|
||
}
|
||
|
||
/**
|
||
* @notes 删除订单
|
||
* @return \think\response\Json
|
||
* @author ljj
|
||
* @date 2022/2/11 4:27 下午
|
||
*/
|
||
public function del()
|
||
{
|
||
$params = (new OrderValidate())->post()->goCheck('del');
|
||
(new OrderLogic())->del($params);
|
||
return $this->success('操作成功',[],1,1);
|
||
}
|
||
|
||
/**
|
||
* @notes 商家备注
|
||
* @return \think\response\Json
|
||
* @author ljj
|
||
* @date 2022/2/11 4:48 下午
|
||
*/
|
||
public function remark()
|
||
{
|
||
$params = (new OrderValidate())->post()->goCheck('remark');
|
||
(new OrderLogic())->remark($params);
|
||
return $this->success('操作成功',[],1,1);
|
||
}
|
||
|
||
/**
|
||
* @notes 商家备注详情
|
||
* @return \think\response\Json
|
||
* @author ljj
|
||
* @date 2022/2/11 4:56 下午
|
||
*/
|
||
public function remarkDetail()
|
||
{
|
||
$params = (new OrderValidate())->get()->goCheck('remarkDetail');
|
||
$result = (new OrderLogic())->remarkDetail($params['id']);
|
||
return $this->success('获取成功',$result);
|
||
}
|
||
|
||
/**
|
||
* @notes 核销订单
|
||
* @return \think\response\Json
|
||
* @author ljj
|
||
* @date 2022/2/11 5:03 下午
|
||
*/
|
||
public function verification()
|
||
{
|
||
$params = (new OrderValidate())->post()->goCheck('verification');
|
||
$params['admin_id'] = $this->adminId;
|
||
$result = (new OrderLogic())->verification($params);
|
||
if (true !== $result) {
|
||
return $this->fail($result);
|
||
}
|
||
return $this->success('操作成功',[],1,1);
|
||
}
|
||
|
||
|
||
|
||
/**
|
||
* @notes 接单操作
|
||
* @return \think\response\Json
|
||
* @author cjhao
|
||
* @date 2024/9/13 17:23
|
||
*/
|
||
public function take()
|
||
{
|
||
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
|
||
$result = (new OrderLogic())->take($params);
|
||
if (true === $result) {
|
||
return $this->success('接单成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OrderLogic::getError());
|
||
}
|
||
|
||
/**
|
||
* @notes 出发操作
|
||
* @return \think\response\Json
|
||
* @author cjhao
|
||
* @date 2024/9/13 17:24
|
||
*/
|
||
public function depart()
|
||
{
|
||
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
|
||
$result = (new OrderLogic())->depart($params);
|
||
if (true === $result) {
|
||
return $this->success('操作成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OrderLogic::getError());
|
||
}
|
||
|
||
/**
|
||
* @notes 达到操作
|
||
* @return \think\response\Json
|
||
* @author cjhao
|
||
* @date 2024/9/13 17:24
|
||
*/
|
||
public function arrive()
|
||
{
|
||
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
|
||
$result = (new OrderLogic())->arrive($params);
|
||
if (true === $result) {
|
||
return $this->success('操作成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OrderLogic::getError());
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 服务开始
|
||
* @return \think\response\Json
|
||
* @author cjhao
|
||
* @date 2024/9/14 14:47
|
||
*/
|
||
public function startServer()
|
||
{
|
||
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
|
||
$result = (new OrderLogic())->startServer($params);
|
||
if (true === $result) {
|
||
return $this->success('操作成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OrderLogic::getError());
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 服务完成
|
||
* @return \think\response\Json
|
||
* @author cjhao
|
||
* @date 2024/9/14 14:53
|
||
*/
|
||
public function finishServer()
|
||
{
|
||
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
|
||
$result = (new OrderLogic())->finishServer($params);
|
||
if (true === $result) {
|
||
return $this->success('操作成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OrderLogic::getError());
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 订单退款
|
||
* @return \think\response\Json
|
||
* @author cjhao
|
||
* @date 2024/9/27 23:55
|
||
*/
|
||
public function refund()
|
||
{
|
||
$params = $this->request->post();
|
||
$params['admin_id'] = $this->adminId;
|
||
// $params = (new OrderValidate())->post()->goCheck('cancel',['admin_id'=>$this->adminId]);
|
||
$result = (new OrderLogic())->refund($params);
|
||
if (true === $result) {
|
||
return $this->success('操作成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OrderLogic::getError());
|
||
|
||
}
|
||
|
||
/**
|
||
* @notes 技师列表
|
||
* @return \think\response\Json
|
||
* @author cjhao
|
||
* @date 2024/9/29 10:25
|
||
*/
|
||
public function coachLists()
|
||
{
|
||
$params = (new OrderValidate())->get()->goCheck('selectCoach',['admin_id'=>$this->adminId]);
|
||
$result = (new OrderLogic())->coachLists($params);
|
||
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 = (new OrderValidate())->post()->goCheck('dispatchCoach',['admin_id'=>$this->adminId]);
|
||
$result = (new OrderLogic())->dispatchCoach($params);
|
||
if (false !== $result) {
|
||
return $this->success('操作成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OrderLogic::getError());
|
||
}
|
||
|
||
// public function
|
||
|
||
|
||
/**
|
||
* @notes 获取订单的结算状态
|
||
* @return \think\response\Json
|
||
* @author cjhao
|
||
* @date 2025/4/18 16:26
|
||
*/
|
||
public function getOrderSettle()
|
||
{
|
||
$params = (new OrderValidate())->get()->goCheck('settle');
|
||
$result = (new OrderLogic())->getOrderSettle($params);
|
||
return $this->success('', $result);
|
||
|
||
}
|
||
|
||
|
||
} |