from django.urls import path
from django.views.decorators.csrf import csrf_exempt
from .views import CreateOrderView, WechatPayNotifyView, AlipayPayNotifyView, alipay_pay_page, \
    PaymentFailView, PaymentVerifyView, ContinuePayView, DingdanHuoquView, DingdanXiangqingView, JiedanView, \
    ShangpinLeixingView, ShangjiaPaifaView, ShangjiaDingdanHuoquView, ShangjiaJiesuanView, \
    ShangjiaDingdanXiangqingView, ShangjiaChufaShenqingView, ShangjiaTuikuanShenqingView, \
    ShangjiaChexiaoView, DashouDingdanHuoquView, ShangpinLeixingHuoquView, QiangdanView, \
    DashouDingdanHuoquView1, DashouCOSZhengshuView, DashouTijiaoView, DashouDingdanXiangqingView, AdGetDingdanXiangQing, \
    AdTongYiTuiKuanPingTai, AdTongYiTuiKuanShangJia, AdQiangZhiJieDan, AdJuJueTuiKuan,\
     AdGengHuanDaShou,ShangjiaCOSZhengshuView, DashouHuoquLeixingView,AdJuJueJieSuan, AdZhuanYiDaTing, AdQuXiaoZhiDing,DashouXiugaiView,DaiLiQunLiaoXiaoXiView,\
     ShangjiaLianjieLiuYanZhuanFaView, DingdanXiangqingView2, JiedanView2, ZxsjghdsView, \
     ShangjiaFakuanApplyView, ShangjiaFakuaiXiugaiView, ShangjiaShujuTongjiView, LianTongDuiHuaZhunBeiView, \
     LianTongPeiDuiDingDanLieBiaoView, LianTongDingDanZhuangTaiView, LianTongDingDanZhuangTaiPiLiangView, \
     ZhiDingChaxunView, ZhiDingHuiFuView
from jituan.services.fubei_notify import FubeiPayNotifyView
from jituan.views_order_deal import MiniappMyDealStatView


urlpatterns = [
    path('xiadan', CreateOrderView.as_view(), name='下单订单生成接口'),
    path('jixuzhifu', ContinuePayView.as_view(), name='待付款继续支付'),
    #path('pay-notify/', WechatPayNotifyView.as_view(), name='老板下单微信支付回调'),
    path('pay-notify/', csrf_exempt(WechatPayNotifyView.as_view()), name='老板下单微信支付回调'),
    path('alipay-notify/', csrf_exempt(AlipayPayNotifyView.as_view()), name='老板下单支付宝支付回调'),
    path('fubei-notify/', csrf_exempt(FubeiPayNotifyView.as_view()), name='付呗支付回调'),
    path('alipay-pay/', csrf_exempt(alipay_pay_page), name='支付宝H5中转页'),
    path('shibai', PaymentFailView.as_view(), name='老板支付失败接口'),
    path('fucha', PaymentVerifyView.as_view(), name='老板支付成功复查接口'),
    path('dingdanhuoqu', DingdanHuoquView.as_view(), name='老板订单获取'),
    path('dingdanxiangqing', DingdanXiangqingView.as_view(), name='老板订单详情获取'),
    path('jiedan', JiedanView.as_view(), name='老板结单'),
    path('sjspleixing', ShangpinLeixingView.as_view(), name='派单获取商品类型'),
    path('sjpaifa', ShangjiaPaifaView.as_view(), name='商家发单'),
    path('sjdingdanhq', ShangjiaDingdanHuoquView.as_view(), name='商家订单获取'),
    path('sjshujutj', ShangjiaShujuTongjiView.as_view(), name='商家经营统计'),
    path('sjddxq', ShangjiaDingdanXiangqingView.as_view(), name='商家订单详情获取'),
    path('sjjiesuan', ShangjiaJiesuanView.as_view(), name='商家结单'),
    path('sjchexiao', ShangjiaChexiaoView.as_view(), name='商家撤销订单'),
    path('sjtkshenqing', ShangjiaTuikuanShenqingView.as_view(), name='商家退款申请'),
    path('sjchufa', ShangjiaChufaShenqingView.as_view(), name='商家处罚打手申请'),
    path('ddlxhq', ShangpinLeixingHuoquView.as_view(), name='打手抢单页商品类型获取'),
    path('dshqdingdan', DashouDingdanHuoquView1.as_view(), name='打手订单列表页面获取'),
    path('wo-de-deal-stat', MiniappMyDealStatView.as_view(), name='小程序我的结算率罚款率'),

    # 获取订单列表
    path('ddhq', DashouDingdanHuoquView.as_view(), name='打手抢单页获取订单'),
    path('zdcx', ZhiDingChaxunView.as_view(), name='查询被指定订单'),
    path('zdhf', ZhiDingHuiFuView.as_view(), name='指定订单打手响应'),
    path('qiangdan', QiangdanView.as_view(), name='打手抢单'),
    path('dsscpz', DashouCOSZhengshuView.as_view(), name='打手上传图片OSS参数获取接口'),
    # 打手提交订单完成接口
    path('dstijiao', DashouTijiaoView.as_view(), name='打手订单提交'),
    # 打手订单详情获取接口
    path('dsddxq', DashouDingdanXiangqingView.as_view(), name='打手获取订单详情'),
    path('adddxq', AdGetDingdanXiangQing.as_view(), name='管理员获取订单详情页面具体信息'),
    path('adddpttk', AdTongYiTuiKuanPingTai.as_view(), name='同意平台订单退款'),

    # 商家订单退款接口（之前写的）
    path('adddsjtk', AdTongYiTuiKuanShangJia.as_view(), name='同意商家退款'),

    # 强制结单接口
    #path('adddqzjd', AdQiangZhiJieDan.as_view(), name='强制结单'),

    # 拒绝退款接口
    path('adddjj', AdJuJueTuiKuan.as_view(), name='拒绝退款'),

    # 更换打手接口
    path('adddgh', AdGengHuanDaShou.as_view(), name='管理更换打手'),
    path('sjscpz', ShangjiaCOSZhengshuView.as_view(), name='商家上传证据图片获取密钥'),
    path('dsqdhqddlx', DashouHuoquLeixingView.as_view(), name='打手抢单页面获取订单类型'),



    path('adddjjjs', AdJuJueJieSuan.as_view(), name='管理员拒绝给打手钱'),
    #path('adddzydt', AdZhuanYiDaTing.as_view(), name='订单转移大厅'),
    path('adddqxzd', AdQuXiaoZhiDing.as_view(), name='取消指定'),



    path('dsxiugaidd', DashouXiugaiView.as_view(), name='打手修改订单详情'),

    path('kptxxfs', DaiLiQunLiaoXiaoXiView.as_view(), name='前端聊天转发'),  # 群聊消息代理发送
    path('ltdhzb', LianTongDuiHuaZhunBeiView.as_view(), name='订单群聊准备'),
    path('ltpddd', LianTongPeiDuiDingDanLieBiaoView.as_view(), name='配对订单列表'),
    path('ltddzt', LianTongDingDanZhuangTaiView.as_view(), name='聊天订单状态'),
    path('ltddztpl', LianTongDingDanZhuangTaiPiLiangView.as_view(), name='聊天订单状态批量'),
    path('sjljlbxxzf',  ShangjiaLianjieLiuYanZhuanFaView.as_view(), name='商家链接老板聊天转发'),

    path('dingdanxiangqing2', DingdanXiangqingView2.as_view(), name='老板获取订单详情新街口'),
    path('jiedan2', JiedanView2.as_view(), name='老板结单新街口'),
    path('zxsjghds', ZxsjghdsView.as_view(), name='商家更换打手'),  # 商家更换打手
    path('sjfksq', ShangjiaFakuanApplyView.as_view(), name='商家罚款'),
    path('sjfkxgycx', ShangjiaFakuaiXiugaiView.as_view(), name='商家罚款和退款修改'),

    

]