<?php

use App\Http\Controllers\Admin\AuthController;
use App\Http\Controllers\Admin\CollaboratorsController;
use App\Http\Controllers\Admin\LogController;
use App\Http\Controllers\Admin\OrderCommissionController;
use App\Http\Controllers\Admin\ServiceUsersController;
use App\Http\Controllers\Admin\WithdrawalsController;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Admin\LoginController;
use App\Http\Controllers\Admin\OrderController;
use App\Http\Controllers\Admin\OfflineOrderController;
use App\Http\Controllers\Admin\ServiceRoleController;
use App\Http\Controllers\Admin\UserController;
use App\Http\Controllers\Admin\HealthController;
use App\Http\Controllers\Admin\UploadController;
use App\Http\Controllers\Admin\GuideController;
use App\Http\Controllers\Admin\PartnerController;
use App\Http\Controllers\Admin\EAMController;
use App\Http\Controllers\Admin\ChatController;
use Illuminate\Routing\Router;
use App\Http\Controllers\Admin\IssueController;
use App\Http\Controllers\Admin\SurveyController;
use App\Http\Controllers\Admin\FoodController;
use App\Http\Controllers\Admin\FatController;
use App\Http\Controllers\Admin\CommentController;
use App\Http\Controllers\Admin\ReappraiseController;
use App\Http\Controllers\Admin\ModeratorController;
use \App\Http\Controllers\Admin\ErrorLogController;
use App\Http\Controllers\Admin\WorkServerController;
use App\Http\Controllers\Admin\OfficeController;
use App\Http\Controllers\Admin\RestaurantController;
use App\Http\Controllers\Admin\ShopController;
use App\Http\Controllers\Admin\DataStatController;
use App\Http\Controllers\Admin\ConfigController;
use App\Http\Controllers\Admin\EarningController;
use App\Http\Controllers\Admin\LotteryController;
use App\Http\Controllers\Admin\SupplierController;
use App\Http\Controllers\Admin\ProductController;
use App\Http\Controllers\Admin\ContractController;
use App\Http\Controllers\Admin\OtherController;
use App\Http\Controllers\Admin\ActivityController;
use App\Http\Controllers\Admin\RegularActivityController;
use App\Http\Controllers\Admin\VideoController;
use App\Http\Controllers\Admin\NurtureShopController;
use App\Http\Controllers\Admin\DmaShopController;
use App\Http\Controllers\Admin\BandController;
//登录
Route::post('mobile/login', [LoginController::class, 'mobileLogin'])->name("admin.mobile.login");


/**
 * 服务人员二维码
 */
Route::get('serviceUserQrCode/{role}',[ServiceUsersController::class,'serviceUserQrCode'])->name('admin.service_user.qrcode');

/**
 * 修改某个电话号码账号为超级管理员
 */
Route::post('update/user/permission',[AuthController::class,'updateUserPermission'])->name('update.user.permission');

//获取扫码签到用户统计数
Route::get('get/scan/user/count', [UserController::class, 'getWebCountScanUser'])->name("admin.get.scan.user.count");
//获取近6天签到人数
Route::get('get/web/scan/data', [UserController::class, 'getWebScanData'])->name("admin.get.web.scan.data");
Route::get('get/now/date/time', [UserController::class, 'getNowDateTime'])->name("admin.get.now.date.time");

Route::middleware(['auth:admin','log'])->group(function (){
    /**
     * 管理员
     */
    Route::group(['prefix'=> '/auth','middleware' => 'administrator'], function () {
        //列表
        Route::get('/users',[AuthController::class, 'index'])->name('admin.auth.users');
        //创建
        Route::post('/users',[AuthController::class, 'store'])->name('admin.auth.store');
        //重置密码
        Route::put('/reset_pwd/{id}',[AuthController::class, 'resetPwd'])->name('admin.auth.reset_pwd');
        //删除
        Route::delete('/users/{id}',[AuthController::class, 'destroy'])->name('admin.auth.destroy');
        //操作记录
        Route::get('/operation_logs',[LogController::class, 'index'])->name('admin.auth.log');
        //更新管理员信息
        Route::put('/update/users',[AuthController::class, 'updateAdmin'])->name('admin.auth.update.user');

    });
    /**
     * 订单信息
     */
    //订单列表
    Route::get('orders',[OrderController::class, 'orders'])->name('admin.orders');
    //创建订单
    Route::post('orders',[OrderController::class, 'storeOrders'])->name('admin.store.orders');
    //订单导出
    Route::get('orders/export',[OrderController::class, 'export'])->name('admin.orders.export');
    //订单详情
    Route::get('orders/{order_id}',[OrderController::class, 'order'])->name('admin.order.detail');
    //修改订单状态
    Route::put("orders/{order_id}/status", [OrderController::class, 'updateOrder'])->name("admin.update.order.status");
    Route::put("orders/{order_id}/sign/status", [OrderController::class, 'updateOrderCheckSign'])->name("admin.update.order.sign.status");
    //修改订单子公司
    Route::put("orders/{order_id}/agency", [OrderController::class, 'changeOrderAgency'])->name("admin.update.order.agency");
    //增加订单服务人员
    Route::post('orders/{order}/role/users', [OrderController::class, 'storeOrderRoleUser'])->name("admin.store.order.role.user");
    //删除订单服务人员
    Route::delete('service/role/orders/{order}', [OrderController::class, 'deleteOrderRoleUser'])->name("admin.delete.order.role.user");
    //通过订单号获取餐单详情
    Route::get('/orders/scheme/{order}', [OrderController::class, 'getSchemeByOrderId'])->name("admin.order.scheme");
    //通过订单号获取餐单详情
    Route::put('update/order/scheme', [OrderController::class, 'updateOrderScheme'])->name("admin.update.order.scheme");
    //导出订单方案
    Route::get('export/orders/scheme', [OrderController::class, 'exportOrderScheme'])->name("admin.export.order.scheme");
    //获取订单方案列表
    Route::get('get/order/scheme/list', [OrderController::class, 'getOrderSchemeList'])->name("admin.get.order.scheme.list");
    //导出订单方案列表
    Route::get('export/order/scheme/list', [OrderController::class, 'exportOrderSchemeList'])->name("admin.export.order.scheme.list");
    //设置订单是否展示
    Route::put("set/order/show", [OrderController::class, 'setOrderIsShow'])->name("admin.set.order.show");
    //获取订单统计数据
    Route::get('/get/order/stat', [DataStatController::class, 'getOrderStat'])->name("admin.get.order.stat");
    //获取订单列表
    Route::get("get/order/stat/list", [OrderController::class, 'getOrderStatList'])->name("admin.get.order.stat.list");
    Route::get("get/mark/order/log/{id}", [OrderController::class, 'getOrderMarkLog'])->name("admin.get.mark.order.log");


    /**
     * 协议管理
     */
    Route::post('add/agreement', [OrderController::class, 'addAgreement'])->name("admin.add.agreement");
    Route::get('get/agreement', [OrderController::class, 'getAgreement'])->name("admin.get.agreement");
    Route::put('update/agreement/{id}', [OrderController::class, 'updateAgreement'])->name("admin.update.agreement");
    Route::get('get/agreement/detail/{id}', [OrderController::class, 'getAgreementDetail'])->name("admin.get.agreement.detail");
    Route::get('get/agreement/log/{id}', [OrderController::class, 'getAgreementLog'])->name("admin.get.agreement.log");

    /**
     * 复评管理
     */
    Route::get('orders/{order}/reappraises', [ReappraiseController::class, 'reappraises'])->name('admin.order.reappraises');
    //获取复评列表
    Route::get('get/reappraises/list', [ReappraiseController::class, 'getReappraisesList'])->name('admin.get.reappraises.list');
    //获取复评列表
    Route::get('export/reappraises/list', [ReappraiseController::class, 'exportReappraises'])->name('admin.export.reappraises.list');
    //获取服务人员被评价记录
    Route::get('get/service/user/reappraises', [ReappraiseController::class, 'getUserReappraises'])->name('admin.get.service.user.reappraises');
    //获取服务人员被评价分值
    Route::get('get/user/reappraises/score', [ReappraiseController::class, 'getUserReappraisesScore'])->name('admin.get.service.user.reappraises.score');
    /**
     * 备注
     */
    //订单备注列表
    Route::get('orders/{order}/comments', [CommentController::class, 'orderComments'])->name('admin.order.comments')->where('order', '[0-9]+');
    Route::get('get/comments', [CommentController::class, 'getComments']);
    Route::get('get/all/orders', [OrderController::class, 'getAllOrders']);
    /**
     * 群聊信息
     */
    Route::get('orders/{order}/group/message', [ChatController::class, 'chatMessages']);
    //绑定订单与企业群
    Route::post("bind/orders/{order}/work/chat", [ChatController::class, 'bindOrderChat'])->name("admin.bind.order.work.chat");
    //企业群列表
    Route::get('work/chats', [ChatController::class, 'workChats'])->name("admin.work.chats");
    /**
     * 服务角色
     */
    //角色列表
    Route::get('service/roles', [ServiceRoleController::class, 'roles'])->name('admin.service.roles');
    //修改角色收益规则
    Route::put('service/roles/{role_id}', [ServiceRoleController::class, 'updateRole'])->name('admin.update.service.roles');
    //服务人员列表
    Route::get('service/users', [ServiceRoleController::class, 'serviceUsers'])->name('admin.service.users');
    //删除服务人员
    Route::delete("service/users/{service_user}", [ServiceRoleController::class, 'deleteServiceUser'])->name("admin.delete.service.users");
    //角色下的服务人员
    Route::get('service/roles/{role}/users', [ServiceRoleController::class, 'serviceUsers'])->name('admin.service.role.users');
    //角色下的服务人员(排除未绑定)
    Route::get('service/getRoleUsers/{role_id}', [ServiceRoleController::class, 'getRoleUsers'])->name('admin.service.getRoleUsers');
    //创建服务人员
    Route::post('service/users', [ServiceRoleController::class, 'storeServiceUser'])->name('admin.store.service.users');
    //修改服务人员
    Route::put('service/users/{id}', [ServiceRoleController::class, 'updateServiceUser'])->name('admin.update.service.users');
    //服务人员添加角色
    Route::post('service/users/{service_user}/roles', [ServiceRoleController::class, 'setServiceUserRoles'])->name("admin.set.service.user.roles");

    /**
     * 用户
     */
    //用户列表
    Route::get('users', [UserController::class, 'users'])->name('admin.users');
    Route::put('users/{user}/recommend', [UserController::class, 'updateRecommendUser'])->name('admin.update.user.recommend');

    //用户详情
    Route::get('users/{user}', [UserController::class, 'user'])->name('admin.users.detail');
    //导出用户
    Route::get('user/export', [UserController::class, 'userExport'])->name('admin.users.export');
    //获取用户测量数据
    Route::get('get/user/fat/log', [UserController::class, 'getUserFatLog'])->name('admin.get.user.fat.log');
    //体检报告
    Route::get('user/{user}/medical/reports', [UserController::class, 'medicalReports'])->name("admin.user.medical.reports");
    // 添加问卷调查
    Route::post("user/{user}/medical/reports", [UserController::class, "AddMedicalReports"])->name("admin.user.add.medical.reports");

    Route::get('user/{user}/other/health', [UserController::class, 'otherHealth'])->name("admin.user.other.health");
    //获取邀请用户列表
    Route::get('get/invite/users', [UserController::class, 'getInviteUserList'])->name("admin.get.invite.users");

    //获取扫码签到统计用户数
    Route::get('get/scan/count', [UserController::class, 'getAdminCountSanUser'])->name("admin.get.scan.count");
    //获取扫码签到人员列表
    Route::get('get/scan/list', [UserController::class, 'getScanUserList'])->name("admin.get.scan.list");
    //获取申请扫码列表
    Route::get('get/apply/scan/qrcode/list', [UserController::class, 'applyUserScanQrcode'])->name("admin.get.apply.scan.qrcode.list");
    /**
     * 用户症状
     */
    Route::get('issue/user', [IssueController::class, 'getIssueUserList'])->name('admin.issue.user');
    
    /**
     * 健康信息
     */
    //称重列表
    Route::get('users/{user}/health/logs', [HealthController::class, 'userHealthLogs'])->name("admin.user.health.logs");
    //单次称重各项数据
    Route::get('users/{user}/health/log', [HealthController::class, 'userHealthLog'])->name("admin.user.health.log");

    Route::get('users/{user}/fat/logs', [FatController::class, 'userFatLogs'])->name("admin.user.fat.logs");
    Route::get('users/fat/log/{id}', [FatController::class, 'userFatLog'])->name("admin.user.fat.log");

    /**
     * 餐单
     */
    //订单餐单
    Route::get('orders/{order}/guides', [GuideController::class, 'orderGuides'])->name('admin.order.guides');
    Route::get('orders/guides/{guide}', [GuideController::class, 'orderGuide'])->name('admin.order.guide');
    Route::get('users/{user}/guides', [GuideController::class, 'userGuides'])->name('admin.user.guides');
    Route::put('guides/{guide}', [GuideController::class, 'updateGuide'])->name("admin.update.guide");
    Route::post('make/orders/{order}/guide', [GuideController::class, 'makeGuide'])->name('admin.make.order.guide');
    //新增餐单
    Route::post('orders/{order}/guide', [GuideController::class, 'addOrderGuide'])->name('admin.add.order.guide');
    //新增餐单
    Route::post('orders/{order}/copy', [GuideController::class, 'copyOrderGuide'])->name('admin.copy.order.guide');
    //删除餐单
    Route::delete('orders/guides/{guide}', [GuideController::class, 'deleteOrderGuide'])->name('admin.delete.order.guide');
    //获取餐单左侧数据，方案营养素和食物
    Route::get('get/order/food', [GuideController::class, 'getOrderFood'])->name("admin.get.order.food");
    //获取餐单模板
    Route::get('get/guide/template/{order_id}', [GuideController::class, 'getGuideTemplate'])->name("admin.get.guide.template");
    Route::get('get/guide/date/{order_id}', [GuideController::class, 'getGuideDate'])->name("admin.get.guide.date");
    /**
     * 食物管理
     */
    Route::get('foods', [FoodController::class, 'foodList'])->name('admin.foods');
    //营养品列表V2
    Route::get('foods/v2', [FoodController::class, 'foodListV2'])->name("admin.foods.v2");
    Route::get('foods', [FoodController::class, 'foodList'])->name('admin.foods');

    Route::get('foods/{food}', [FoodController::class, 'food'])->name('admin.food')->where('food', '[0-9]+');
    Route::get('foods/{food}/v2', [FoodController::class, 'foodV2'])->name('admin.food.v2')->where('food', '[0-9]+');
    Route::post('foods', [FoodController::class, 'storeFood'])->name('admin.store.food');
    Route::post('foods/v2', [FoodController::class, 'storeFoodV2'])->name('admin.store.food.v2');
    Route::put('foods/{food}', [FoodController::class, 'updateFood'])->name('admin.update.food');
    Route::put('foods/{food}/v2', [FoodController::class, 'updateFoodV2'])->name('admin.update.food.v2');

    Route::delete('foods/{food}', [FoodController::class, 'deleteFood'])->name('admin.delete.food');
    Route::get('foods/export', [FoodController::class, 'foodExport'])->name('admin.foods.export');
    //获取食物详情
    Route::get('get/food/detail', [FoodController::class, 'foodDetail'])->name('admin.get.food.detail');
    //出库入库
    Route::put('update/food/num', [FoodController::class, 'updateFoodNum'])->name('admin.update.food.num');
    //获取操作记录
    Route::get('get/operate/log', [FoodController::class, 'getOperateStockLog'])->name('admin.get.operate.log');
    //审核出入库
    Route::put('check/stock/log', [FoodController::class, 'checkStockLog'])->name('admin.check.stock.log');
    /**
     * 合伙伙伴
     */
    //合作伙伴列表
    Route::get('partners', [PartnerController::class, 'partners'])->name('admin.partners');
    //合作伙伴列表导出
    Route::get('partners/export', [PartnerController::class, 'partnersExport'])->name('admin.partners.export');
    //企业合作伙伴列表
    Route::get('companyPartners', [PartnerController::class, 'companyPartners'])->name('admin.companyPartners');
    //企业合作伙伴列表导出
    Route::get('company/partners/export', [PartnerController::class, 'companyPartnersExport'])->name('admin.company.partners.export');
    //合作伙伴详情
    Route::get('partners/{partner}', [PartnerController::class, 'partner'])->name('admin.partner')->where('partner', '[0-9]+');
    //合作伙伴修改
    Route::put('partners/{partner}', [PartnerController::class, 'updatePartner'])->name('admin.update.partner')->where('partner', '[0-9]+');
    //合作伙伴删除
    Route::delete('partners/{partner}', [PartnerController::class, 'deletePartner'])->name('admin.delete.partner')->where('partner', '[0-9]+');
    //代理列表
    Route::get('agencies', [PartnerController::class, 'agencies'])->name('admin.agencies');
    //创建代理
    Route::post('store/agencies', [PartnerController::class, 'storeAgency'])->name('admin.store.agency');
    //获取详情
    Route::get('get/agency/detail/{id}', [PartnerController::class, 'getAgencyDetail'])->name('admin.get.agency.detail');
    //修改代理
    Route::put('update/agencies/{id}', [PartnerController::class, 'updateAgency'])->name("admin.update.agency");
    //删除代理
    Route::delete('del/agencies/{id}', [PartnerController::class, 'deleteAgency'])->name('admin.delete.agency');
    //添加分公司人员
    Route::post('add/agency/user', [PartnerController::class, 'addAgencyUser'])->name('admin.add.agency.user');
    //获取分公司人员列表
    Route::get('get/agency/user/{id}', [PartnerController::class, 'getAgencyUser'])->name('admin.get.agency.user');
    //删除分公司人员
    Route::delete('del/agency/user/{id}', [PartnerController::class, 'delAgencyUser'])->name('admin.del.agency.user');
    //通过分公司人员获取分公司信息
    Route::get('get/agency/by/user', [PartnerController::class, 'getAgencyByUser'])->name('admin.get.agency.by.user');

    /**
     * 收益审核
     */
    Route::get('/get/income',[PartnerController::class, 'getIncomeCheckList'])->name('admin.get.income.list');
    Route::put('/check/income/{id}',[PartnerController::class, 'checkIncome'])->name('admin.check.income');

    //地址
    Route::get('province/cities', [PartnerController::class, 'cities'])->name('admin.cities');
    //全部地区代理
    Route::get('area/agencies', [PartnerController::class, 'allAreaAgencies'])->name("admin.area.agencies");
    //副教练申请列表
    Route::get('coaches', [PartnerController::class, 'coaches'])->name("admin.coaches");
    //合作伙伴和教练申请链接
    Route::get('partner/urls', [PartnerController::class, 'partnerUrls'])->name("admin.partner.urls");
    //合作伙伴和教练审核
    Route::post('partner/audit', [PartnerController::class, 'audit'])->name("admin.partner.audit");

    Route::middleware('service_role')->group(function (Router $router){
        //服务人员申请列表(主教练/副教练/客服)
        $router->get('service_users', [ServiceUsersController::class, 'index'])->name("admin.service_users");
        //获取服务人员列表
        $router->get('get/service/user', [ServiceUsersController::class, 'getServiceUser'])->name("admin.get.service.users");
        //导出服务人员数据
        $router->get('service_users/export', [ServiceUsersController::class, 'serviceUserExport'])->name("admin.service_users.export");
        //服务人员审核(主教练/副教练/客服)
        $router->post('service_users', [ServiceUsersController::class, 'audit'])->name("admin.service_users.audit");
        //服务人员详情
        $router->get('service/user/order/{id}', [ServiceUsersController::class, 'getServiceOrder'])->name("admin.service.user.order");
    });

    /**
     * 通知人员
     */
    //获取通知人员列表数据
    Route::get('get/notice/user', [ServiceUsersController::class, 'getNoticeUserList'])->name("admin.get.notice.user");
    //添加通知人员
    Route::post('add/notice/user', [ServiceUsersController::class, 'addNoticeUser'])->name("admin.add.notice.user");
    //删除通知人员
    Route::delete('delete/notice/user', [ServiceUsersController::class, 'deleteNoticeUser'])->name("admin.delete.notice.user");
    //修改通知人员数据
    Route::put('update/notice/user', [ServiceUsersController::class, 'updateNoticeUser'])->name("admin.update.notice.user");
    /**
     * 资产管理
     */
    //资产列表
    Route::get('assets', [EAMController::class, 'assets'])->name('admin.assets');
    //创建资产
    Route::post('assets', [EAMController::class, 'storeAssets'])->name('admin.store.assets');
    //修改资产
    Route::put('assets/{assets}', [EAMController::class, 'updateAssets'])->name('admin.update.assets');
    //删除资产
    Route::delete('assets/{assets}', [EAMController::class, 'deleteAssets'])->name('admin.delete.assets');

    /**
     * 公共
     */
    //上传
    Route::post('upload/image', [UploadController::class, 'uploadImage'])->name('admin.upload.image');

    /**
     * 账号
     */
    //修改密码
    Route::post('reset/password', [LoginController::class, 'resetPassword'])->name("admin.reset.password");

    /**
     * 线下订单
     */
    Route::apiResource('offlineOrder', OfflineOrderController::class);
    //导出
    Route::get('offline/orders/export', [OfflineOrderController::class, 'export'])->name('admin.offline.order.export');

    /**
     * 订单分佣方案设置
     */
    Route::apiResource('orderCommission', OrderCommissionController::class);
    Route::get('getCommissionList',[OrderCommissionController::class,'getList']);
    Route::get('get/partner/withdraw',[OrderCommissionController::class,'getPartnerWithdraw'])->name('admin.get.partner.withdraw');

    /**
     * 提现
     */
    //提现申请列表
    Route::get('withdrawals/index',[WithdrawalsController::class,'index'])->name('admin.withdrawals.index');
    //提现审核
    Route::post('withdrawals/act/{id}',[WithdrawalsController::class,'withdrawalsAct'])->name('admin.withdrawals.act');
    //财务统计
    Route::get('withdrawals/count',[WithdrawalsController::class,'countWithdrawals'])->name('admin.withdrawals.count');
    //财务查询
    Route::get('withdrawals/search',[WithdrawalsController::class,'arrayWithdrawals'])->name('admin.withdrawals.search');

    /**
     * 问卷调查
     */
    //问卷调查列表
    Route::get('surveys',  [SurveyController::class, 'surveys']);
    //创建
    Route::post('surveys', [SurveyController::class, 'storeSurveys']);
    //修改
    Route::put('surveys/{survey}', [SurveyController::class, 'updateSurveys'])->where('survey', '[0-9]+');
    //详情
    Route::get('surveys/{survey}', [SurveyController::class, 'survey'])->where('survey', '[0-9]+');
    //删除
    Route::delete('surveys/{survey}', [SurveyController::class, 'deleteSurvey'])->where('survey', '[0-9]+');
    //绑定订单
//    Route::post('bind/surveys/{survey}', [SurveyController::class, 'bindOrderSurvey'])->where('survey', '[0-9]+');
//    //解绑订单
//    Route::post('unbind/orders/surveys/{order_survey}', [SurveyController::class, 'unbindOrderSurvey'])->where('order_survey', '[0-9]+');
    //问卷调查订单列表
    Route::get('surveys/{survey}/orders', [SurveyController::class, 'orderSurveys'])->where('survey', '[0-9]+');
    //问卷调查订单内容
    Route::get('orders/surveys/{order_survey}', [SurveyController::class, 'orderSurvey'])->where('order_survey', '[0-9]+');



    /**
     * 合作商
     */
    Route::prefix('collaborator')->group(function(Router $router){
        //列表
        $router->get('/',[CollaboratorsController::class,'index'])->name('admin.collaborator.index');
        //详情
        $router->get('/{id}',[CollaboratorsController::class,'detail'])->name('admin.collaborator.detail');
        //修改
        $router->put('/{id}',[CollaboratorsController::class,'update'])->name('admin.collaborator.update');
        //删除
        $router->delete('/{id}',[CollaboratorsController::class,'destroy'])->name('admin.collaborator.destroy');
        //审核
        $router->post('/audit/{id}',[CollaboratorsController::class,'audit'])->name('admin.collaborator.audit');
        //添加
        $router->post('/add',[CollaboratorsController::class,'add'])->name('admin.collaborator.add');
        //添加名额
        $router->post('/add/quota',[CollaboratorsController::class,'addQuota'])->name('admin.collaborator.add.quota');
        //详情
        $router->get('/quota/list',[CollaboratorsController::class,'getQuotaList'])->name('admin.collaborator.get.quota');
        //修改
        $router->put('/update/quota/{id}',[CollaboratorsController::class,'updateQuota'])->name('admin.collaborator.update.quota');
        //删除名额
        $router->delete('/del/quota/{id}',[CollaboratorsController::class,'delQuota'])->name('admin.collaborator.del.quota');
        //获取名额使用记录
        $router->get('/get/quota/log/{id}',[CollaboratorsController::class,'getQuotaLogList'])->name('admin.collaborator.get.quota.log');
    });

    /**
     * 营养品属性商品
     */
    Route::resource("nurture/shops", NurtureShopController::class);

    /**
     * dma商品
     */
    Route::get("dma/shops", [DmaShopController::class, "index"]);
    Route::get("dma/shops/{shop}", [DmaShopController::class, "show"]);
    Route::post("dma/shops", [DmaShopController::class, "store"]);
    Route::put("dma/shops/{shop}", [DmaShopController::class, "update"]);
    Route::delete("dma/shops/{shop}", [DmaShopController::class, "destroy"]);


    /**
     * 主持人
     */
    Route::prefix('moderators')->group(function () {
        Route::get('/', [ModeratorController::class, 'index'])->name('admin.moderator.list');
        Route::post('/{moderator}/audited', [ModeratorController::class, 'audited'])->name('admin.moderator.audited');
        Route::get('/{moderator}', [ModeratorController::class, 'show'])->name('admin.moderator.show')->where('moderator', '[0-9]+');
    });

    /**
     * 错误日志
     */
    Route::prefix('error')->group(function() {
        Route::get('/logs', [ErrorLogController::class, 'index'])->name('admin.error.logs.list');
    });

    /**
     * 微服务
     */

    //工单列表
    Route::get('get/work/order/list', [WorkServerController::class, 'getWorkOrderList'])->name('admin.get.work.order.list');
    //导出工单
    Route::get('export/work/order', [WorkServerController::class, 'exportWorkOrder'])->name('admin.export.work.order');

    /**
     * 办公室管理
     */
    //创建办公室
    Route::post('add/office', [OfficeController::class, 'addOffice'])->name('admin.add.office');
    //获取办公室列表
    Route::get('get/office/list', [OfficeController::class, 'getOfficeList'])->name('admin.get.office');
    //删除办公室
    Route::delete('delete/office', [OfficeController::class, 'deleteOffice'])->name('admin.delete.office');
    //修改办公室
    Route::put('update/office', [OfficeController::class, 'updateOffice'])->name('admin.update.office');
    //创建会议室
    Route::post('add/meet/room', [OfficeController::class, 'addMeetingRoom'])->name('admin.add.meet.room');
    //获取服务人员
    Route::get('get/service/user/list', [OfficeController::class, 'getServiceUser'])->name('admin.get.service.user.list');
    //获取会议室列表
    Route::get('get/meet/room/list', [OfficeController::class, 'getMeetRoomList'])->name('admin.get.meet.room.list');
    //删除会议室
    Route::delete('delete/meet/room', [OfficeController::class, 'deleteMeetRoom'])->name('admin.delete.meet.room');
    //获取会议室拥有者
    Route::get('get/meet/room/owner', [OfficeController::class, 'getOwnerUser'])->name('admin.get.meet.room.owner');
    //获取会议室预约记录
    Route::get('get/meet/room/reserve', [OfficeController::class, 'getMeetRoomReserve'])->name('admin.get.meet.room.reserve');
    //修改会议室
    Route::put('update/meet/room', [OfficeController::class, 'updateMeetRoom'])->name('admin.update.meet.room');

    //创建工位
    Route::post('add/station', [OfficeController::class, 'addStation'])->name('admin.add.station');
    //获取工位列表
    Route::get('get/station/list', [OfficeController::class, 'getStationList'])->name('admin.get.station.list');
    //删除工位
    Route::delete('delete/station', [OfficeController::class, 'deleteStation'])->name('admin.delete.station');
    //修改工位
    Route::put('update/station', [OfficeController::class, 'updateStation'])->name('admin.update.station');
    //获取绑定解绑记录
    Route::get('get/bind/log', [OfficeController::class, 'getBindLog'])->name('admin.get.bind.log');
    //导出办公室
    Route::get('export/office', [OfficeController::class, 'exportOffice'])->name('admin.export.office');
    //导出会议室
    Route::get('export/meet/room', [OfficeController::class, 'exportMeetRoom'])->name('admin.export.meet.room');
    //导出工位
    Route::get('export/station', [OfficeController::class, 'exportStation'])->name('admin.export.station');

    /**
     * 餐饮管理
     */
    //获取订餐记录
    Route::get('get/restaurant/list', [RestaurantController::class, 'getRestaurantList'])->name('admin.get.restaurant.list');
    //添加餐饮厨师人员
    Route::post('add/chef/user/plan', [RestaurantController::class, 'addChefUserPlan'])->name('admin.add.chef.user.plan');
    //获取厨师人员日历安排
    Route::get('get/chef/plan', [RestaurantController::class, 'getChefPlan'])->name('admin.add.chef.user');
    //导出订餐人员数据
    Route::get('export/restaurant/user', [RestaurantController::class, 'exportRestaurantUser'])->name('admin.export.restaurant.user');
    //获取订餐数据统计
    Route::get('get/restaurant/data/stat', [RestaurantController::class, 'getRestaurantDataStat'])->name('admin.get.restaurant.data.stat');
    //获取订餐数据统计
    Route::get('get/restaurant/evaluate/list', [RestaurantController::class, 'getEvaluateList'])->name('admin.get.restaurant.evaluate.list');
    //导出评价
    Route::get('export/restaurant/evaluate', [RestaurantController::class, 'exportEvaluate'])->name('admin.export.restaurant.evaluate');
    //导出厨师
    Route::get('export/chef/user', [RestaurantController::class, 'exportChefUser'])->name('admin.export.chef.user');
    //获取厨师安排
    Route::get('get/chef/plan/list', [RestaurantController::class, 'getChefPlanList'])->name('admin.get.chef.plan.list');
    //删除订餐记录
    Route::delete('delete/restaurant/log', [RestaurantController::class, 'deleteRestaurantLog'])->name('admin.delete.restaurant.log');

    Route::get('get/restaurant/date', [RestaurantController::class, 'getRestaurantDate'])->name('admin.get.restaurant.date');
    Route::post('set/restaurant/date', [RestaurantController::class, 'setRestaurantDate'])->name('admin.set.restaurant.date');
    Route::delete('remove/restaurant/date', [RestaurantController::class, 'removeRestaurantDate'])->name('admin.remove.restaurant.date');

    Route::get('get/can/restaurant/user', [RestaurantController::class, 'getCanRestaurantUser'])->name('admin.get.can.restaurant.user');
    Route::post('add/can/restaurant/user', [RestaurantController::class, 'addCanRestaurantUser'])->name('admin.add.can.restaurant.user');
    Route::delete('delete/can/restaurant/user', [RestaurantController::class, 'deleteCanRestaurantUser'])->name('admin.delete.can.restaurant.user');
    Route::put('update/user/office', [RestaurantController::class, 'updateUserOffice'])->name('admin.update.user.office');

    /**
     * 商城后台接口
     */
    //获取商城列表
    Route::get('get/shop/goods/list', [ShopController::class, 'getGoodsList'])->name('admin.get.shop.goods.list');
    //获取商品详情
    Route::get('get/shop/goods/detail', [ShopController::class, 'getGoodsDetail'])->name('admin.get.shop.goods.detail');
    //添加商品
    Route::post('add/shop/goods', [ShopController::class, 'addGoods'])->name('admin.add.shop.goods');
    //删除商品
    Route::delete('delete/shop/goods', [ShopController::class, 'deleteGoods'])->name('admin.delete.shop.goods');
    //修改商品
    Route::put('update/shop/goods', [ShopController::class, 'updateGoods'])->name('admin.update.shop.goods');
    //获取所有订单
    Route::get('get/shop/orders', [ShopController::class, 'getShopOrders'])->name('admin.get.shop.orders');
    Route::post('shop/orders', [ShopController::class, 'storeShopOrders'])->name('admin.store.shop.orders');

    //获取所有订单V2
    Route::get('get/shop/orders/v2', [ShopController::class, 'getShopOrdersV2']);
    //获取某个商品下订单
    Route::get('get/shop/goods/orders', [ShopController::class, 'getShopGoodsOrders'])->name('admin.get.shop.goods.orders');
    //订单退款
    Route::post('shop/order/refund', [ShopController::class, 'shopOrderRefund'])->name('admin.shop.order.refund');
    //订单退款V2
    Route::post('shop/order/refund/v2', [ShopController::class, 'shopOrderRefundV2']);
    //订单退款回调
    Route::post('shop/order/refund/callback', [ShopController::class, 'shopOrderRefundCallback'])->name('admin.shop.order.refund.callback');
    //订单发货
    Route::post('shop/order/shipment', [ShopController::class, 'orderShipment'])->name('admin.shop.order.shipment');
    //订单发货V2
    Route::post('shop/order/shipment/v2', [ShopController::class, 'orderShipmentV2']);

    //增加订单收益信息
    Route::post("shop/orders/{order}/sharer", [ShopController::class, 'addShopOrderSharer']);
    Route::put("shop/orders/sharers/{share}", [ShopController::class, 'updateShopOrderSharer']);
    Route::get("shop/orders/{order}/sharers", [ShopController::class, 'shopOrderSharers']);
    Route::delete("shop/orders/sharer/{share}", [ShopController::class, 'deleteShopOrderSharer']);
    //提交收益
    Route::post("apply/shop/orders/sharers/{share}", [ShopController::class, 'applyShopOrderSharer']);
    //审核列表
    Route::get("shop/order/sharers", [ShopController::class, 'shopOrdersSharers']);
    //审核分享收益
    Route::post("audit/shop/orders/sharers/{share}", [ShopController::class, 'auditShopOrderSharer']);

    //搜索快递公司
    Route::get('get/express/company', [ShopController::class, 'getExpressCompany'])->name('admin.get.express.company');
    //标记订单问题
    Route::post('shop/mark/order/problem', [ShopController::class, 'markOrderProblem'])->name('admin.shop.mark.order.problem');
    //标记问题订单V2
    Route::post('shop/mark/order/problem/v2', [ShopController::class, 'markOrderProblemV2']);
    //获取订单备注
    Route::get('get/order/comments', [ShopController::class, 'getOrderComments'])->name('admin.get.order.comments');
    //获取订单备注列表V2
    Route::get('get/order/comments/v2', [ShopController::class, 'getOrderCommentsV2']);
    //增加订单备注
    Route::post('add/order/comments', [ShopController::class, 'addOrderComments'])->name('admin.add.order.comments');
    //增加订单备注V2
    Route::post('add/order/comments/v2', [ShopController::class, 'addOrderCommentsV2']);

    //订单签收
    Route::post('take/order', [ShopController::class, 'takeOrder'])->name('admin.take.order');
    //订单签收V2
    Route::post('take/order/v2', [ShopController::class, 'takeOrderV2']);

    //导出订单数据
    Route::get('export/shop/order', [ShopController::class, 'exportOrderExcel'])->name('admin.export.shop.order');
    //获取订单退款记录
    Route::get('shop/order/refund/log', [ShopController::class, 'getRefundOrder'])->name('admin.shop.order.refund.log');
    //获取订单退款记录V2
    Route::get('shop/order/refund/log/v2', [ShopController::class, 'getRefundOrderV2']);

    //获取订单退款详情
    Route::get('shop/order/refund/detail', [ShopController::class, 'getRefundOrderDetail'])->name('admin.shop.order.refund.detail');
    //获取订单退款详情V2
    Route::get('shop/order/refund/detail/v2', [ShopController::class, 'getRefundOrderDetailV2']);

    //导出商品
    Route::get('export/shop/goods', [ShopController::class, 'exportGoods'])->name('admin.export.shop.goods');
    //出库入库
    Route::post('set/shop/goods/stock', [ShopController::class, 'setGoodsStock'])->name('admin.set.shop.goods.stock');
    //订单详情
    Route::get('get/order/detail', [ShopController::class, 'getOrderDetail'])->name('admin.get.shop.order.detail');
    //订单详情V2
    Route::get('get/order/detail/v2', [ShopController::class, 'getOrderDetailV2']);

    Route::get('get/all/goods', [ShopController::class, 'getAllGoodsList'])->name('admin.get.all.goods');

    //备注分类
    Route::post('add/comment/type', [CommentController::class, 'addCommentType']);
    Route::get('get/comment/type', [CommentController::class, 'getCommentType']);
    /**
     * 批发商商品管理
     */
    //创建批发商商品
    Route::post('agent/shops/{shop}', [ShopController::class, 'storeAgentShop'])->name('admin.agent.shop')->where('shop', '[0-9]+');
    //批发商商品列表
    Route::get('agent/shops', [ShopController::class, 'agentShops']);
    //批发商商品详情
    Route::get('agent/shops/{shop}', [ShopController::class, 'agentShop'])->where('shop', '[0-9]+');
    //批发商商品修改
    Route::put('agent/shops/{shop}', [ShopController::class, 'updateAgentShop'])->where('shop', '[0-9]+');
    //批发商商品删除
    Route::delete('agent/shops/{shop}', [ShopController::class, 'deleteAgentShop'])->where('shop', '[0-9]+');
    //批发商商品订单
    Route::get('agent/orders', [ShopController::class, 'agentOrders']);
    //经销商订单详情
    Route::get('agent/orders/{order_id}', [ShopController::class, 'agentOrder']);
    //发货
    Route::post('agent/orders/{order}/shipment', [ShopController::class, 'agentOrderShipment'])->name('admin.agent.order.shipment');
    //签收
    Route::post('sign/agent/orders/{order}', [ShopController::class, 'signAgentOrder'])->name('admin.agent.order.sign');
    //订单退款
    Route::post('agent/order/{order}/refund', [ShopController::class, 'agentOrderRefund']);
    //退款记录
    Route::get('agent/order/{order}/refund/log', [ShopController::class, 'refundOrders'])->name('admin.agent.order.refund.log');
    //增加批发商订单
    Route::post("agent/order", [ShopController::class, 'storeAgentOrder']);
    //修改订单合同
    Route::post('contract/agent/orders/{order_id}', [ShopController::class, 'contractOrder']);
    //提取记录
    Route::get('agent/stocks', [ShopController::class, 'agentStocks']);
    //确认提取额
    Route::post("confirm/agent/stocks/{stock}", [ShopController::class, 'confirmStock']);
    //收益记录
    Route::get('agent/earnings', [ShopController::class, 'agentEarnings']);
    //提现记录
    Route::get('agent/withdraws', [ShopController::class, 'agentWithdraws']);
    Route::post("confirm/agent/withdraws/{withdraw}", [ShopController::class, 'confirmWithdraw']);
    //抽奖码
    Route::get("agent/lotto/codes", [ShopController::class, 'agentLottoCodes']);
    //经销商列表
    Route::get('agent/users', [ShopController::class, 'agentUsers']);
    Route::get('agent/users/detail/{id}', [ShopController::class, 'agentUserDetail']);
    //增加经销商
    Route::post('agent/users', [ShopController::class, 'storeAgentUsers']);
    Route::put('agent/users/{id}', [ShopController::class, 'updateAgentUsers']);
    //批发商变更记录
    Route::get("agent/users/{user}/logs", [ShopController::class, 'logs']);

    //修改经销商介绍人
//    Route::post("change/agent/users/{agent_user}/sharer", [ShopController::class, 'addAgentUserSharer']);
//    Route::post("change/agent/orders/{order_id}/sharer", [ShopController::class, 'addAgentOrderSharer']);
    //增加订单收益信息
    Route::post("agent/orders/{order_id}/sharer", [ShopController::class, 'addAgentOrderSharer']);
    Route::put("agent/orders/sharers/{share}", [ShopController::class, 'updateAgentOrderSharer']);
    Route::get("agent/orders/{order_id}/sharers", [ShopController::class, 'agentOrderSharers']);
    Route::delete("agent/orders/sharer/{share}", [ShopController::class, 'deleteAgentOrderSharer']);
    //提交收益
    Route::post("apply/agent/orders/sharers/{share}", [ShopController::class, 'applyAgentOrderSharer']);
    //审核列表
    Route::get("agent/order/sharers", [ShopController::class, 'agentOrdersSharers']);
    //审核分享收益
    Route::post("audit/agent/orders/sharers/{share}", [ShopController::class, 'auditAgentOrderSharer']);

    //增加介绍人收益
    Route::post('agent/orders/shares/{share_id}/commission', [ShopController::class, 'addCommission']);

    /**
     * 数据统计
     */
    //获取统计数据
    Route::get('get/data/stat', [DataStatController::class, 'getDataStat'])->name('admin.get.data.stat');

    /**
     * app相关接口
     */
    //设置隐私协议
    Route::post('set/privacy', [ConfigController::class, 'setPrivacy'])->name('admin.set.privacy');
    Route::post('set/public/config', [ConfigController::class, 'setPublicConfig'])->name('admin.set.public.config');
    //获取隐私协议
    Route::get('get/privacy', [ConfigController::class, 'getPrivacy'])->name('admin.get.privacy');
    //设置服务条款
    Route::post('set/service/term', [ConfigController::class, 'setServiceTerm'])->name('admin.set.service.term');
    //获取服务协议
    Route::get('get/service/term', [ConfigController::class, 'getServiceTerm'])->name('admin.get.service.term');
    //设置app迭代信息
    Route::post('set/app/version', [ConfigController::class, 'setAppVersion'])->name('admin.set.app.version');
    Route::put('update/app/version', [ConfigController::class, 'updateAppVersion'])->name('admin.update.app.version');
    Route::delete('delete/app/version', [ConfigController::class, 'deleteAppVersion'])->name('admin.delete.app.version');
    Route::get('get/app/version/list', [ConfigController::class, 'getAppVersionList'])->name('admin.get.app.version.list');

    /**
     *群聊相关接口
     */
    //获取网易云信注册用户
    Route::get('get/chat/user/list', [ChatController::class, 'getWangYiYunUser'])->name('admin.get.chat.user.list');
    //创建网易云信群聊
    Route::post('create/group', [ChatController::class, 'createGroup'])->name('admin.create.group');
    //拉人入群
    Route::post('add/group/user', [ChatController::class, 'addGroupUser'])->name('admin.add.group.user');
    //获取群聊列表
    Route::get('get/group/list', [ChatController::class, 'getGroupList'])->name('admin.get.group.list');
    //获取群详情
    Route::get('get/group/detail', [ChatController::class, 'getGroupDetail'])->name('admin.get.group.detail');
    //解散群
    Route::delete('delete/group', [ChatController::class, 'deleteGroup'])->name('admin.delete.group');
    //修改群主
    Route::put('update/group/owner', [ChatController::class, 'updateGroupOwner'])->name('admin.update.group.owner');
    //获取群聊成员
    Route::get('get/group/user/list', [ChatController::class, 'getGroupUserList'])->name('admin.get.group.user.list');
    //修改群昵称
    Route::put('update/group/name', [ChatController::class, 'updateGroupName'])->name('admin.update.group.name');
    //踢人出群
    Route::delete('kick/group/user', [ChatController::class, 'kickGroupUser'])->name('admin.kick.group.user');
    //添加管理员
    Route::put('add/manage', [ChatController::class, 'addManage'])->name('admin.add.manage');
    //移除管理员
    Route::put('remove/manage', [ChatController::class, 'removeManage'])->name('admin.remove.manage');
    //修改群用户状态
    Route::put('update/group/user/status', [ChatController::class, 'updateGroupUserStatus'])->name('admin.update.group.user.status');
    //修改群信息
    Route::put('update/group/info', [ChatController::class, 'updateGroupInfo'])->name('admin.update.group.info');
    //获取群聊记录
    Route::get('get/group/message',[ChatController::class,'getGroupMessage'])->name('admin.get.group.message');

    //增加群聊二维码
    Route::put('update/group', [ChatController::class, 'updateGroup'])->name("admin.update.group");

    //设置版本号
    Route::post('add/version', [UserController::class, 'addVersion'])->name('admin.add.version');
    //获取版本号列表
    Route::get('get/version/list', [UserController::class, 'getVersionList'])->name('admin.get.version.list');
    //编辑版本号
    Route::put('edit/version', [UserController::class, 'editVersion'])->name('admin.edit.version');


    /**
     * 分佣管理
     */
    //等級列表
    Route::get('earning/grades', [EarningController::class, 'grades'])->name('admin.earning.grades');
    //创建等级
    Route::post('earning/grades', [EarningController::class, 'storeGrades'])->name('admin.store.earning.grades');
    //修改等级
    Route::put('earning/grades/{grade}', [EarningController::class, 'updateGrade'])->name('admin.update.earning.grade');
    //删除等级
    Route::delete('earning/grades/{grade}', [EarningController::class, 'deleteGrade'])->name('admin.delete.earning.grade');
    //添加等级用户
    Route::post('earning/grades/{grade}/users', [EarningController::class, 'storeGradeUsers'])->name('admin.store.earning.grade.user');
    //删除等级用户
    Route::delete('earning/grades/{grade}/users', [EarningController::class, 'deleteGradeUsers'])->name('admin.delete.earning.grade.user');
    //等级用户列表
    Route::get('earning/grades/{grade}/users', [EarningController::class, 'gradeUsers'])->name('admin.earning.grade.users');
    //用户列表导出
    Route::get('earning/grades/{grade}/users/export', [EarningController::class, 'gradeUsersExport'])->name('admin.export.earning.grade.users');
    //分佣列表
    Route::get('earning/logs', [EarningController::class, 'logs'])->name('admin.earning.logs');
    //分佣导出
    Route::get('export/earning/logs', [EarningController::class, 'exportLogs'])->name('admin.export.earning.logs');


    /**
     * 抽奖管理
     */
    //抽奖活动
    Route::resource('lotteries', LotteryController::class);
    Route::get('lotteries/{lottery}/members', [LotteryController::class, 'members']);
    Route::post('lotteries/{lottery}/members', [LotteryController::class, 'storeMember']);
    Route::delete('lotteries/members/{member}', [LotteryController::class, 'deleteMember']);
    Route::get('lotteries/{lottery}/winning/members', [LotteryController::class, 'winningMembers']);
    Route::post('lotteries/{lottery}/awards', [LotteryController::class, 'storeAwards']);
    Route::get('lotteries/{lottery}/awards', [LotteryController::class, 'awards']);
    Route::delete('lotteries/awards/{award}', [LotteryController::class, 'deleteAward']);
    Route::put('lotteries/awards/{award}', [LotteryController::class, 'updateAward']);
    Route::get('lotteries/awards/{award}', [LotteryController::class, 'award']);
    //清空中奖用户

    /**
     * 供应商
     */
    Route::get('/get/area/list',[SupplierController::class, 'getArea'])->name('admin.get.area.list');
    Route::get('/get/supplier/list',[SupplierController::class, 'getList'])->name('admin.get.supplier.list');
    Route::put('/update/supplier/{id}',[SupplierController::class, 'updateData'])->name('admin.update.supplier');
    Route::delete('/delete/supplier/{id}',[SupplierController::class, 'deleteData'])->name('admin.delete.supplier');
    Route::post('/add/supplier',[SupplierController::class, 'addData'])->name('admin.add.supplier');
    Route::get('/get/supplier/detail/{id}',[SupplierController::class, 'getDetail'])->name('admin.get.supplier.detail');

    /**
     * 产品
     */
    Route::post('/add/product/category',[ProductController::class, 'addProductCategory'])->name('admin.add.product.category');
    Route::post('/add/product',[ProductController::class, 'addProduct'])->name('admin.add.product');
    Route::get('/get/product/list',[ProductController::class, 'getProductList'])->name('admin.get.product.list');
    Route::get('/get/product/category/list',[ProductController::class, 'getProductCategoryList'])->name('admin.get.product.category.list');
    Route::put('/update/product/{id}',[ProductController::class, 'updateProduct'])->name('admin.update.product');
    Route::delete('/delete/product/{id}',[ProductController::class, 'deleteProduct'])->name('admin.delete.product');

    /**
     * 合同
     */
    Route::post('/add/contract',[ContractController::class, 'addContract'])->name('admin.add.contract');
    Route::get('/get/contract',[ContractController::class, 'getContract'])->name('admin.get.contract.list');
    Route::put('/update/contract/{id}',[ContractController::class, 'updateContract'])->name('admin.update.contract');
    Route::delete('/delete/contract/{id}',[ContractController::class, 'deleteContract'])->name('admin.delete.contract');

    Route::post('/add/contract/type',[ContractController::class, 'addContractType'])->name('admin.add.contract.type');
    Route::get('/get/contract/type',[ContractController::class, 'getContractTypeList'])->name('admin.get.contract.type.list');
    Route::put('/update/contract/type/{id}',[ContractController::class, 'updateContractType'])->name('admin.update.contract.type');
    Route::delete('/delete/contract/type/{id}',[ContractController::class, 'deleteContractType'])->name('admin.delete.contract.type');

    /**
     * 头脑风暴
     */
    Route::post('/add/talk',[OtherController::class, 'createTalk'])->name('admin.add.talk');
    Route::get('/get/talk',[OtherController::class, 'getTalkList'])->name('admin.get.talk.list');
    Route::put('/update/talk/{id}',[OtherController::class, 'updateTalk'])->name('admin.update.talk');
    Route::delete('/delete/talk/{id}',[OtherController::class, 'deleteTalk'])->name('admin.delete.talk');
    Route::get('/get/talk/comment/{id}',[OtherController::class, 'getTalkComment'])->name('admin.get.talk.comment');
    Route::get('/get/talk/detail/{id}',[OtherController::class, 'getTalkDetail'])->name('admin.get.talk.detail');
    Route::get('/get/talk/star/{id}',[OtherController::class, 'getStarList'])->name('admin.get.talk.star');

    //接龙
    Route::post('/add/dragon/config',[OtherController::class, 'createDragonConfig'])->name('admin.create.dragon.config');
    Route::get('/get/dragon/config/list',[OtherController::class, 'getDragonConfigList'])->name('admin.get.dragon.config.list');
    Route::put('/update/dragon/config/{id}',[OtherController::class, 'updateDragonConfig'])->name('admin.update.dragon.config');
    Route::delete('/delete/dragon/config/{id}',[OtherController::class, 'deleteDragonConfig'])->name('admin.delete.dragon.config');
    Route::get('/get/dragon/user/{id}',[OtherController::class, 'getDragonUser'])->name('admin.get.dragon.user');

    //审核方案前问卷
    Route::put('/check/dma/question/{id}',[OtherController::class, 'checkDmaQuestion'])->name('admin.check.dma.question');
    Route::put('/check/before/dma/question/{id}',[OtherController::class, 'checkBeforeDmaQuestion'])->name('admin.check.before.dma.question');
    /**
     * 步数
     */
    Route::get('/get/step/apply',[OrderController::class, 'getStepApply'])->name('admin.get.step.apply');
    Route::put('/update/step/apply/{id}',[OrderController::class, 'updateStepApplyStatus'])->name('admin.update.step.apply.status');

    /**
     * 活动
     */
    Route::post('/add/activity',[ActivityController::class, 'addActivity'])->name('admin.add.activity');
    Route::get('/get/activity',[ActivityController::class, 'getActivity'])->name('admin.get.activity');
    Route::get('/get/activity/detail/{id}',[ActivityController::class, 'getActivityDetail'])->name('admin.get.activity.detail');
    Route::put('/update/activity/{id}',[ActivityController::class, 'updateActivity'])->name('admin.update.activity');
    Route::delete('/delete/activity/{id}',[ActivityController::class, 'deleteActivity'])->name('admin.delete.activity');
    //签到列表
    Route::get("activities/{activity}/members", [ActivityController::class, 'members']);
    //签到列表v2
    Route::get("activities/{activity}/members/logs", [ActivityController::class, 'membersLogs']);

    Route::get('/get/activity/order',[ActivityController::class, 'getActivityOrder'])->name('admin.get.activity.orders');
    Route::post('/activity/order',[ActivityController::class, 'storeActivityOrder'])->name('admin.store.activity.orders');

    Route::get('/activity/orders/{order}',[ActivityController::class, 'order'])->name('admin.activity.order');

    Route::post('/add/activity/meeting/{id}',[ActivityController::class, 'addActivityMeeting'])->name('admin.add.activity.meeting');
    Route::get('/get/activity/meeting/{id}',[ActivityController::class, 'getActivityMeeting'])->name('admin.get.activity.meeting');

    Route::get('/get/activity/apply',[ActivityController::class, 'getMeetingApply'])->name('admin.get.activity.meeting.apply');
    Route::put('/update/activity/meeting/desk/{id}',[ActivityController::class, 'updateUserDesk'])->name('admin.update.activity.meeting.desk');
    Route::get('/get/activity/order/use/{id}',[ActivityController::class, 'getActivityOrderUse'])->name('admin.get.activity.order.use');
    //导入活动人员a'pi
    Route::post('/import/activity/{activity_id}/members', [ActivityController::class, 'importMember']);

    //分享记录
    Route::get('users/{user}/share/logs', [ActivityController::class, 'shareLogs']);

    //审核退款
    Route::get('activity/refund/orders', [ActivityController::class, 'refundOrders']);
    Route::post('/audit/activity/refund/orders/{order}', [ActivityController::class, 'auditRefundOrders']);
    //申请退款
    Route::post("activity/refund/orders/{order}", [ActivityController::class, 'applyRefund']);
    //退款记录
    Route::get("activity/orders/{order}/refunds", [ActivityController::class, 'refunds']);
    Route::post("operate/amount", [ActivityController::class, 'operateAmount']);
    Route::get("get/operate/amount/log/{id}", [ActivityController::class, 'getAmountLog']);

    //微信支付商家
    Route::get("payments", [ActivityController::class, 'payments']);

    /**
     * 定期活动
     */
    Route::resource("regular/activities", RegularActivityController::class);
    Route::get("regular/activities/{activity}/members", [RegularActivityController::class, 'members']);
    Route::get("regular/activities/{activity}/members/logs", [RegularActivityController::class, 'membersLogs']);
    Route::get("regular/activities/{activity}/award/members", [RegularActivityController::class, 'awardMembers']);
    Route::get("regular/activity/dates", [RegularActivityController::class, "activityDate"]);
    Route::get("regular/activities/{activity}/orders", [RegularActivityController::class, 'orders']);

    /**
     * 视频
     */
    Route::post('/add/order/video', [VideoController::class, 'addOrderVideo']);
    Route::get('/get/order/video/list', [VideoController::class, 'getOrderVideoList']);
    Route::delete('/delete/order/video/{id}', [VideoController::class, 'deleteOrderVideo']);

    Route::get('/get/feedback/list', [ConfigController::class, 'getFeedback']);
    Route::get('/get/report/log', [ConfigController::class, 'getReport']);

    /**
     * 手环
     */
    Route::get('users/{user}/band/sleep/data', [BandController::class, 'sleepData'])->where('user', '[0-9]+');
    Route::get('users/{user}/band/hrrest/data', [BandController::class, 'hrrestData'])->where('user', '[0-9]+');
    Route::get('users/{user}/band/temp/data', [BandController::class, 'tempData'])->where('user', '[0-9]+');
    Route::get('users/{user}/band/hrv/data', [BandController::class, 'hrvData'])->where('user', '[0-9]+');
    Route::get('users/{user}/band/blood/data', [BandController::class, 'bloodData'])->where('user', '[0-9]+');
    Route::get('users/{user}/band/battery/data', [BandController::class, 'batteryData'])->where('user', '[0-9]+');
    Route::get('users/{user}/band/syn/data', [BandController::class, 'synData'])->where('user', '[0-9]+');
    Route::get('users/{user}/band/list', [BandController::class, 'userBandList'])->where('user', '[0-9]+');
    Route::delete('users/un/bind/band/{id}', [BandController::class, 'unBindUserBand'])->where('id', '[0-9]+');

    Route::get('get/fat/kinds/v1', [OrderController::class, 'getFatKindsV1'])->name('admin.get.fat.kinds.v1');
    Route::get('get/fat/stat/v1', [OrderController::class, 'getFatStatV1'])->name('admin.get.fat.stat.v1');
});

Route::get('earning/grades/{grade}/users/export', [EarningController::class, 'gradeUsersExport'])->name('admin.export.earning.grade.users');
Route::any('shop/order/{refund_trade_no}/refund/callback', [ShopController::class, 'shopOrderRefundCallbackV2']);
Route::any('agent/order/{refund_trade_no}/refund/callback', [ShopController::class, 'agentOrderRefundCallback']);
Route::delete("lotteries/{lottery}/winning/members", [LotteryController::class, 'deleteWinningMembers'])->where('lottery', '[0-9]+');


