<?php
use Webman\Route;

//v1版本
Route::group('/v1', function () {
    //管理员登录
    Route::post('/system/login', [app\admin\controller\index\Login::class, 'login']);
    //获取图形验证码
    Route::get('/system/get_captcha', [app\admin\controller\index\Login::class, 'getCaptcha']);
    //文件上传
    Route::post('/upload/file', [app\admin\controller\UploadFile::class, 'uploadFile']);
    //智能设备数据插入
    Route::post('/equipment/log', [app\admin\controller\index\Admin::class, 'logInsert']);
    //智能设备数据插入
    Route::post('/emqx/log', [app\admin\controller\index\Admin::class, 'emqxLog']);
    //获取业务控制器列表
    Route::get('/business/list', [app\admin\controller\index\Admin::class, 'businessList']);
    //更新业务控制器
    Route::post('/business/update', [app\admin\controller\index\Admin::class, 'businessUpdate']);
    //业务控制器插入
    Route::post('/business/insert', [app\admin\controller\index\Admin::class, 'businessInsert']);
    //获取页面及地址
    Route::get('/get/page/list', [app\admin\controller\index\Index::class, 'getPageList']);
    //菜单列表
    Route::get('/system/menu', [app\admin\controller\menu\Menu::class, 'getHomeMenuList'])->middleware([
        app\admin\middleware\JwtAuthMiddleware::class, //鉴权登录
    ]);

    Route::group('/system/', function (){
        //修改密码
        Route::post('update/pwd', [app\admin\controller\index\Login::class, 'updatePwd']);
        //退出登录
        Route::post('login/out', [app\admin\controller\index\Login::class, 'loginOut']);
        //系统设置分类列表
        Route::get('get/classify', [app\admin\controller\index\Config::class, 'getClassify']);
        //系统设置分类添加
        Route::post('insert/classify', [app\admin\controller\index\Config::class, 'insertClassify']);
        //系统设置分类编辑
        Route::post('update/classify', [app\admin\controller\index\Config::class, 'updateClassify']);
        //系统设置分类删除/状态修改
        Route::post('del_up/classify', [app\admin\controller\index\Config::class, 'delUpClassify']);
        //系统设置分类详情
        Route::get('get/classify_info', [app\admin\controller\index\Config::class, 'getClassifyInfo']);
        //系统管理员日志
        Route::get('permlog/list', [app\admin\controller\index\SystemPermLog::class, 'getLogList']);
        //H5设置详情
        Route::get('get/h5config', [app\admin\controller\index\H5Config::class, 'getConfig']);
        //H5设置修改
        Route::post('update/h5config', [app\admin\controller\index\H5Config::class, 'updateConfig']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class, //鉴权登录
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //管理员
    Route::group('/admin', function (){
        //管理员列表
        Route::get('/get/list', [app\admin\controller\index\Admin::class, 'getAdminList']);
        //管理员详情
        Route::get('/get/info', [app\admin\controller\index\Admin::class, 'adminInfo']);
        //管理员编辑
        Route::post('/update', [app\admin\controller\index\Admin::class, 'updateAdmin']);
        //管理员删除
        Route::get('/get/delete', [app\admin\controller\index\Admin::class, 'delAdmin']);
        //管理员添加
        Route::post('/insert', [app\admin\controller\index\Admin::class, 'insertAdmin']);
        //修改管理员状态
        Route::get('/get/status', [app\admin\controller\index\Admin::class, 'updateStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class, //鉴权登录
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //角色
        Route::group('/role', function (){
        //角色列表
        Route::get('/get/list', [app\admin\controller\role\Role::class, 'getRoleList']);
        //所有角色
        Route::get('/get/all', [app\admin\controller\role\Role::class, 'getRoleAll']);
        //角色详情
        Route::get('/get/info', [app\admin\controller\role\Role::class, 'roleInfo']);
        //角色编辑
        Route::post('/update', [app\admin\controller\role\Role::class, 'updateRole']);
        //角色删除
        Route::get('/get/delete', [app\admin\controller\role\Role::class, 'delRole']);
        //角色添加
        Route::post('/insert', [app\admin\controller\role\Role::class, 'addRole']);
        //修改角色状态
        Route::get('/get/status', [app\admin\controller\role\Role::class, 'updateStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class, //鉴权登录
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //智能产品
    Route::group('/product', function (){
        //产品列表
        Route::get('/get/list', [app\admin\controller\intelligence\Product::class, 'getProductList']);
        //产品详情
        Route::get('/get/info', [app\admin\controller\intelligence\Product::class, 'productInfo']);
        //产品编辑
        Route::post('/update', [app\admin\controller\intelligence\Product::class, 'updateProduct']);
        //产品删除
        Route::get('/get/delete', [app\admin\controller\intelligence\Product::class, 'delProduct']);
        //产品添加
        Route::post('/insert', [app\admin\controller\intelligence\Product::class, 'addProduct']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class, //鉴权登录
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //智能产品分类
    Route::group('/category', function (){
        //产品分类列表
        Route::get('/get/list', [app\admin\controller\intelligence\Category::class, 'getCategoryList']);
        //产品分类详情
        Route::get('/get/info', [app\admin\controller\intelligence\Category::class, 'categoryInfo']);
        //产品分类编辑
        Route::post('/update', [app\admin\controller\intelligence\Category::class, 'updateCategory']);
        //产品分类删除
        Route::get('/get/delete', [app\admin\controller\intelligence\Category::class, 'delCategory']);
        //产品分类添加
        Route::post('/insert', [app\admin\controller\intelligence\Category::class, 'addCategory']);
        //所有产品分类
        Route::get('/get/all', [app\admin\controller\intelligence\Category::class, 'getCategoryAll']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class, //鉴权登录
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //菜单
    Route::group('/menu', function (){
        //菜单列表
        Route::get('/get/list', [app\admin\controller\menu\Menu::class, 'getMenuList']);
        //菜单详情
        Route::get('/get/info', [app\admin\controller\menu\Menu::class, 'menuInfo']);
        //菜单编辑
        Route::post('/update', [app\admin\controller\menu\Menu::class, 'updateMenu']);
        //菜单删除
        Route::get('/get/delete', [app\admin\controller\menu\Menu::class, 'delMenu']);
        //菜单添加
        Route::post('/insert', [app\admin\controller\menu\Menu::class, 'addMenu']);
        //三级菜单
        Route::get('/get/level', [app\admin\controller\menu\Menu::class, 'menuLevel']);
        //三级菜单
        Route::get('/levels', [app\admin\controller\menu\Menu::class, 'secondLevel']);
        //修改菜单状态
        Route::get('/get/status', [app\admin\controller\menu\Menu::class, 'updateStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class, //鉴权登录
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);
    //权益包
    Route::group('/package', function (){
        //权益包列表
        Route::get('/get/list', [app\admin\controller\package\Package::class, 'getPackageList']);
        //添加任务包
        Route::post('/add', [app\admin\controller\package\Package::class, 'addPackage']);
        //删除/下架权益包
        Route::get('/del', [app\admin\controller\package\Package::class, 'delPackage']);
        //修改权益包
        Route::post('/update', [app\admin\controller\package\Package::class, 'updatePackage']);
        //权益包详情
        Route::get('/info', [app\admin\controller\package\Package::class, 'infoPackage']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);
    //权益包产品
    Route::group('/goods', function (){
        //产品列表
        Route::get('/get/list', [app\admin\controller\package\PackageGoods::class, 'getPackageGoodsList']);
        //添加产品
        Route::post('/add', [app\admin\controller\package\PackageGoods::class, 'addPackageGoods']);
        //删除/下架权益包
        Route::get('/del', [app\admin\controller\package\PackageGoods::class, 'delPackageGoods']);
        //修改权益包
        Route::post('/update', [app\admin\controller\package\PackageGoods::class, 'updatePackageGoods']);
        //权益包详情
        Route::get('/info', [app\admin\controller\package\PackageGoods::class, 'infoPackageGoods']);
        //获取订单列表
        Route::get('/order/list', [app\admin\controller\package\PackageOrder::class, 'getPackageOrderList']);
        //获取订单详情
        Route::get('/order/info', [app\admin\controller\package\PackageOrder::class, 'infoPackageOrder']);
        //支付状态
        Route::post('/order/paystatus', [app\admin\controller\package\PackageOrder::class, 'updatePayStatus']);
        //产品分类列表
        Route::get('/category/list', [app\admin\controller\package\PackageGoodsCategory::class, 'getPackageGoodsCategoryList']);
        //添加产品分类
        Route::post('/category/add', [app\admin\controller\package\PackageGoodsCategory::class, 'addPackageGoodsCategory']);
        //删除产品分类
        Route::get('/category/del', [app\admin\controller\package\PackageGoodsCategory::class, 'delPackageGoodsCategory']);
        //修改产品分类
        Route::post('/category/update', [app\admin\controller\package\PackageGoodsCategory::class, 'updatePackageGoodsCategory']);
        //产品分类详情
        Route::get('/category/info', [app\admin\controller\package\PackageGoodsCategory::class, 'infoPackageGoodsCategory']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);
    //医疗产品
    Route::group('/medical_product', function (){
        //产品列表
        Route::get('/product/list', [app\admin\controller\medical\Product::class, 'getProductList']);
        //添加产品
        Route::post('/product/add', [app\admin\controller\medical\Product::class, 'addProduct']);
        //删除产品
        Route::get('/product/del', [app\admin\controller\medical\Product::class, 'delProduct']);
        //修改产品
        Route::post('/product/update', [app\admin\controller\medical\Product::class, 'updateProduct']);
        //产品详情
        Route::get('/product/info', [app\admin\controller\medical\Product::class, 'infoProduct']);
        //产品上/下架
        Route::get('/product/show', [app\admin\controller\medical\Product::class, 'showProduct']);
        //订单列表
        Route::get('/order/list', [app\admin\controller\medical\ProductOrder::class, 'getOrderList']);
        //订单详情
        Route::get('/order/info', [app\admin\controller\medical\ProductOrder::class, 'infoPackageOrder']);
        //修改订单支付状态
        Route::post('/order/paystatus', [app\admin\controller\medical\ProductOrder::class, 'updatePayStatus']);
        //预约服务列表
        Route::get('/ment/list', [app\admin\controller\medical\Appointment::class, 'getMentList']);
        //添加预约服务
        Route::post('/ment/add', [app\admin\controller\medical\Appointment::class, 'addMent']);
        //修改
        Route::post('/ment/update', [app\admin\controller\medical\Appointment::class, 'updateMent']);
        //详情
        Route::get('/ment/info', [app\admin\controller\medical\Appointment::class, 'infoMent']);
        //删除
        Route::get('/ment/del', [app\admin\controller\medical\Appointment::class, 'delMent']);
        //上下架
        Route::get('/ment/show', [app\admin\controller\medical\Appointment::class, 'showMent']);
        //预约记录
        Route::get('/ment_log/index', [app\admin\controller\medical\Appointment::class, 'mentLogList']);
        //预约详情
        Route::get('/ment_log/info', [app\admin\controller\medical\Appointment::class, 'mentLogInfo']);
        //预约记录支付状态
        Route::post('/ment_log/paystatus', [app\admin\controller\medical\Appointment::class, 'updatePayStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);
    //运费模板
    Route::group('/postage', function (){
        //模板列表
        Route::get('/get/list', [app\admin\controller\medical\Postage::class, 'getPostagetList']);
        //添加模板
        Route::post('/add', [app\admin\controller\medical\Postage::class, 'addPostage']);
        //删除模板
        Route::get('/del', [app\admin\controller\medical\Postage::class, 'delPostage']);
        //修改模板
        Route::post('/update', [app\admin\controller\medical\Postage::class, 'updatePostage']);
        //模板详情
        Route::get('/info', [app\admin\controller\medical\Postage::class, 'infoPostage']);
        //修改状态
        Route::get('/show', [app\admin\controller\medical\Postage::class, 'showPostage']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //医疗模块--预约服务业务员
    Route::group('/salesman', function (){
        //业务员列表
        Route::get('/get/list', [app\admin\controller\medical\Salesman::class, 'getSalesmanList']);
        //业务员详情
        Route::get('/get/info', [app\admin\controller\medical\Salesman::class, 'salesmanInfo']);
        //业务员编辑
        Route::post('/update', [app\admin\controller\medical\Salesman::class, 'updateSalesman']);
        //业务员删除
        Route::get('/get/delete', [app\admin\controller\medical\Salesman::class, 'delSalesman']);
        //业务员添加
        Route::post('/insert', [app\admin\controller\medical\Salesman::class, 'addSalesman']);
        //业务员状态修改
        Route::get('/get/status', [app\admin\controller\medical\Salesman::class, 'updateStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);
    //医疗模块--预约科目
    Route::group('/subject', function (){
        //科目列表
        Route::get('/get/list', [app\admin\controller\medical\Subject::class, 'getSubjectList']);
        //科目详情
        Route::get('/get/info', [app\admin\controller\medical\Subject::class, 'subjectInfo']);
        //科目编辑
        Route::post('/update', [app\admin\controller\medical\Subject::class, 'updateSubject']);
        //科目删除
        Route::get('/get/delete', [app\admin\controller\medical\Subject::class, 'delSubject']);
        //科目添加
        Route::post('/insert', [app\admin\controller\medical\Subject::class, 'addSubject']);
        //医生添加科目列表选择列表
        Route::get('/doctor/list', [app\admin\controller\medical\Subject::class, 'getDoctorSubjectList']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);
    //店铺管理
    Route::group('/shop', function (){
        //模板列表
        Route::get('/get/list', [app\admin\controller\medical\Shop::class, 'getShopList']);
        //健康模块商品列表
        Route::get('/get/healthy/list', [app\admin\controller\medical\Shop::class, 'getHealthyShopList']);
        //添加模板
        Route::post('/add', [app\admin\controller\medical\Shop::class, 'addShop']);
        //删除模板
        Route::get('/del', [app\admin\controller\medical\Shop::class, 'delShop']);
        //修改模板
        Route::post('/update', [app\admin\controller\medical\Shop::class, 'updateShop']);
        //模板详情
        Route::get('/info', [app\admin\controller\medical\Shop::class, 'infoShop']);
        //修改状态
        Route::get('/show', [app\admin\controller\medical\Shop::class, 'showShop']);
        //根据分类id查询店铺列表
        Route::get('/category/list', [app\admin\controller\medical\Shop::class, 'getCategoryShop']);
        //店铺列表子集接口
        Route::get('/categorys/list', [app\admin\controller\medical\Shop::class, 'getCategorysShop']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);
    //店铺分类
    Route::group('/shop_category', function (){
        //分类列表
        Route::get('/get/list', [app\admin\controller\medical\ShopCategory::class, 'getShopCategoryList']);
        //添加分类
        Route::post('/add', [app\admin\controller\medical\ShopCategory::class, 'addShopCategory']);
        //删除分类
        Route::get('/del', [app\admin\controller\medical\ShopCategory::class, 'delShopCategory']);
        //修改分类
        Route::post('/update', [app\admin\controller\medical\ShopCategory::class, 'updateShopCategory']);
        //分类详情
        Route::get('/info', [app\admin\controller\medical\ShopCategory::class, 'infoShopCategory']);
        //根据店铺查询分类列表
        Route::get('/shop/list', [app\admin\controller\medical\ShopCategory::class, 'getCategoryList']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);
    //文章模块
    Route::group('/news', function (){
        //文章分类列表
        Route::get('/category/get/list', [app\admin\controller\medical\NewsCategory::class, 'getCategoryList']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);
    //会员
    Route::group('/user', function (){
        //会员列表
        Route::get('/get/list', [app\admin\controller\user\Users::class, 'getUserList']);
        //会员详情
        Route::get('/get/info', [app\admin\controller\user\Users::class, 'getUserInfo']);
        //会员添加
        Route::post('/insert', [app\admin\controller\user\Users::class, 'userInsert']);
        //会员审核
        Route::post('/auth', [app\admin\controller\user\Users::class, 'authUser']);
        //会员体检报告
        Route::get('/get/report', [app\admin\controller\user\Users::class, 'getUserReport']);
        //获取会员设备列表
        Route::get('/get/equipment', [app\admin\controller\user\Users::class, 'getUserEquipment']);
        //获取会员设备详情
        Route::get('/equipment/info', [app\admin\controller\user\Users::class, 'userEquipmentInfo']);
        //获取设备日志列表
        Route::get('/get/log/list', [app\admin\controller\user\Users::class, 'userEquipmentLog']);
        //获取设备日志详情
        Route::get('/log/info', [app\admin\controller\user\Users::class, 'equipmentLogInfo']);
        //赠送权益包
        Route::post('/give/package', [app\admin\controller\user\Users::class, 'givePackage']);

        //获取会员亲属列表
        Route::get('/relatives/list', [app\admin\controller\user\Users::class, 'relativesToList']);
        //获取会员下的亲属列表
        Route::get('/relatives/user', [app\admin\controller\user\Users::class, 'relativesList']);
        //删除会员亲属关系
        Route::get('/relatives/del', [app\admin\controller\user\Users::class, 'relativesDel']);
        //获取会员下的智能产品设备
        Route::get('/equipment/list', [app\admin\controller\user\Users::class, 'equipmentList']);
        //添加会员智能产品设备
        Route::post('/equipment/insert', [app\admin\controller\user\Users::class, 'userEquipmentInsert']);
        //删除会员智能产品设备
        Route::get('/equipment/del', [app\admin\controller\user\Users::class, 'userEquipmentDelete']);
        //会员固定资产列表
        Route::get('/property/list', [app\admin\controller\user\Users::class, 'propertyList']);
        //会员导入功能
        Route::get('/info/import', [app\admin\controller\user\Users::class, 'userExcelImport']);
        //添加医生医嘱
        Route::post('/doctor/insert', [app\admin\controller\user\Users::class, 'userDoctorLog']);
        //医生医嘱列表
        Route::get('/doctor/list', [app\admin\controller\user\Users::class, 'userDoctorList']);
        //删除医生医嘱
        Route::get('/doctor/del', [app\admin\controller\user\Users::class, 'userDoctorDel']);
        //修改会员健康基础数据
        Route::post('/healthy/update', [app\admin\controller\user\Users::class, 'userHealthyDataUpdate']);
        //会员健康基础数据详情
        Route::get('/healthy/info', [app\admin\controller\user\Users::class, 'userHealthyData']);
        //删除会员健康基础数据
        Route::get('/healthy/del', [app\admin\controller\user\Users::class, 'userHealthyDataDel']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);
    //医疗模块
    Route::group('/doctor', function (){
        //医生列表
        Route::get('/get/list', [app\admin\controller\medical\Doctor::class, 'getDoctorList']);
        //添加医生
        Route::post('/create/doctor', [app\admin\controller\medical\Doctor::class, 'addDoctor']);
        //医生编辑
        Route::post('/update/doctor', [app\admin\controller\medical\Doctor::class, 'updateDoctor']);
        //删除医生
        Route::post('/delete', [app\admin\controller\medical\Doctor::class, 'deleteDoctor']);
        //医生详情
        Route::get('/get/info', [app\admin\controller\medical\Doctor::class, 'getDoctorInfo']);
        //医生每天可预约人数
        Route::post('/set/appointment', [app\admin\controller\medical\Doctor::class, 'setAppointment']);
        //医生每天可预约人数信息
        Route::get('/appointment/info', [app\admin\controller\medical\Doctor::class, 'getAppointment']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //分类
    Route::group('/categorys', function (){
        //分类列表
        Route::get('/get/list', [app\admin\controller\category\Category::class, 'getCategoryList']);
        //分类详情
        Route::get('/get/info', [app\admin\controller\category\Category::class, 'categoryInfo']);
        //分类编辑
        Route::post('/update', [app\admin\controller\category\Category::class, 'updateCategory']);
        //分类删除
        Route::get('/get/delete', [app\admin\controller\category\Category::class, 'delCategory']);
        //分类添加
        Route::post('/insert', [app\admin\controller\category\Category::class, 'addCategory']);
        //修改分类状态
        Route::get('/get/status', [app\admin\controller\category\Category::class, 'updateStatus']);
        //获取全部分类
        Route::get('/get/lower', [app\admin\controller\category\Category::class, 'getLower']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //公告模块
    Route::group('/notice', function (){
        //公告列表
        Route::get('/get/list', [app\admin\controller\notice\Notice::class, 'getNoticeList']);
        //公告详情
        Route::get('/get/info', [app\admin\controller\notice\Notice::class, 'noticeInfo']);
        //公告编辑
        Route::post('/update', [app\admin\controller\notice\Notice::class, 'updateNotice']);
        //公告删除
        Route::get('/get/delete', [app\admin\controller\notice\Notice::class, 'delNotice']);
        //公告添加
        Route::post('/insert', [app\admin\controller\notice\Notice::class, 'addNotice']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-健康超市
    Route::group('/life', function (){
        //商品列表
        Route::get('/get/list', [app\admin\controller\life\Goods::class, 'getGoodsList']);
        //商品详情
        Route::get('/get/info', [app\admin\controller\life\Goods::class, 'goodsInfo']);
        //商品编辑
        Route::post('/update', [app\admin\controller\life\Goods::class, 'updateGoods']);
        //商品删除
        Route::get('/get/delete', [app\admin\controller\life\Goods::class, 'delGoods']);
        //商品添加
        Route::post('/insert', [app\admin\controller\life\Goods::class, 'addGoods']);
        //修改商品状态
        Route::get('/get/status', [app\admin\controller\life\Goods::class, 'updateStatus']);
        //订单列表
        Route::get('/order/list', [app\admin\controller\life\GoodsOrder::class, 'getOrderList']);
        //订单详情
        Route::get('/order/info', [app\admin\controller\life\GoodsOrder::class, 'orderInfo']);
        //修改支付状态
        Route::post('/order/paystatus', [app\admin\controller\life\GoodsOrder::class, 'updatePayStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-万悦影院
    Route::group('/cinema', function (){
        //影片列表
        Route::get('/get/list', [app\admin\controller\life\Cinema::class, 'getCinemaList']);
        //影片详情
        Route::get('/get/info', [app\admin\controller\life\Cinema::class, 'cinemaInfo']);
        //影片编辑
        Route::post('/update', [app\admin\controller\life\Cinema::class, 'updateCinema']);
        //影片删除
        Route::get('/get/delete', [app\admin\controller\life\Cinema::class, 'delCinema']);
        //影片添加
        Route::post('/insert', [app\admin\controller\life\Cinema::class, 'addCinema']);
        //修改影片状态
        Route::get('/get/status', [app\admin\controller\life\Cinema::class, 'updateStatus']);
        //订单列表
        Route::get('/order/list', [app\admin\controller\life\CinemaOrder::class, 'getOrderList']);
        //订单详情
        Route::get('/order/info', [app\admin\controller\life\CinemaOrder::class, 'orderInfo']);
        //订单支付状态
        Route::post('/order/paystatus', [app\admin\controller\life\CinemaOrder::class, 'updatePayStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-影片类型
    Route::group('/mold', function (){
        //影片列表
        Route::get('/get/list', [app\admin\controller\life\CinemaMold::class, 'getMoldList']);
        //影片详情
        Route::get('/get/info', [app\admin\controller\life\CinemaMold::class, 'moldInfo']);
        //所有类型
        Route::get('/get/all', [app\admin\controller\life\CinemaMold::class, 'getMoldAll']);
        //影片编辑
        Route::post('/update', [app\admin\controller\life\CinemaMold::class, 'updateMold']);
        //影片删除
        Route::get('/get/delete', [app\admin\controller\life\CinemaMold::class, 'delMold']);
        //影片添加
        Route::post('/insert', [app\admin\controller\life\CinemaMold::class, 'addMold']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-影片演职
    Route::group('/performers', function (){
        //演职列表
        Route::get('/get/list', [app\admin\controller\life\CinemaPerformers::class, 'getPerformersList']);
        //演职详情
        Route::get('/get/info', [app\admin\controller\life\CinemaPerformers::class, 'performersInfo']);
        //所有演职
        Route::get('/get/all', [app\admin\controller\life\CinemaPerformers::class, 'getPerformersAll']);
        //演职编辑
        Route::post('/update', [app\admin\controller\life\CinemaPerformers::class, 'updatePerformers']);
        //演职删除
        Route::get('/get/delete', [app\admin\controller\life\CinemaPerformers::class, 'delPerformers']);
        //演职添加
        Route::post('/insert', [app\admin\controller\life\CinemaPerformers::class, 'addPerformers']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-影片排期
    Route::group('/scheduling', function (){
        //排期列表
        Route::get('/get/list', [app\admin\controller\life\CinemaScheduling::class, 'getSchedulingList']);
        //排期详情
        Route::get('/get/info', [app\admin\controller\life\CinemaScheduling::class, 'schedulingInfo']);
        //排期编辑
        Route::post('/update', [app\admin\controller\life\CinemaScheduling::class, 'updateScheduling']);
        //排期删除
        Route::get('/get/delete', [app\admin\controller\life\CinemaScheduling::class, 'delScheduling']);
        //排期添加
        Route::post('/insert', [app\admin\controller\life\CinemaScheduling::class, 'addScheduling']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);


    //悦活-生态农场-一亩心田
    Route::group('/land', function (){
        //地块列表
        Route::get('/get/list', [app\admin\controller\life\FarmLand::class, 'getLandList']);
        //地块详情
        Route::get('/get/info', [app\admin\controller\life\FarmLand::class, 'landInfo']);
        //地块编辑
        Route::post('/update', [app\admin\controller\life\FarmLand::class, 'updateLand']);
        //地块删除
        Route::get('/get/delete', [app\admin\controller\life\FarmLand::class, 'delLand']);
        //地块添加
        Route::post('/insert', [app\admin\controller\life\FarmLand::class, 'addLand']);
        //订单列表
        Route::get('/order/list', [app\admin\controller\life\FarmLandOrder::class, 'getOrderList']);
        //订单详情
        Route::get('/order/info', [app\admin\controller\life\FarmLandOrder::class, 'getOrderInfo']);
        //支付状态
        Route::post('/order/paystatus', [app\admin\controller\life\FarmLandOrder::class, 'updatePayStatus']);
        })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-套餐
    Route::group('/lpackage', function (){
        //套餐列表
        Route::get('/get/list', [app\admin\controller\life\Package::class, 'getPackageList']);
        //套餐详情
        Route::get('/get/info', [app\admin\controller\life\Package::class, 'packageInfo']);
        //套餐编辑
        Route::post('/update', [app\admin\controller\life\Package::class, 'updatePackage']);
        //套餐删除
        Route::get('/get/delete', [app\admin\controller\life\Package::class, 'delPackage']);
        //套餐添加
        Route::post('/insert', [app\admin\controller\life\Package::class, 'addPackage']);
        })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-套餐项目
    Route::group('/lpackagegoods', function (){
        //套餐项目列表
        Route::get('/get/list', [app\admin\controller\life\PackageGoods::class, 'getPackageGoodsList']);
        //套餐项目详情
        Route::get('/get/info', [app\admin\controller\life\PackageGoods::class, 'packageGoodsInfo']);
        //套餐项目编辑
        Route::post('/update', [app\admin\controller\life\PackageGoods::class, 'updatePackageGoods']);
        //套餐项目删除
        Route::get('/get/delete', [app\admin\controller\life\PackageGoods::class, 'delPackageGoods']);
        //套餐项目添加
        Route::post('/insert', [app\admin\controller\life\PackageGoods::class, 'addPackageGoods']);
        })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-套餐订单
    Route::group('/lpackageorder', function (){
        //影片列表
        Route::get('/order/list', [app\admin\controller\life\PackageOrder::class, 'getOrderList']);
        //订单详情
        Route::get('/order/info', [app\admin\controller\life\PackageOrder::class, 'getOrderInfo']);
        //修改订单完成状态
        Route::get('/order/finish', [app\admin\controller\life\PackageOrder::class, 'updateFinish']);
        //修改订单支付状态
        Route::post('/order/paystatus', [app\admin\controller\life\PackageOrder::class, 'updatePayStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-万悦书院订单
    Route::group('/academy', function (){
        //订单列表
        Route::get('/order/list', [app\admin\controller\life\BookCourseOrder::class, 'getOrderList']);
        //订单详情
        Route::get('/order/info', [app\admin\controller\life\BookCourseOrder::class, 'getOrderInfo']);
        //删除订单
        Route::get('/order/del', [app\admin\controller\life\BookCourseOrder::class, 'delOrder']);
        //删除订单
        Route::post('/order/paystatus', [app\admin\controller\life\BookCourseOrder::class, 'updatePayStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);


    //悦活-书院
    Route::group('/book', function (){
        //课程列表
        Route::get('/get/list', [app\admin\controller\life\Book::class, 'getBookList']);
        //课程详情
        Route::get('/get/info', [app\admin\controller\life\Book::class, 'bookInfo']);
        //课程编辑
        Route::post('/update', [app\admin\controller\life\Book::class, 'updateBook']);
        //课程删除
        Route::get('/get/delete', [app\admin\controller\life\Book::class, 'delBook']);
        //课程添加
        Route::post('/insert', [app\admin\controller\life\Book::class, 'addBook']);
        //修改课程状态
        Route::get('/get/status', [app\admin\controller\life\Book::class, 'updateStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-书院课程目录
    Route::group('/course', function (){
        //课程目录列表
        Route::get('/get/list', [app\admin\controller\life\BookCourse::class, 'getBookCourseList']);
        //课程目录详情
        Route::get('/get/info', [app\admin\controller\life\BookCourse::class, 'courseInfo']);
        //课程目录编辑
        Route::post('/update', [app\admin\controller\life\BookCourse::class, 'updateBookCourse']);
        //课程目录删除
        Route::get('/get/delete', [app\admin\controller\life\BookCourse::class, 'delBookCourse']);
        //课程目录添加
        Route::post('/insert', [app\admin\controller\life\BookCourse::class, 'addBookCourse']);
        //修改课程目录状态
        Route::get('/get/status', [app\admin\controller\life\BookCourse::class, 'updateStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-书院课程排期
    Route::group('/books', function (){
        //排期列表
        Route::get('/get/list', [app\admin\controller\life\BookScheduling::class, 'getBookSchedulingList']);
        //排期详情
        Route::get('/get/info', [app\admin\controller\life\BookScheduling::class, 'schedulingInfo']);
        //排期编辑
        Route::post('/update', [app\admin\controller\life\BookScheduling::class, 'updateBookScheduling']);
        //排期删除
        Route::get('/get/delete', [app\admin\controller\life\BookScheduling::class, 'delBookScheduling']);
        //排期添加
        Route::post('/insert', [app\admin\controller\life\BookScheduling::class, 'addBookScheduling']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-健康美食
    Route::group('/food', function (){
        //健康美食列表
        Route::get('/get/list', [app\admin\controller\life\Food::class, 'getFoodList']);
        //健康美食详情
        Route::get('/get/info', [app\admin\controller\life\Food::class, 'foodInfo']);
        //健康美食编辑
        Route::post('/update', [app\admin\controller\life\Food::class, 'updateFood']);
        //健康美食删除
        Route::get('/get/delete', [app\admin\controller\life\Food::class, 'delFood']);
        //健康美食添加
        Route::post('/insert', [app\admin\controller\life\Food::class, 'addFood']);
        //修改健康美食状态
        Route::get('/get/status', [app\admin\controller\life\Food::class, 'updateStatus']);
        //健康美食单品列表
        Route::get('/type/list', [app\admin\controller\life\Food::class, 'getFoodAll']);
        //健康美食订单列表
        Route::get('/order/list', [app\admin\controller\life\FoodOrder::class, 'getOrderList']);
        //健康美食订单详情
        Route::get('/order/info', [app\admin\controller\life\FoodOrder::class, 'orderInfo']);
        //支付状态
        Route::post('/order/paystatus', [app\admin\controller\life\FoodOrder::class, 'updatePayStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //悦活-农庄美食/采摘游玩
    Route::group('/play', function (){
        //农庄美食/采摘游玩列表
        Route::get('/get/list', [app\admin\controller\life\Play::class, 'getPlayList']);
        //农庄美食/采摘游玩详情
        Route::get('/get/info', [app\admin\controller\life\Play::class, 'playInfo']);
        //农庄美食/采摘游玩编辑
        Route::post('/update', [app\admin\controller\life\Play::class, 'updatePlay']);
        //农庄美食/采摘游玩删除
        Route::get('/get/delete', [app\admin\controller\life\Play::class, 'delPlay']);
        //农庄美食/采摘游玩添加
        Route::post('/insert', [app\admin\controller\life\Play::class, 'addPlay']);
        //修改农庄美食/采摘游玩状态
        Route::get('/get/status', [app\admin\controller\life\Play::class, 'updateStatus']);
        //农庄美食/采摘游玩单品列表
        Route::get('/type/list', [app\admin\controller\life\Play::class, 'getPlayAll']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //教师模块
    Route::group('/teacher', function (){
        //教师列表
        Route::get('/get/list', [app\admin\controller\life\Teacher::class, 'getTeacherList']);
        //教师详情
        Route::get('/get/info', [app\admin\controller\life\Teacher::class, 'teacherInfo']);
        //教师编辑
        Route::post('/update', [app\admin\controller\life\Teacher::class, 'updateTeacher']);
        //教师删除
        Route::get('/get/delete', [app\admin\controller\life\Teacher::class, 'delTeacher']);
        //教师添加
        Route::post('/insert', [app\admin\controller\life\Teacher::class, 'addTeacher']);
        //获取所有教师
        Route::get('/get/all', [app\admin\controller\life\Teacher::class, 'getTeacherAll']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);
    //管家
    Route::group('/housekeeper', function (){
        //管家列表
        Route::get('/get/list', [app\admin\controller\housekeeper\Housekeeper::class, 'getHousekeeperList']);
        //添加管家
        Route::post('/add', [app\admin\controller\housekeeper\Housekeeper::class, 'addHousekeeper']);
        //编辑管家
        Route::post('/update', [app\admin\controller\housekeeper\Housekeeper::class, 'updateHousekeeper']);
        //管家详情
        Route::get('/get/info', [app\admin\controller\housekeeper\Housekeeper::class, 'getInfo']);
        //删除管家
        Route::post('/delete', [app\admin\controller\housekeeper\Housekeeper::class, 'delHousekeeper']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //居家模块
    Route::group('/home', function (){
        //项目
        //项目列表
        Route::get('/goods/list', [app\admin\controller\home\HomeGoods::class, 'getGoodsList']);
        //项目详情
        Route::get('/goods/info', [app\admin\controller\home\HomeGoods::class, 'goodsInfo']);
        //项目编辑
        Route::post('/goods/update', [app\admin\controller\home\HomeGoods::class, 'updateGoods']);
        //项目删除
        Route::get('/goods/delete', [app\admin\controller\home\HomeGoods::class, 'delGoods']);
        //项目添加
        Route::post('/goods/insert', [app\admin\controller\home\HomeGoods::class, 'addGoods']);
        //Banner
        //列表
        Route::get('/banner/list', [app\admin\controller\home\HomeBanner::class, 'getBannerList']);
        //详情
        Route::get('/banner/info', [app\admin\controller\home\HomeBanner::class, 'bannerInfo']);
        //编辑
        Route::post('/banner/update', [app\admin\controller\home\HomeBanner::class, 'updateBanner']);
        //删除
        Route::get('/banner/delete', [app\admin\controller\home\HomeBanner::class, 'delBanner']);
        //添加
        Route::post('/banner/insert', [app\admin\controller\home\HomeBanner::class, 'addBanner']);
        //订单
        //列表
        Route::get('/order/list', [app\admin\controller\home\HomeOrder::class, 'getOrderList']);
        //详情
        Route::get('/order/info', [app\admin\controller\home\HomeOrder::class, 'getOrderInfo']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //养老产品模块
    Route::group('/raise', function (){
        //养老产品列表
        Route::get('/get/list', [app\admin\controller\raise\RaiseOldGoods::class, 'getGoodsList']);
        //养老产品详情
        Route::get('/get/info', [app\admin\controller\raise\RaiseOldGoods::class, 'goodsInfo']);
        //养老产品编辑
        Route::post('/update', [app\admin\controller\raise\RaiseOldGoods::class, 'updateGoods']);
        //养老产品删除
        Route::get('/get/delete', [app\admin\controller\raise\RaiseOldGoods::class, 'delGoods']);
        //养老产品添加
        Route::post('/insert', [app\admin\controller\raise\RaiseOldGoods::class, 'addGoods']);
        //养老产品上下架
        Route::get('/get/status', [app\admin\controller\raise\RaiseOldGoods::class, 'updateStatus']);
        //养老产品订单列表
        Route::get('/order/list', [app\admin\controller\raise\RaiseOldGoodsOrder::class, 'getOrderList']);
        //养老产品订单详情
        Route::get('/order/info', [app\admin\controller\raise\RaiseOldGoodsOrder::class, 'getOrderInfo']);
        //养老产品订单发货
        Route::post('/order/express', [app\admin\controller\raise\RaiseOldGoodsOrder::class, 'updateOrder']);
        //支付状态
        Route::post('/order/paystatus', [app\admin\controller\raise\RaiseOldGoodsOrder::class, 'updatePayStatus']);
    })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //生态农场-绿色蔬菜
    Route::group('/farmgoods', function (){
        //蔬菜列表
        Route::get('/get/list', [app\admin\controller\life\FarmGoods::class, 'getFarmGoodsList']);
        //蔬菜详情
        Route::get('/get/info', [app\admin\controller\life\FarmGoods::class, 'farmGoodsInfo']);
        //蔬菜编辑
        Route::post('/update', [app\admin\controller\life\FarmGoods::class, 'updateFarmGoods']);
        //蔬菜删除
        Route::get('/get/delete', [app\admin\controller\life\FarmGoods::class, 'delFarmGoods']);
        //蔬菜添加
        Route::post('/insert', [app\admin\controller\life\FarmGoods::class, 'addFarmGoods']);
        //订单列表
        Route::get('/order/list', [app\admin\controller\life\FarmOrder::class, 'getOrderList']);
        //订单详情
        Route::get('/order/info', [app\admin\controller\life\FarmOrder::class, 'orderInfo']);
        //发货
        Route::post('/order/delivery', [app\admin\controller\life\FarmOrder::class, 'orderDelivery']);
        //支付状态
        Route::post('/order/paystatus', [app\admin\controller\life\FarmOrder::class, 'updatePayStatus']);
        //修改状态
        Route::get('/get/status', [app\admin\controller\life\FarmGoods::class, 'updateStatus']);
        })->middleware([
            app\admin\middleware\JwtAuthMiddleware::class,
            app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    //健康模块
    Route::group('/healthy', function (){
        //订单列表
        Route::get('/order/list', [app\admin\controller\healthy\HealthyOrder::class, 'getOrderList']);
        //订单详情
        Route::get('/order/info', [app\admin\controller\healthy\HealthyOrder::class, 'getOrderInfo']);
        //支付状态
        Route::post('/order/paystatus', [app\admin\controller\healthy\HealthyOrder::class, 'updatePayStatus']);
        //健康列表
        Route::get('/get/list', [app\admin\controller\healthy\HealthyProduct::class, 'getProductList']);
        //健康详情
        Route::get('/get/info', [app\admin\controller\healthy\HealthyProduct::class, 'productInfo']);
        //健康编辑
        Route::post('/update', [app\admin\controller\healthy\HealthyProduct::class, 'updateProduct']);
        //健康删除
        Route::get('/get/delete', [app\admin\controller\healthy\HealthyProduct::class, 'delProduct']);
        //健康添加
        Route::post('/insert', [app\admin\controller\healthy\HealthyProduct::class, 'addProduct']);
        //健康审核
        Route::post('/auto', [app\admin\controller\healthy\HealthyProduct::class, 'autoProduct']);
        //修改状态
        Route::get('/get/status', [app\admin\controller\healthy\HealthyProduct::class, 'updateStatus']);
        //发货
        Route::post('/order/delivery', [app\admin\controller\healthy\HealthyOrder::class, 'orderDelivery']);
        })->middleware([
        app\admin\middleware\JwtAuthMiddleware::class,
        app\admin\middleware\AdminAuthMiddleware::class,//鉴权权限
    ]);

    Route::options('[{path: .+}]', function (){
       return response('');
    });

});
