<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台（PHP版）
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码，建议反馈是我们前进的动力
// | 开源版本可自由商用，可去除界面版权logo
// | gitee下载：https://gitee.com/likeshop_gitee/likeadmin
// | github下载：https://github.com/likeshop-github/likeadmin
// | 访问官网：https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------


namespace app\adminapi\controller\group_activity;


use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\group_activity\GroupOrderLists;
use app\adminapi\logic\group_activity\GroupOrderLogic;
use app\adminapi\validate\group_activity\GroupOrderValidate;


/**
 * 拼团订单控制器
 * Class GroupOrderController
 * @package app\adminapi\controller\group_activity
 */
class GroupOrderController extends BaseAdminController
{


    /**
     * @notes 获取拼团订单列表
     * @return \think\response\Json
     * @author likeadmin
     * @date 2025/03/13 10:31
     */
    public function lists()
    {
        return $this->dataLists(new GroupOrderLists());
    }

    /**
     * @notes 获取拼团活动详情
     * @return \think\response\Json
     * @author likeadmin
     * @date 2025/03/13 10:31
     */
    public function detail()
    {
        $params = (new GroupOrderValidate())->goCheck('detail');
        $result = GroupOrderLogic::detail($params);
        return $this->data($result);
    }

    /**
     * @notes 批量生成服务工单
     */
    public function changeWorkStatus() 
    {
        $params = (new GroupOrderValidate())->post()->goCheck('detail');
        $result = GroupOrderLogic::changeWorkStatus($params);
        return $this->data($result);
    }


}