from django.urls import path
from django.views.decorators.csrf import csrf_exempt
from .views import CreateOrderView, WechatPayNotifyView, \
    PaymentFailView, PaymentVerifyView, 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, \
    PartnerNotifyClaimView, PartnerSyncOrderView, PartnerCheckClaimView, PartnerRefundNotifyView, DashouXiugaiView, \
    DaiLiQunLiaoXiaoXiView, VirtualCreateOrderView, VirtualPayNotifyView, VirtualPaymentVerifyView, \
    VirtualPaymentFailView, ShangjiaLianjieLiuYanZhuanFaView, DingdanXiangqingView2, JiedanView2, ZxsjghdsView, \
    ShangjiaFakuanApplyView, ShangjiaFakuaiXiugaiView

urlpatterns = [
    path('xiadan', CreateOrderView.as_view(), name='下单订单生成接口'),
    #path('pay-notify/', WechatPayNotifyView.as_view(), name='老板下单微信支付回调'),
    path('pay-notify/', csrf_exempt(WechatPayNotifyView.as_view()), name='老板下单微信支付回调'),
    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('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('ddhq', DashouDingdanHuoquView.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('partner_sync_order', csrf_exempt(PartnerSyncOrderView.as_view()), name='东道主派单接口'),
    path('partner_check_claim', csrf_exempt(PartnerCheckClaimView.as_view()), name='对方抢单检查接口'),


    path('partner_notify_claim', csrf_exempt(PartnerNotifyClaimView.as_view()), name='东道主订单被抢通知接口'),
    path('partner_refund_notify', csrf_exempt(PartnerRefundNotifyView.as_view()), name='接受东道主退款通知'),
    path('dsxiugaidd', DashouXiugaiView.as_view(), name='打手修改订单详情'),

    path('kptxxfs', DaiLiQunLiaoXiaoXiView.as_view(), name='前端聊天转发'),  # 群聊消息代理发送

    path('virtual_xiadan', VirtualCreateOrderView.as_view(),name='虚拟支付下单'),
    path('virtual_notify', VirtualPayNotifyView.as_view(),name='虚拟支付下单回调'),
    path('virtual_fucha', VirtualPaymentVerifyView.as_view(),name='虚拟支付下单成功复查'),
    path('shibai', VirtualPaymentFailView.as_view(),name='虚拟支付下单失败'),  # 或复用原 PaymentFailView

   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='商家罚款和退款修改'),




]