<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;


Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});


Route::get('hello/:name', 'index/hello');
Route::get('login', 'Login/index');
Route::post('login_check', 'Login/check');
Route::any('admin_list', 'Admin/index');
Route::get('logout', 'Login/out');
Route::resource('index', 'Index');
Route::resource('test', 'Test');
Route::post('test/save', 'test/save');
Route::post('test/AdmenAmont', 'test/AdmenAmont');
Route::post('user/save', 'User/save');
Route::post('admin/save', 'Admin/save');
Route::post('StationPrice', 'user/StationPrice');
Route::post('StationPriceUpdate', 'user/StationPriceUpdate');
Route::post('OrderQuery', 'ChargeOrder/OrderQuery');
Route::resource('admin', 'Admin');
Route::resource('user', 'User');
Route::resource('station', 'ChargeStation');

//把小程序接口全放里面
Route::group(function () {
    Route::post('Collect', 'UserCollect/Collect');
    Route::post('TheLastFive', 'ChargeStation/The_Last_Five');
    Route::post('SearchStation', 'ChargeStation/SearchStation');
    Route::post('WxGetArea', 'user/WxGetArea');
    Route::post('InnerChargeStation', 'ChargeStation/InnerChargeStation');
    Route::post('MyCollect', 'UserCollect/MyCollect');
    Route::post('UserInfo', 'user/UserInfo');
    Route::post('UserEdit', 'user/UserEdit');
    Route::post('WechatPay', 'WechatPay/config');
    Route::post('RechargeRecord', 'ChargeOrder/RechargeRecord');
    Route::post('UserBalance', 'User/UserBalance');
    Route::post('GennerateOrder', 'ChargeOrder/GennerateOrder');
    Route::post('OrderDetail', 'ChargeOrder/OrderDetail');
    Route::post('EndOrder', 'ChargeOrder/EndOrder');

    Route::post('OrderNum', 'ChargeOrder/OrderNum');
    Route::post('StationFee', 'ChargeOrder/StationFee');
    Route::post('QueryPayStatus', 'ChargeOrder/QueryPayStatus');
    Route::post('QRCode', 'ChargeOrder/QRCode');
//    Route::post('UserRefund', 'user/UserRefund');
    Route::post('GetDiscounts', 'ChargeStation/GetDiscounts');
    Route::post('EventList', 'Event/EventList');
    Route::post('EventDetail', 'Event/EventDetail');
    Route::post('NavMessage', 'Navigation/NavMessage');
    Route::post('UserVip', 'UserGroup/UserVip');
    Route::post('GetLastStation', 'Navigation/GetLastStation');
    Route::post('getWxPhone', 'WxGetPhone/getWxPhone');
    Route::post('UserReimburse', 'UserRefund/UserReimburse');
    Route::post('TKRecord', 'UserRefund/TKRecord');
})->middleware(\app\middleware\WxAppCheck::class);//Token验证中间件

Route::post('OrderList', 'ChargeOrder/OrderList');
Route::post('AmountExcel', 'Order.CountExcel/AmountExcel');
Route::post('Bus/ChangeSpecialUserBalance', 'Bus.AlterBalance/ChangeSpecialUserBalance');
Route::post('Bus/TimeTask', 'Bus.AlterBalance/ChangeSpecialUserBalance');
Route::post('Order/AdmenAmont', 'Order.TimeTask/AdmenAmont');
Route::post('Bus/SearchMessage', 'Bus.SearchMessage/BusOrder');
Route::post('Bus/BusOrderPark', 'Bus.SearchMessage/BusOrderPark');
Route::post('Bus/ParkNo', 'Bus.SearchMessage/ParkNo');
Route::post('Bus/DataStatistics', 'Bus.BusBill/DataStatistics');
Route::post('Bus/ShowVinLicense', 'Bus.VinBindLicense/ShowVinLicense');
Route::post('Bus/AddVinLicense', 'Bus.VinBindLicense/AddVinLicense');
Route::post('Bus/UpdateVinLicense', 'Bus.VinBindLicense/UpdateVinLicense');
Route::post('Bus/DeleteVinLicense', 'Bus.VinBindLicense/DeleteVinLicense');
Route::post('RechargeMessage', 'Order.RechargeRecord/RechargeRecord');
Route::post('RefundMessage', 'Order.RefundRecord/RefundRecord');
Route::post('sharenotify', 'WechatPay/sharenotify');
Route::post('FuzzyOrder', 'ChargeOrder/FuzzyOrder');
Route::post('RechargeAll', 'ChargeOrder/RechargeAll');
Route::post('FindRechargeOrder', 'Refund/FindRechargeOrder');
Route::post('UpdateDiscount', 'user/UpdateDiscount');
Route::post('RechargeAllExport', 'ChargeOrder/RechargeAllExport');
Route::post('OrderExport', 'ChargeOrder/OrderExport');
Route::post('ShowEvent', 'Event/ShowEvent');
Route::post('AddEvent', 'Event/AddEvent');
Route::post('EditEvent', 'Event/EditEvent');
Route::post('DeleteEvent', 'Event/DeleteEvent');
Route::post('Upload', 'Event/upload');
Route::post('EventList2', 'Event/EventList');
//Route::post('EventDetail', 'Event/EventDetail');
Route::post('MonitorList', 'Monitor/MonitorList');
Route::post('MonitorId', 'Monitor/MonitorId');
Route::post('FindEvent', 'Event/FindEvent');
Route::post('UpdatePermission', 'admin/UpdatePermission');

//VIP用户分组接口
Route::post('UserList', 'UserGroup/UserList');
Route::post('EnterpriseGroupAdd', 'UserGroup/EnterpriseGroupAdd');
Route::post('NormalSearch', 'UserGroup/NormalSearch');
Route::post('NormalToEnterprise', 'UserGroup/NormalToEnterprise');
Route::post('GetGroup', 'UserGroup/GetGroup');
Route::post('DeleteEnterpriseUser', 'UserGroup/DeleteEnterpriseUser');
Route::post('DeleteEnterpriseGroup', 'UserGroup/DeleteEnterpriseGroup');
Route::post('PhoneSearch', 'UserGroup/PhoneSearch');
Route::post('EnterpriserUserEdit', 'UserGroup/EnterpriserUserEdit');
Route::post('ShowServiceFee', 'UserGroup/ShowServiceFee');
Route::post('UpdateServiceFee', 'UserGroup/UpdateServiceFee');
Route::post('Electricity', 'UserGroup/Electricity');

//硬件推送接口 需要token验证
Route::post('query_token', 'HardMessage/query_token');
Route::post('notification_stationStatus', 'HardMessage/notification_station');
Route::post('notification_start_charge_result', 'HardMessage/notification_start_charge_result');
Route::post('Get_query_equip_auth', 'HardMessage/Get_query_equip_auth');
Route::post('Get_query_start_charge', 'HardMessage/Get_query_start_charge');
Route::post('notification_equip_charge_status', 'HardMessage/notification_equip_charge_status');
Route::post('notification_stop_charge_result', 'HardMessage/notification_stop_charge_result');
Route::post('notification_charge_order_info', 'HardMessage/notification_charge_order_info');
Route::post('insert_start_charge', 'Bus.PlugCharge/insert_start_charge');
Route::post('ModifyAppointmentTime', 'Bus.PlugCharge/ModifyAppointmentTime');
Route::post('ShowAppointmentTime', 'Bus.PlugCharge/ShowAppointmentTime');
Route::post('RefundQuery', 'UserRefund/RefundQuery');
Route::post('Refund_Total', 'UserRefund/Refund_Total');

Route::post('refund_notify', 'WechatReimburse/refund_notify');







// 新增接口

Route::resource('getEnterpriseList', 'Enterprise');

Route::resource('getEnterpriseUserList', 'EnterpriseUser');

Route::resource('getEnterpriseCarList', 'EnterpriseCar');

Route::get('getChargeOrder','Order.ChargeOrder/charge_order');
Route::get('getRechargeOrder','Order.ChargeOrder/recharge_order');
Route::get('getRefundOrder','Order.ChargeOrder/refund_order');


Route::get('getRoleList','Auth/getRoleList');
Route::get('getMenuList','Auth/getMenuList');
Route::get('getCouponList','Auth/getCouponList');


Route::get('getLogList','Auth/getLogList');
Route::get('getYunYingData','Auth/getYunYingData');
Route::get('getCaiWuData','Auth/getCaiWuData');



// 新增的小程序使用企业路由
Route::post('getEnterpriseInfo', 'User/getEnterpriseInfo');


Route::post('enterpriseConfig', 'WechatPay/EnterpriseConfig');
Route::post('enterpriseChargeNotify', 'WechatPay/enterpriseChargeNotify');

Route::post('enterpriseRechange', 'User/enterpriseRechange');
Route::post('getEnterpriseReangeLog', 'User/getEnterpriseReangeLog');

Route::post('goCharge', 'ChargeOrder/GennerateOrder2');//潜江充电
Route::post('startCharging', 'ChargeOrder/startCharging');//潜江充电---启动充电
Route::post('directlychargenotify', 'WechatPay/directlychargenotify');//即充即退支付回调

Route::post('refund_notify2', 'WechatReimburse/refund_notify2');//即充即退退款
Route::post('OrderList2', 'ChargeOrder/OrderList2');//订单列表
Route::post('EndOrder2', 'ChargeOrder/EndOrder2');//结束订单
Route::post('OrderDetail2', 'ChargeOrder/OrderDetail2');//订单列表


Route::post('getConnectorIDCharge', 'ChargeStation/getConnectorIDCharge');//订单列表
Route::post('getMoneyLog', 'User/getMoneyLog');//用户余额记录


// tld 测试环境
Route::post('testIndex', 'TeldTest/index');//测试环境


