from django.urls import path

from backend.Controller import UserController, ProjectController, BrandController, SupplierController, ParamsController, \
    FormulaController, ImageCategoryController, ImageController, TemplateCategoryController, TemplateController, \
    DocumentCategoryController, DocumentController, ProductController, ProductCategoryController, \
    ProjectCategoryController, CustomerController, AdminRoleController, SourceDataController, UploadController, \
    AuthMenuController, IndexController, MinioController, SMSController, KbmController, OperationController, \
    UserOperationController, MilvusController, WechatController, ExportController, WechatComplaintController, \
    KbmDocumentTypeController, SuperAdminController

urlpatterns = [
    path('', UserController.index, name="index"),
    # 管理用户
    path('user/create', UserController.create, name="create"),
    path('user/current', UserController.currentUser, name="currentUser"),
    path('user/info', UserController.getUserInfo, name="getUserInfo"),
    path('user/login', UserController.login, name="login"),
    path('user/login1', UserController.login1, name="login"),
    path('user/logout', UserController.logout, name="logout"),
    path('user/search', UserController.search, name="search"),
    path('user/update', UserController.update, name="update"),
    path('user/profile', UserController.updateProfile, name="updateProfile"),
    path('user/password', UserController.changePassword, name="changePassword"),
    path('user/delete', UserController.delete, name="delete"),


    #客户
    path('customer/search', CustomerController.Search, name="searchCustomer"),
    path('customer/sync', CustomerController.sync, name="syncCustomer"),
    # 管理员角色
    path('admin/role/create', AdminRoleController.Create, name="AdinRoleControllerCreate"),
    path('admin/role/update', AdminRoleController.Update, name="AdinRoleControllerUpdate"),
    path('admin/role/info', AdminRoleController.Info, name="AdinRoleControllerInfo"),
    path('admin/role/search', AdminRoleController.Search, name="AdinRoleControllerSearch"),
    path('admin/role/delete', AdminRoleController.Delete, name="AdinRoleControllerDelete"),
    path('admin/auth/selectInfo', AdminRoleController.selectInfo, name="selectInfo"),

    # 项目分类
    path('project/category/create', ProjectCategoryController.Create, name="CreateProjectCategory"),
    path('project/category/update', ProjectCategoryController.Update, name="UpdateProjectCategory"),
    path('project/category/info', ProjectCategoryController.Info, name="InfoProjectCategory"),
    path('project/category/search', ProjectCategoryController.Search, name="SearchProjectCategory"),
    path('project/category/delete', ProjectCategoryController.Delete, name="DeleteProjectCategory"),

    # 项目信息
    path('project/create', ProjectController.Create, name="CreateProject"),
    path('project/update', ProjectController.Update, name="UpdateProject"),
    path('project/info', ProjectController.Info, name="infoProject"),
    path('project/search', ProjectController.Search, name="searchProject"),
    path('project/delete', ProjectController.Delete, name="deleteProject"),

    # 品牌管理
    path('brand/create', BrandController.Create, name="createBrand"),
    path('brand/update', BrandController.Update, name="updateBrand"),
    path('brand/info', BrandController.Info, name="infoBrand"),
    path('brand/search', BrandController.Search, name="searchBrand"),
    path('brand/delete', BrandController.Delete, name="deleteBrand"),

    # 供应商
    path('supplier/create', SupplierController.Create, name="createSupplier"),
    path('supplier/update', SupplierController.Update, name="updateSupplier"),
    path('supplier/info', SupplierController.Info, name="infoSupplier"),
    path('supplier/search', SupplierController.Search, name="searchSupplier"),
    path('supplier/delete', SupplierController.Delete, name="deleteSupplier"),

    # 系统参数
    path('params/create', ParamsController.Create, name="createParams"),
    path('params/update', ParamsController.Update, name="updateParams"),
    path('params/info', ParamsController.Info, name="infoParams"),
    path('params/search', ParamsController.Search, name="searchParams"),
    path('params/delete', ParamsController.Delete, name="deleteParams"),

    # 公式管理
    path('formula/create', FormulaController.Create, name="createFormula"),
    path('formula/update', FormulaController.Update, name="updateFormula"),
    path('formula/info', FormulaController.Info, name="infoFormula"),
    path('formula/search', FormulaController.Search, name="searchFormula"),
    path('formula/delete', FormulaController.Delete, name="deleteFormula"),

    # 图片分类
    path('image/category/create', ImageCategoryController.Create, name="createImageCategory"),
    path('image/category/update', ImageCategoryController.Update, name="updateImageCategory"),
    path('image/category/info', ImageCategoryController.Info, name="InfoImageCategory"),
    path('image/category/search', ImageCategoryController.Search, name="searchImageCategory"),
    path('image/category/delete', ImageCategoryController.Delete, name="deleteImageCategory"),

    # 图片管理
    path('image/create', ImageController.Create, name="createImage"),
    path('image/update', ImageController.Update, name="updateImage"),
    path('image/info', ImageController.Info, name="infoImage"),
    path('image/search', ImageController.Search, name="searchImage"),
    path('image/delete', ImageController.Delete, name="deleteImage"),
    # 模板分类
    path('template/category/create', TemplateCategoryController.Create, name="createTemplateCategory"),
    path('template/category/update', TemplateCategoryController.Update, name="updateTemplateCategory"),
    path('template/category/info', TemplateCategoryController.Info, name="infoTemplateCategory"),
    path('template/category/search', TemplateCategoryController.Search, name="searchTemplateCategory"),
    path('template/category/delete', TemplateCategoryController.Delete, name="deleteTemplateCategory"),
    path('template/category/all', TemplateCategoryController.allInfo, name="selectTemplateCategoryAll"),
    path('template/category/allList', TemplateCategoryController.allList, name="allList"),
    path('template/category/treeCategory', TemplateCategoryController.treeCategory, name="treeCategory"),



    # 模板管理
    path('template/create', TemplateController.Create, name="createTemplate"),
    path('template/update', TemplateController.Update, name="updateTemplate"),
    path('template/info', TemplateController.Info, name="infoTemplate"),
    path('template/search', TemplateController.Search, name="searchTemplate"),
    path('template/pageTemplate', TemplateController.pageTemplate, name="pageTemplate"),
    path('template/delete', TemplateController.Delete, name="deleteTemplate"),

    # 文档分类
    path('document/category/create', DocumentCategoryController.Create, name="createDocumentCategory"),
    path('document/category/update', DocumentCategoryController.Update, name="updateDocumentCategory"),
    path('document/category/info', DocumentCategoryController.Info, name="infoDocumentCategory"),
    path('document/category/search', DocumentCategoryController.Search, name="searchDocumentCategory"),
    path('document/category/delete', DocumentCategoryController.Delete, name="deleteDocumentCategory"),
    # 文档管理
    path('document/create', DocumentController.Create, name="createDocument"),
    path('document/update', DocumentController.Update, name="updateDocument"),
    path('document/info', DocumentController.Info, name="infoDocument"),
    path('document/search', DocumentController.Search, name="searchDocument"),
    path('document/delete', DocumentController.Delete, name="deleteDocument"),
    # path('document/export', ExportService.Export, name="exportDocument"),
    # path('document/htmlPDF', ExportController.htmlPDF, name="htmlPDF"),
    # path('document/htmlPDFWord', ExportController.htmlPDFWord, name="htmlPDFWord"),
    # path('document/htmlWord', ExportController.htmlWord, name="htmlWord"),
    path('document/pageDocument', DocumentController.pageDocument, name="pageDocument"),

    # 产品相关
    path('product/create', ProductController.Create, name="createProduct"),
    path('product/update', ProductController.Update, name="updateProduct"),
    path('product/info', ProductController.Info, name="infoProduct"),
    path('product/search', ProductController.Search, name="searchProduct"),
    path('product/delete', ProductController.Delete, name="deleteProduct"),

    # 产品相关
    path('product/category/create', ProductCategoryController.Create, name="createProductCategory"),
    path('product/category/update', ProductCategoryController.Update, name="updateProductCategory"),
    path('product/category/info', ProductCategoryController.Info, name="infoProductCategory"),
    path('product/category/search', ProductCategoryController.Search, name="searchProductCategory"),
    path('product/category/delete', ProductCategoryController.Delete, name="deleteProductCategory"),
    path('product/category/all', ProductCategoryController.All, name="getAllProductCategory"),

    # 产品相关
    path('source/data/create', SourceDataController.Create, name="createSourceData"),
    path('source/data/update', SourceDataController.Update, name="updateSourceData"),
    path('source/data/info', SourceDataController.Info, name="sourceDataInfo"),
    path('source/data/search', SourceDataController.Search, name="searchSourceData"),
    # path('source/data/category/search', SourceDataController.Search, name="source/data/category/search"),

    path('source/data/categories/', SourceDataController.Categories, name='sourcecategory_list'),
    path('source/data/categories/create/', SourceDataController.Catcreat, name='sourcecategory_create'),
    path('source/data/delete', SourceDataController.Delete, name="deleteSourceData"),
    path('source/data/find', SourceDataController.find, name="findSourceData"),
    path('upload/file', UploadController.File, name="uploadFile"),
    path('upload/image', UploadController.Image, name="uploadImage"),
    path('source/data/category/info', SourceDataController.info, name="info"),
    path('source/data/category/update', SourceDataController.updatetype, name="update"),

    #用户菜单
    path('admin/auth/menuList', AuthMenuController.menuList, name="menuList"),
    path('admin/auth/search', AuthMenuController.search, name="search"),
    path('admin/auth/create', AuthMenuController.create, name="create"),
    path('admin/auth/update', AuthMenuController.update, name="update"),
    path('admin/auth/delete', AuthMenuController.delete, name="create"),
    path('admin/auth/info', AuthMenuController.info, name="info"),
    path('admin/auth/listpage', AuthMenuController.listpage, name="listpage"),

    #模块操作
    path('permissions/selectPermissions', OperationController.selectOperation, name="selectOperation"),



    #用户模块权限
    path('user/selectUserOperation', UserOperationController.selectUserOperation, name="selectUserOperation"),





    #首页
    path('index/statistics', IndexController.statistics, name="statistics"),
    path('SMS/tailPhone', SMSController.tailPhone, name="tailPhone"),
    path('SMS/codeCheckout', SMSController.codeCheckout, name="codeCheckout"),
    path('SMS/updatePassword', SMSController.updatePassword, name="updatePassword"),
    path('SMS/getTemplates', SMSController.getTemplates, name="getTemplates"),
    path('SMS/getSMScount', SMSController.getSMScount, name="getSMScount"),

    # #Minio接口
    path('minio/post', MinioController.post, name="post"),
    path('minio/nameGetUrl', MinioController.nameGetUrl, name="nameGetUrl"),
    path('minio/deleteFile', MinioController.deleteFile, name="deleteFile"),
    path('minio/listBuckets', MinioController.listBuckets, name="listBuckets"),
    path('minio/createBucket', MinioController.createBucket, name="createBucket"),
    path('minio/getBucketContents', MinioController.getBucketContents, name="getBucketContents"),
    path('minio/renameFile', MinioController.renameFile, name="renameFile"),
    #物理删除bucket
    path('minio/deleteBucket', MinioController.deleteBucket, name="deleteBucket"),
    path('minio/readPdfSlice', MinioController.readPdfSlice, name="readPdfSlice"),

    #知识库接口
    path('kbm/selectBucketInfo', KbmController.selectBucketInfo, name="selectBucketInfo"),
    path('kbm/getFileInfo', KbmController.getFileInfo, name="getFileInfo"),
    path('kbm/updateName', KbmController.updateName, name="updateName"),
    path('kbm/deleteDocument', KbmController.deleteDocument, name="deleteDocument"),
    path('kbm/getUrl', KbmController.getUrl, name="getUrl"),
    path('kbm/analysis', KbmController.analysis, name="analysis"),
    path('kbm/searchTaskInfo', KbmController.searchTaskInfo, name="selectTaskInfo"),
    path('kbm/deleteBucket', KbmController.deleteBucket, name="deleteBucket"),
    path('kbm/getRunStatus', KbmController.getRunStatus, name="getRunStatus"),
    path('kbm/batchAnalysis', KbmController.batchAnalysis, name="batchAnalysis"),
    path('kbm/getSuffixName', KbmController.getSuffixName, name="getSuffixName"),
    path('kbm/batchMove', KbmController.batchMove, name="batchMove"),
    path('kbm/updateKbm', KbmController.updateKbm, name="updateKbm"),

    # 微信接口
    path('wechat/insertInfo', WechatController.insertInfo, name="insertInfo"),
    path('wechat/getInfoList', WechatController.getInfoList, name="getInfoList"),
    path('wechat/updateUserInfo', WechatController.updateUserInfo, name="updateUserInfo"),
    path('wechat/toExamine', WechatController.toExamine, name="toExamine"),
    path('wechat/deleteUserInfo', WechatController.deleteUserInfo, name="deleteUserInfo"),
    path('wechat/getAccessToken', WechatController.get_access_token, name="get_access_token"),
    path('wechat/wechatLogin', WechatController.wechatLogin, name="wechatLogin"),
    path('wechat/getUserPhoneNumber', WechatController.getUserPhoneNumber, name="getUserPhoneNumber"),
    path('wechat/getUserInfo', WechatController.getUserInfo, name="getUserInfo"),
    path('wechat/getKbmUrl', WechatController.getKbmUrl, name="getKbmUrl"),
    path('wechat/getOpenPid', WechatController.getOpenPid, name="getOpenPid"),
    path('wechat/updateBackground', WechatController.updateBackground, name="updateBackground"),
    path('wechat/updateNikeName', WechatController.updateNikeName, name="updateNikeName"),

    # 投诉建议接口
    path('complaint/insertComplaint', WechatComplaintController.insertComplaint, name="insertComplaint"),
    path('complaint/deleteComplaint', WechatComplaintController.deleteComplaint, name="deleteComplaint"),
    path('complaint/getComplaintList', WechatComplaintController.getComplaintList, name="getComplaintList"),
    path('complaint/getComplaintInfo', WechatComplaintController.getComplaintInfo, name="getComplaintInfo"),
    path('complaint/updateComplaint', WechatComplaintController.updateComplaint, name="updateComplaint"),

    #milvus系列
    path('milvus/listAllcollections', MilvusController.list_all_collections, name="list_all_collections"),
    path('milvus/deleteCollection', MilvusController.delete_collection, name="delete_collection"),
    path('milvus/deleteMilvusData', MilvusController.delete_milvus_data, name="delete_milvus_data"),
    path('milvus/getMinioURl', MilvusController.getMinioURl, name="getMinioURl"),

    #pc端
    path('pcai/pcSMS',WechatController.pcSMS, name="pcSMS"),
    path('pcai/codeCheckout',WechatController.codeCheckout, name="codeCheckout"),
    path('pcai/pcLoging',WechatController.pcLoging, name="pcLoging"),
    path('pcai/pcInnerAi',WechatController.pcInnerAi, name="pcInnerAi"),

    #知识库分类
    path('docType/insertType',KbmDocumentTypeController.insertType, name="insertType"),
    path('docType/updateType',KbmDocumentTypeController.updateType, name="updateType"),
    path('docType/selectTypeList',KbmDocumentTypeController.selectTypeList, name="selectTypeList"),
    path('docType/delete',KbmDocumentTypeController.delete, name="delete"),
    path('docType/Info',KbmDocumentTypeController.Info, name="Info"),
    path('docType/selectType0',KbmDocumentTypeController.selectType0, name="selectType0"),


    #超级账号
    path('superAdmin/createPassword',SuperAdminController.createPassword, name="createPassword"),
    path('superAdmin/createAccount',SuperAdminController.createAccount, name="createAccount"),
    path('superAdmin/superLogin',SuperAdminController.superLogin, name="superLogin"),
    path('superAdmin/selcetSetting',SuperAdminController.selcetSetting, name="selcetSetting"),
    path('superAdmin/insertSetting',SuperAdminController.insertSetting, name="insertSetting"),
    path('superAdmin/updateSetting',SuperAdminController.updateSettings, name="updateSetting"),
    path('superAdmin/deleteSetting',SuperAdminController.deleteSettings, name="deleteSetting"),
    path('superAdmin/getSuperMenu',SuperAdminController.getSuperMenu, name="getSuperMenu"),
















]
