diff --git a/api.csv b/api.csv index 19bf74c6..c869999e 100644 --- a/api.csv +++ b/api.csv @@ -1638,3 +1638,395 @@ web/infoorganization/tag,/api/v1/web/info-organization/tags/:id,put,修改碎片 web/infoorganization/tag,/api/v1/web/info-organization/tags/:id,patch,修改碎片标签父级 web/infoorganization/tag,/api/v1/web/info-organization/tags/:id,delete,删除碎片标签 web/scene,/api/v1/web/scene/qrcode/detail/:qid(SceneRequest),get,获取场景落地页详情 +admin/auth,/api/v1/admin/auth/access/actions/basic-login,post,登录 +admin/auth,/api/v1/admin/auth/access/actions/exchange-token,post,Exchange +admin/common,/api/v1/admin/common/options/users,get,员工Options远程搜索 +admin/common,/api/v1/admin/common/options/user-query,get,查询员工过滤条件 +admin/common,/api/v1/admin/common/options/departments,get,部门Options远程搜索 +admin/common,/api/v1/admin/common/options,get,通用获取Options +admin/crm/business/opportunity,/api/v1/admin/business/opportunities,get,查询商机列表 +admin/crm/business/opportunity,/api/v1/admin/business/opportunities,post,创建商机 +admin/crm/business/opportunity,/api/v1/admin/business/opportunities/:id/assign-user,put,为商机分配员工 +admin/crm/business/opportunity,/api/v1/admin/business/opportunities/:id,put,修改商机信息 +admin/crm/business/opportunity,/api/v1/admin/business/opportunities/:id,delete,删除商机 +admin/crm/customerdomain/customer,/api/v1/admin/customerdomain/customers/:id,get,查询客户 +admin/crm/customerdomain/customer,/api/v1/admin/customerdomain/customers/page-list,get,获取客户分页列表 +admin/crm/customerdomain/customer,/api/v1/admin/customerdomain/customers,post,创建客户 +admin/crm/customerdomain/customer,/api/v1/admin/customerdomain/customers/:id,put,全量客户 +admin/crm/customerdomain/customer,/api/v1/admin/customerdomain/customers/:id,patch,增量客户 +admin/crm/customerdomain/customer,/api/v1/admin/customerdomain/customers/:id,delete,删除客户 +admin/crm/customerdomain/customer,/api/v1/admin/customerdomain/customers/:id/actions/users,post,为客户分配员工 +admin/crm/customerdomain/leader,/api/v1/admin/customerdomain/leads/:id,get,查询线索 +admin/crm/customerdomain/leader,/api/v1/admin/customerdomain/leads/page-list,get,获取线索分页列表 +admin/crm/customerdomain/leader,/api/v1/admin/customerdomain/leads,post,创建线索 +admin/crm/customerdomain/leader,/api/v1/admin/customerdomain/leads/:id,put,全量线索 +admin/crm/customerdomain/leader,/api/v1/admin/customerdomain/leads/:id,patch,增量线索 +admin/crm/customerdomain/leader,/api/v1/admin/customerdomain/leads/:id,delete,删除线索 +admin/crm/customerdomain/leader,/api/v1/admin/customerdomain/leads/:id/actions/users,post,为线索分配员工 +admin/crm/customerdomain/registercode,/api/v1/admin/customerdomain/register-codes/:id,get,查询注册码 +admin/crm/customerdomain/registercode,/api/v1/admin/customerdomain/register-codes/page-list,get,获取注册码分页列表 +admin/crm/customerdomain/registercode,/api/v1/admin/customerdomain/register-codes,post,创建注册码 +admin/crm/customerdomain/registercode,/api/v1/admin/customerdomain/register-codes/generate,post,批量创建注册码 +admin/crm/customerdomain/registercode,/api/v1/admin/customerdomain/register-codes/:id,put,全量注册码 +admin/crm/customerdomain/registercode,/api/v1/admin/customerdomain/register-codes/:id,patch,增量注册码 +admin/crm/customerdomain/registercode,/api/v1/admin/customerdomain/register-codes/:id,delete,删除注册码 +admin/crm/market/brandstory,/api/v1/admin/market/brand-stories/page-list,get,查询品牌故事列表 +admin/crm/market/brandstory,/api/v1/admin/market/brand-stories/:id,get,查询品牌故事详情 +admin/crm/market/brandstory,/api/v1/admin/market/brand-stories,post,创建品牌故事 +admin/crm/market/brandstory,/api/v1/admin/market/brand-stories/:id,put,全量品牌故事 +admin/crm/market/brandstory,/api/v1/admin/market/brand-stories/:id,delete,删除品牌故事 +admin/crm/market/media,/api/v1/admin/market/medias/page-list,get,查询媒体列表 +admin/crm/market/media,/api/v1/admin/market/medias,post,请求媒体上传链接 +admin/crm/market/media,/api/v1/admin/market/medias/:id,put,创建或更新媒体 +admin/crm/market/media,/api/v1/admin/market/medias/:id,get,根据媒体key获取媒体 +admin/crm/market/media,/api/v1/admin/market/medias/:id,delete,删除媒体 +admin/crm/market/mgm,/api/v1/admin/market/mgms/page-list,get,查询MGMRule列表 +admin/crm/market/mgm,/api/v1/admin/market/mgms,post,请求MGMRule上传链接 +admin/crm/market/mgm,/api/v1/admin/market/mgms/:id,put,创建或更新MGMRule +admin/crm/market/mgm,/api/v1/admin/market/mgms/:id,get,根据获取MGMRule +admin/crm/market/mgm,/api/v1/admin/market/mgms/:id,delete,删除MGMRule +admin/crm/market/store,/api/v1/admin/market/stores/page-list,get,查询门店列表 +admin/crm/market/store,/api/v1/admin/market/stores/:id,get,查询门店详情 +admin/crm/market/store,/api/v1/admin/market/stores,post,创建门店 +admin/crm/market/store,/api/v1/admin/market/stores/:id,put,全量门店 +admin/crm/market/store,/api/v1/admin/market/stores/:id,delete,删除门店 +admin/crm/market/store,/api/v1/admin/market/stores/:id/actions/assign-to-store-categroy,post,分配门店经理给门店 +admin/crm/membership,/api/v1/admin/membership/customers/:id,get,查询会籍 +admin/crm/product/artisan,/api/v1/admin/product/artisans/page-list,get,查询元匠列表 +admin/crm/product/artisan,/api/v1/admin/product/artisans/:id,get,查询元匠详情 +admin/crm/product/artisan,/api/v1/admin/product/artisans,post,创建元匠 +admin/crm/product/artisan,/api/v1/admin/product/artisans/:id,put,全量元匠 +admin/crm/product/artisan,/api/v1/admin/product/artisans/:id,delete,删除元匠 +admin/crm/product/artisan,/api/v1/admin/product/artisans/bind/stores,post,元匠绑定门店 +admin/crm/product/pricebook,/api/v1/admin/product/price-books/page-list,get,查询价格手册列表 +admin/crm/product/pricebook,/api/v1/admin/product/price-books/:id,get,查询价格手册详情 +admin/crm/product/pricebook,/api/v1/admin/product/price-books,post,创新价格手册 +admin/crm/product/pricebook,/api/v1/admin/product/price-books/:id,delete,删除价格手册 +admin/crm/product/pricebookentry,/api/v1/admin/product/price-book-entries/page-list,get,查询价格手册条目列表 +admin/crm/product/pricebookentry,/api/v1/admin/product/price-book-entries/:id,get,查询价格手册条目详情 +admin/crm/product/pricebookentry,/api/v1/admin/product/price-book-entries/config,post,配置价格手册条目条目 +admin/crm/product/pricebookentry,/api/v1/admin/product/price-book-entries/:id,post,配置价格手册条目条目 +admin/crm/product/pricebookentry,/api/v1/admin/product/price-book-entries/:id,delete,删除价格手册条目 +admin/crm/product,/api/v1/admin/product/products/page-list,get,查询产品列表 +admin/crm/product,/api/v1/admin/product/products/:id,get,查询产品详情 +admin/crm/product,/api/v1/admin/product/products,post,创建产品 +admin/crm/product,/api/v1/admin/product/products/:id,put,全量产品 +admin/crm/product,/api/v1/admin/product/products/:id,patch,增量产品 +admin/crm/product,/api/v1/admin/product/products/disable/:id,put,下架产品 +admin/crm/product,/api/v1/admin/product/products/:id,delete,删除产品 +admin/crm/product,/api/v1/admin/product/products/:id/actions/assign-to-product-categroy,post,分配产品品类给产品品类分类 +admin/crm/product/category,/api/v1/admin/product/product-category-tree,get,查询产品品类列表 +admin/crm/product/category,/api/v1/admin/product/product-categories/:id,get,查询产品品类详情 +admin/crm/product/category,/api/v1/admin/product/product-categories,post,创新产品品类 +admin/crm/product/category,/api/v1/admin/product/product-categories/:id,put,修改产品品类 +admin/crm/product/category,/api/v1/admin/product/product-categories/:id,patch,修改产品品类父级 +admin/crm/product/category,/api/v1/admin/product/product-categories/:id,delete,删除产品品类 +admin/crm/product/productspecific,/api/v1/admin/product/product-specifics/page-list,get,查询产品规格列表 +admin/crm/product/productspecific,/api/v1/admin/product/product-specifics/:id,get,查询产品规格详情 +admin/crm/product/productspecific,/api/v1/admin/product/product-specifics,post,创建产品规格 +admin/crm/product/productspecific,/api/v1/admin/product/product-specifics/config,post,配置产品规格 +admin/crm/product/productspecific,/api/v1/admin/product/product-specifics/:id,put,全量产品规格 +admin/crm/product/productspecific,/api/v1/admin/product/product-specifics/:id,patch,增量产品规格 +admin/crm/product/productspecific,/api/v1/admin/product/product-specifics/:id,delete,删除产品规格 +admin/crm/product/productstatistics,/api/v1/admin/product/product-statistics/page-list,get,查询产品统计列表 +admin/crm/product/productstatistics,/api/v1/admin/product/product-statistics/:id,get,查询产品统计详情 +admin/crm/product/productstatistics,/api/v1/admin/product/product-statistics/config,post,配置产品统计 +admin/crm/product/productstatistics,/api/v1/admin/product/product-statistics/:id,put,全量产品统计 +admin/crm/product/productstatistics,/api/v1/admin/product/product-statistics/:id,patch,增量产品统计 +admin/crm/product/sku,/api/v1/admin/product/skus/page-list,get,查询SKU列表 +admin/crm/product/sku,/api/v1/admin/product/skus/:id,get,查询SKU详情 +admin/crm/product/sku,/api/v1/admin/product/skus,post,创建SKU +admin/crm/product/sku,/api/v1/admin/product/skus/config,post,配置SKU +admin/crm/product/sku,/api/v1/admin/product/skus/:id,put,全量SKU +admin/crm/product/sku,/api/v1/admin/product/skus/:id,patch,增量SKU +admin/crm/product/sku,/api/v1/admin/product/skus/:id,delete,删除SKU +admin/crm/trade/address/billing,/api/v1/admin/trade/address/billing/page-list,get,查询账单地址列表 +admin/crm/trade/address/billing,/api/v1/admin/trade/address/billing/:id,get,查询账单地址详情 +admin/crm/trade/address/billing,/api/v1/admin/trade/address/billing,post,创建账单地址 +admin/crm/trade/address/billing,/api/v1/admin/trade/address/billing/:id,put,更新账单地址 +admin/crm/trade/address/billing,/api/v1/admin/trade/address/billing/:id,patch,部分更新账单地址 +admin/crm/trade/address/billing,/api/v1/admin/trade/address/billing/:id,delete,删除账单地址 +admin/crm/trade/address/delivery,/api/v1/admin/trade/address/delivery/page-list,get,查询订单发货地址列表 +admin/crm/trade/address/delivery,/api/v1/admin/trade/address/delivery/:id,get,查询订单发货地址详情 +admin/crm/trade/address/delivery,/api/v1/admin/trade/address/delivery,post,创建订单发货地址 +admin/crm/trade/address/delivery,/api/v1/admin/trade/address/delivery/:id,put,更新订单发货地址 +admin/crm/trade/address/delivery,/api/v1/admin/trade/address/delivery/:id,patch,部分更新订单发货地址 +admin/crm/trade/address/delivery,/api/v1/admin/trade/address/delivery/:id,delete,删除订单发货地址 +admin/crm/trade/logistics,/api/v1/admin/trade/logisticses,get,查询物流列表 +admin/crm/trade/logistics,/api/v1/admin/trade/logisticses/:id,get,获取物流详情 +admin/crm/trade/logistics,/api/v1/admin/trade/logisticses,post,创建物流 +admin/crm/trade/logistics,/api/v1/admin/trade/logisticses/:id,put,更新物流 +admin/crm/trade/logistics,/api/v1/admin/trade/logisticses/:id,patch,部分更新物流 +admin/crm/trade/logistics,/api/v1/admin/trade/logisticses/:id,delete,删除物流 +admin/crm/trade/order,/api/v1/admin/trade/orders/page-list,get,查询订单列表 +admin/crm/trade/order,/api/v1/admin/trade/orders/:id,get,查询订单详情 +admin/crm/trade/order,/api/v1/admin/trade/orders,post,创建订单 +admin/crm/trade/order,/api/v1/admin/trade/orders/:id,put,更新订单 +admin/crm/trade/order,/api/v1/admin/trade/orders/:id,patch,部分更新订单 +admin/crm/trade/order,/api/v1/admin/trade/orders/:id,delete,删除订单 +admin/crm/trade/order,/api/v1/admin/trade/orders/export,get,导出订单 +admin/crm/trade/order,/api/v1/admin/trade/orders/import,post,导入订单 +admin/crm/trade/payment,/api/v1/admin/trade/payments/page-list,get,查询支付单列表 +admin/crm/trade/payment,/api/v1/admin/trade/payments/:id,get,查询支付单详情 +admin/crm/trade/payment,/api/v1/admin/trade/payments,post,创建支付单 +admin/crm/trade/payment,/api/v1/admin/trade/payments/:id,put,全量支付单 +admin/crm/trade/payment,/api/v1/admin/trade/payments/:id,patch,增量支付单 +admin/crm/trade/payment,/api/v1/admin/trade/payments/:id,delete,删除支付单 +admin/crm/trade/order,/api/v1/admin/trade/refund-order/page-list,get,查询退款单列表 +admin/crm/trade/order,/api/v1/admin/trade/refund-order/:id,get,查询退款单详情 +admin/crm/trade/order,/api/v1/admin/trade/refund-order,post,创建退款单 +admin/crm/trade/order,/api/v1/admin/trade/refund-order/:id,put,更新退款单 +admin/crm/trade/order,/api/v1/admin/trade/refund-order/:id,patch,部分更新退款单 +admin/crm/trade/order,/api/v1/admin/trade/refund-order/:id,delete,删除退款单 +admin/crm/trade/address/shipping,/api/v1/admin/trade/address/shipping/page-list,get,查询收货地址列表 +admin/crm/trade/address/shipping,/api/v1/admin/trade/address/shipping/:id,get,查询收货地址详情 +admin/crm/trade/address/shipping,/api/v1/admin/trade/address/shipping,post,创建收货地址 +admin/crm/trade/address/shipping,/api/v1/admin/trade/address/shipping/:id,put,更新收货地址 +admin/crm/trade/address/shipping,/api/v1/admin/trade/address/shipping/:id,patch,部分更新收货地址 +admin/crm/trade/address/shipping,/api/v1/admin/trade/address/shipping/:id,delete,删除收货地址 +admin/crm/trade/token,/api/v1/admin/trade/token/products/page-list,get,查询代币产品列表 +admin/crm/trade/token,/api/v1/admin/trade/token/products/:id,get,查询代币产品详情 +admin/crm/trade/token,/api/v1/admin/trade/token/products,post,创建代币产品 +admin/crm/trade/token,/api/v1/admin/trade/token/products/:id,put,全量代币产品 +admin/crm/trade/token,/api/v1/admin/trade/token/products/:id,patch,增量代币产品 +admin/crm/trade/token,/api/v1/admin/trade/token/products/:id,delete,删除代币产品 +admin/crm/trade/warehouse,/api/v1/admin/trade/warehouses,get,查询仓库列表 +admin/crm/trade/warehouse,/api/v1/admin/trade/warehouses/:id,get,获取仓库详情 +admin/crm/trade/warehouse,/api/v1/admin/trade/warehouses,post,创建仓库 +admin/crm/trade/warehouse,/api/v1/admin/trade/warehouses/:id,put,更新仓库 +admin/crm/trade/warehouse,/api/v1/admin/trade/warehouses/:id,patch,部分更新仓库 +admin/crm/trade/warehouse,/api/v1/admin/trade/warehouses/:id,delete,删除仓库 +admin/department,/api/v1/admin/department/department-tree/:depId,get,查询组织架构 +admin/department,/api/v1/admin/department/departments/:id,get,获取单个部门详情 +admin/department,/api/v1/admin/department/departments,post,创建新部门 +admin/department,/api/v1/admin/department/departments/:id,patch,更新部门信息(可选更新) +admin/department,/api/v1/admin/department/departments/:id,delete,删除部门 +admin/dictionary,/api/v1/admin/dictionary/types/page-list,get,获取字典类型列表 +admin/dictionary,/api/v1/admin/dictionary/types,get,获取字典类型列表 +admin/dictionary,/api/v1/admin/dictionary/types/:type,get,获取字典类型 +admin/dictionary,/api/v1/admin/dictionary/types,post,创建字典类型 +admin/dictionary,/api/v1/admin/dictionary/types/:type,put,更新字典类型 +admin/dictionary,/api/v1/admin/dictionary/types/:type,delete,删除字典类型 +admin/dictionary,/api/v1/admin/dictionary/items,get,获取字典项列表 +admin/dictionary,/api/v1/admin/dictionary/items/:type/:key,get,获取字典项 +admin/dictionary,/api/v1/admin/dictionary/items,post,创建字典项 +admin/dictionary,/api/v1/admin/dictionary/items/:type/:key,put,更新字典项 +admin/dictionary,/api/v1/admin/dictionary/items/:type/:key,delete,删除字典项 +admin/infoorganization/category,/api/v1/admin/info-organization/category-tree,get,查询类别列表 +admin/infoorganization/category,/api/v1/admin/info-organization/categories/:id,get,查询类别详情 +admin/infoorganization/category,/api/v1/admin/info-organization/categories,post,创新类别 +admin/infoorganization/category,/api/v1/admin/info-organization/categories/:id,put,修改类别 +admin/infoorganization/category,/api/v1/admin/info-organization/categories/:id,patch,修改类别父级 +admin/infoorganization/category,/api/v1/admin/info-organization/categories/:id,delete,删除类别 +admin/infoorganization/label,/api/v1/admin/info-organization/label-tree,get,查询框架标签列表 +admin/infoorganization/label,/api/v1/admin/info-organization/labels/:id,get,查询框架标签详情 +admin/infoorganization/label,/api/v1/admin/info-organization/labels,post,创新框架标签 +admin/infoorganization/label,/api/v1/admin/info-organization/labels/:id,put,修改框架标签 +admin/infoorganization/label,/api/v1/admin/info-organization/labels/:id,patch,修改框架标签父级 +admin/infoorganization/label,/api/v1/admin/info-organization/labels/:id,delete,删除框架标签 +admin/infoorganization/tag,/api/v1/admin/info-organization/tag-tree,get,查询碎片标签列表 +admin/infoorganization/tag,/api/v1/admin/info-organization/tags/:id,get,查询碎片标签详情 +admin/infoorganization/tag,/api/v1/admin/info-organization/tags,post,创新碎片标签 +admin/infoorganization/tag,/api/v1/admin/info-organization/tags/:id,put,修改碎片标签 +admin/infoorganization/tag,/api/v1/admin/info-organization/tags/:id,patch,修改碎片标签父级 +admin/infoorganization/tag,/api/v1/admin/info-organization/tags/:id,delete,删除碎片标签 +admin/mediaresource,/api/v1/admin/media/resources/page-list,get,查询媒资列表 +admin/mediaresource,/api/v1/admin/media/resources,post,创建媒资 +admin/mediaresource,/api/v1/admin/media/resources/base64,post,创建媒资-Base64 +admin/mediaresource,/api/v1/admin/media/resources/:id,get,获取媒资详情 +admin/mediaresource,/api/v1/admin/media/resources/:id,delete,删除媒资 +admin/permission,/api/v1/admin/permission/roles,get,查询角色列表 +admin/permission,/api/v1/admin/permission/roles,post,创建角色 +admin/permission,/api/v1/admin/permission/roles/:roleCode,get,获取角色详情 +admin/permission,/api/v1/admin/permission/roles/:roleCode,patch,更新角色详情 +admin/permission,/api/v1/admin/permission/roles/:roleCode/users,get,获取角色的用户列表 +admin/permission,/api/v1/admin/permission/roles/:roleCode/actions/set-permissions,post,为角色授予API权限 +admin/permission,/api/v1/admin/permission/api-list,get,查询API列表 +admin/permission,/api/v1/admin/permission/roles/:roleCode/actions/set-users,post,为角色分配用户 +admin/permission,/api/v1/admin/permission/users/:userId/actions/set-roles,post,为用户授予角色 +admin/position,/api/v1/admin/position/positions,post,创建新职位 +admin/position,/api/v1/admin/position/positions/:id,patch,更新职位信息(可选更新) +admin/position,/api/v1/admin/position/positions/:id,delete,删除职位 +admin/position,/api/v1/admin/position/positions,get,获取职位列表 +admin/position,/api/v1/admin/position/positions/:id,get,获取职位详情 +admin/scrm/app,/api/v1/admin/scrm/app/wechat/detail,get,App详情 +admin/scrm/app,/api/v1/admin/scrm/app/wechat/options,get,App列表/options +admin/scrm/app,/api/v1/admin/scrm/app/wechat/message/articles,post,App发送图文信息 +admin/scrm/app,/api/v1/admin/scrm/app/wechat/group/list,get,App企业群列表/list +admin/scrm/app,/api/v1/admin/scrm/app/wechat/group/create,post,App创建企业群 +admin/scrm/app,/api/v1/admin/scrm/app/wechat/group/message/articles,post,App企业群推送图文信息 +admin/scrm/bot,/api/v1/admin/scrm/bot/wechat/message/articles,post,机器人发送图文信息 +admin/scrm/contractway,/api/v1/admin/contract-way/group-tree,get,获取渠道活码分组树 +admin/scrm/contractway,/api/v1/admin/contract-way/groups,get,查询渠道活码分组列表 +admin/scrm/contractway,/api/v1/admin/contract-way,get,查询渠道活码 +admin/scrm/contractway,/api/v1/admin/contract-way,post,创建活码 +admin/scrm/contractway,/api/v1/admin/contract-way/:id,put,修改活码 +admin/scrm/contractway,/api/v1/admin/contract-way/:id,delete,删除活码 +admin/scrm/customer,/api/v1/admin/scrm/customer/wechat/sync,post,批量同步客户信息(根据员工ID同步/节流) +admin/scrm/customer,/api/v1/admin/scrm/customer/wechat/page,post,所有客户列表/page +admin/scrm/customer,/api/v1/admin/scrm/customer/wechat/group/list,post,客户群列表/limit +admin/scrm/customer,/api/v1/admin/scrm/customer/wechat/group/message/template,post,客户群发信息 +admin/scrm/customer,/api/v1/admin/scrm/customer/customers/:id,get,查询客户详情 +admin/scrm/customer,/api/v1/admin/scrm/customer/customers,get,查询客户详情列表 +admin/scrm/customer,/api/v1/admin/scrm/customer/customers/:id,patch,修改客户信息 +admin/scrm/customer,/api/v1/admin/scrm/customer/customers/actions/sync,post,同步客户 +admin/scrm/organization,/api/v1/admin/scrm/organization/wechat/partment/page,post,部门列表/page +admin/scrm/organization,/api/v1/admin/scrm/organization/wechat/user/page,post,员工列表/page +admin/scrm/organization,/api/v1/admin/scrm/organization/wechat/sync,get,同步组织架构/department&user +admin/scrm/qrcode,/api/v1/admin/scrm/qrcode/wechat/group/page,post,场景码列表/page +admin/scrm/qrcode,/api/v1/admin/scrm/qrcode/wechat/group/create,post,创建场景码 +admin/scrm/qrcode,/api/v1/admin/scrm/qrcode/wechat/group/update/:qid,patch,更新场景码 +admin/scrm/qrcode,/api/v1/admin/scrm/qrcode/wechat/group/enable/:qid,patch,启用场景码 +admin/scrm/qrcode,/api/v1/admin/scrm/qrcode/wechat/group/disable/:qid,patch,禁用场景码 +admin/scrm/qrcode,/api/v1/admin/scrm/qrcode/wechat/group/:qid,delete,删除场景码 +admin/scrm/qrcode,/api/v1/admin/scrm/qrcode/wechat/qrcode/:qid,patch,下载场景码/upload +admin/scrm/resource,/api/v1/admin/scrm/resource/wechat/image/upload,post,上传图片到微信 +admin/scrm/resource,/api/v1/admin/scrm/resource/wechat/image/page,post,微信素材库/page +admin/scrm/tag,/api/v1/admin/scrm/tag/wechat/group/option,get,标签组列表/option +admin/scrm/tag,/api/v1/admin/scrm/tag/wechat/group/page,post,标签组分页/page +admin/scrm/tag,/api/v1/admin/scrm/tag/wechat/corp/option,get,标签列表对象/key=>val +admin/scrm/tag,/api/v1/admin/scrm/tag/wechat/group/action,post,添加、删除标签组内的标签 +admin/scrm/tag,/api/v1/admin/scrm/tag/wechat/corp/page,post,标签列表/page +admin/scrm/tag,/api/v1/admin/scrm/tag/wechat/sync,put,全量同步标签/sync +admin/scrm/tag,/api/v1/admin/scrm/tag/wechat/crop/create,post,创建企业标签 +admin/scrm/tag,/api/v1/admin/scrm/tag/wechat/crop/update,patch,编辑企业标签 +admin/scrm/tag,/api/v1/admin/scrm/tag/wechat/crop/delete,delete,批量删除企业标签 +admin/scrm/tag,/api/v1/admin/scrm/tag/wechat/customer/action,delete,编辑/删除客户标签 +admin/tag,/api/v1/admin/tags/tag-tree,get,查询标签列表 +admin/tag,/api/v1/admin/tags/:id,get,查询标签详情 +admin/tag,/api/v1/admin/tags,post,创新标签 +admin/tag,/api/v1/admin/tags/:id,put,修改标签 +admin/tag,/api/v1/admin/tags/:id,patch,修改标签父级 +admin/tag,/api/v1/admin/tags/:id,delete,删除标签 +admin/user,/api/v1/admin/user/users/actions/sync,post,同步员工 +admin/user,/api/v1/admin/user/users/:id,get,查询员工 +admin/user,/api/v1/admin/user/users,get,List员工 +admin/user,/api/v1/admin/user/users,post,创建员工 +admin/user,/api/v1/admin/user/users/:id,patch,编辑员工信息 +admin/user,/api/v1/admin/user/users/:id,delete,删除员工 +admin/user,/api/v1/admin/user/users/actions/reset-password,post,重设密码 +admin/userinfo,/api/v1/admin/user-center/user-info,get,获取用户信息 +admin/userinfo,/api/v1/admin/user-center/menu-roles,get,获取用户可见菜单 +admin/userinfo,/api/v1/admin/user-center/users/actions/modify-password,post,修改密码 +admin/wechat/officialaccount/media,/api/v1/admin/wechat/official-account/medias/page-list,post,查询菜单列表 +admin/wechat/officialaccount/media,/api/v1/admin/wechat/official-account/media/news/list,get,查询菜单列表 +admin/wechat/officialaccount/media,/api/v1/admin/wechat/official-account/medias/:mediaId,get,请求菜单上传链接 +admin/wechat/officialaccount/media,/api/v1/admin/wechat/official-account/medias/video/:mediaId,get,根据媒体key获取媒体 +admin/wechat/officialaccount/media,/api/v1/admin/wechat/official-account/medias/upload,post,创建菜单 +admin/wechat/officialaccount/media,/api/v1/admin/wechat/official-account/medias,post,创建菜单 +admin/wechat/officialaccount/media,/api/v1/admin/wechat/official-account/medias/:mediaId,delete,删除菜单 +admin/wechat/officialaccount/menu,/api/v1/admin/wechat/official-account/menus-tree,get,查询菜单列表 +admin/wechat/officialaccount/menu,/api/v1/admin/wechat/official-account/menus/sync,post,请求菜单上传链接 +admin/wechat/officialaccount/menu,/api/v1/admin/wechat/official-account/menus,post,创建菜单 +admin/wechat/officialaccount/menu,/api/v1/admin/wechat/official-account/menus,delete,删除菜单 +system/health,/api/v1/system/health,get,健康检查接口 +mp/crm/customer/auth,/api/v1/mp/customer/validToken,get,微信小程序Token验证 +mp/crm/customer/auth,/api/v1/mp/customer/login,post,微信小程序登录 +mp/crm/customer/auth,/api/v1/mp/customer/authByPhone,post,客户手机授权 +mp/crm/customer/auth,/api/v1/mp/customer/authByProfile,post,客户信息授权 +mp/crm/customer,/api/v1/mp/customer/user-info,get,获取用户信息 +mp/dictionary,/api/v1/mp/dictionary/types/page-list,get,获取字典类型列表 +mp/dictionary,/api/v1/mp/dictionary/types/:type,get,获取字典类型 +mp/dictionary,/api/v1/mp/dictionary/items,get,获取字典项列表 +mp/dictionary,/api/v1/mp/dictionary/items/:type/:key,get,获取字典项 +mp/infoorganization/category,/api/v1/mp/info-organization/category-tree,get,查询类别列表 +mp/infoorganization/category,/api/v1/mp/info-organization/categories/:id,get,查询类别详情 +mp/infoorganization/category,/api/v1/mp/info-organization/categories,post,创新类别 +mp/infoorganization/category,/api/v1/mp/info-organization/categories/:id,put,修改类别 +mp/infoorganization/category,/api/v1/mp/info-organization/categories/:id,patch,修改类别父级 +mp/infoorganization/category,/api/v1/mp/info-organization/categories/:id,delete,删除类别 +web/infoorganization/label,/api/v1/web/info-organization/label-tree,get,查询框架标签列表 +web/infoorganization/label,/api/v1/web/info-organization/labels/:id,get,查询框架标签详情 +web/infoorganization/label,/api/v1/web/info-organization/labels,post,创新框架标签 +web/infoorganization/label,/api/v1/web/info-organization/labels/:id,put,修改框架标签 +web/infoorganization/label,/api/v1/web/info-organization/labels/:id,patch,修改框架标签父级 +web/infoorganization/label,/api/v1/web/info-organization/labels/:id,delete,删除框架标签 +web/infoorganization/tag,/api/v1/web/info-organization/tag-tree,get,查询碎片标签列表 +web/infoorganization/tag,/api/v1/web/info-organization/tags/:id,get,查询碎片标签详情 +web/infoorganization/tag,/api/v1/web/info-organization/tags,post,创新碎片标签 +web/infoorganization/tag,/api/v1/web/info-organization/tags/:id,put,修改碎片标签 +web/infoorganization/tag,/api/v1/web/info-organization/tags/:id,patch,修改碎片标签父级 +web/infoorganization/tag,/api/v1/web/info-organization/tags/:id,delete,删除碎片标签 +mp/crm/market/media,/api/v1/mp/market/medias/page-list,get,查询媒资列表 +mp/crm/market/store,/api/v1/mp/market/stores/page-list,get,店铺列表 +mp/crm/membership,/api/v1/mp/membership/customer,get,查询会籍 +mp/crm/membership,/api/v1/mp/membership/:id,get,查询会籍 +mp/crm/product/artisan,/api/v1/mp/product/artisans/page-list,get,查询元匠列表 +mp/crm/product/artisan,/api/v1/mp/product/artisans/:id,get,查询元匠详情 +mp/crm/product,/api/v1/mp/product/products/page-list,get,产品列表 +mp/crm/product,/api/v1/mp/product/products/:id,get,查询产品详情 +mp/crm/product,/api/v1/mp/product/product-category-tree,get,查询产品品类树形表 +mp/crm/product,/api/v1/mp/product/product-categories,get,查询产品品类列表 +mp/crm/product/productstatistics,/api/v1/mp/product/product-statistics/page-list,get,查询产品统计列表 +mp/crm/product/productstatistics,/api/v1/mp/product/product-statistics/:id,get,查询产品统计详情 +mp/crm/trade/address/billing,/api/v1/mp/trade/address/billing/page-list,get,查询账单地址列表 +mp/crm/trade/address/billing,/api/v1/mp/trade/address/billing/:id,get,查询账单地址详情 +mp/crm/trade/address/billing,/api/v1/mp/trade/address/billing,post,创建账单地址 +mp/crm/trade/address/billing,/api/v1/mp/trade/address/billing/:id,put,更新账单地址 +mp/crm/trade/address/billing,/api/v1/mp/trade/address/billing/:id,patch,部分更新账单地址 +mp/crm/trade/address/billing,/api/v1/mp/trade/address/billing/:id,delete,删除账单地址 +mp/crm/trade/cart,/api/v1/mp/trade/cart/items/page-list,get,查询购物车列表 +mp/crm/trade/cart,/api/v1/mp/trade/cart/:cartId,get,获取购物车详情 +mp/crm/trade/cart,/api/v1/mp/trade/cart/items,post,添加商品到购物车 +mp/crm/trade/cart,/api/v1/mp/trade/cart/items/:itemId,put,更新购物车商品数量 +mp/crm/trade/cart,/api/v1/mp/trade/cart/items/:itemId,delete,删除购物车商品 +mp/crm/trade/cart,/api/v1/mp/trade/cart/items/clear,delete,清空购物车 +mp/crm/trade/address/delivery,/api/v1/mp/trade/address/delivery/page-list,get,查询订单发货地址列表 +mp/crm/trade/address/delivery,/api/v1/mp/trade/address/delivery/:id,get,查询订单发货地址详情 +mp/crm/trade/address/delivery,/api/v1/mp/trade/address/delivery,post,创建订单发货地址 +mp/crm/trade/address/delivery,/api/v1/mp/trade/address/delivery/:id,put,更新订单发货地址 +mp/crm/trade/address/delivery,/api/v1/mp/trade/address/delivery/:id,patch,部分更新订单发货地址 +mp/crm/trade/address/delivery,/api/v1/mp/trade/address/delivery/:id,delete,删除订单发货地址 +mp/crm/trade/order,/api/v1/mp/trade/orders/page-list,get,查询订单列表 +mp/crm/trade/order,/api/v1/mp/trade/orders/:id,get,查询订单详情 +mp/crm/trade/order,/api/v1/mp/trade/orders/products,post,创建产品订单 +mp/crm/trade/order,/api/v1/mp/trade/orders/cart-items,post,创建购物车订单 +mp/crm/trade/order,/api/v1/mp/trade/orders/cancel/:id,put,取消订单 +mp/crm/trade/payment,/api/v1/mp/trade/payments/page-list,get,查询支付单列表 +mp/crm/trade/payment,/api/v1/mp/trade/payments/:id,get,查询支付单详情 +mp/crm/trade/payment,/api/v1/mp/trade/payments,post,创建支付单 +mp/crm/trade/payment,/api/v1/mp/trade/payments/:id,put,修改支付单 +mp/crm/trade/address/shipping,/api/v1/mp/trade/address/shipping/page-list,get,查询收货地址列表 +mp/crm/trade/address/shipping,/api/v1/mp/trade/address/shipping/:id,get,查询收货地址详情 +mp/crm/trade/address/shipping,/api/v1/mp/trade/address/shipping,post,创建收货地址 +mp/crm/trade/address/shipping,/api/v1/mp/trade/address/shipping/:id,put,更新收货地址 +mp/crm/trade/address/shipping,/api/v1/mp/trade/address/shipping/:id,patch,部分更新收货地址 +mp/crm/trade/address/shipping,/api/v1/mp/trade/address/shipping/:id,delete,删除收货地址 +mp/crm/trade/token,/api/v1/mp/trade/token/balance,get,查询代币 +openapi,/openapi/v1/version,get,Get the version of the API +openapi,/openapi/v1/echo,post,Create a new echo message +plugin,/api/v1/plugin/v1/plugins,post,插件接口 +plugin,/api/v1/plugin/v1/plugins,get,插件列表拉取 +plugin,/api/v1/plugin/v1/frontend-routes,get,插件路由拉取 +web/customer/auth,/api/v1/web/customer/login,post,微信Web登录 +web/customer/auth,/api/v1/web/customer/registerByPhone,post,客户手机注册 +web/customer/auth,/api/v1/web/customer/registerByPhone/invite/:code,post,客户手机注册,邀请码机制 +web/customer/auth,/api/v1/web/customer/registerByPhone/register/:code,post,客户手机注册,注册码机制 +web/customer/auth,/api/v1/web/customer/updateCustomerProfile/:id,post,客户信息更新 +web/customer/auth,/api/v1/web/customer/user-info,get,获取用户信息 +web/customer/auth/oa,/api/v1/web/customer/oa/login,post,微信公众号登录 +web/customer/auth/oa,/api/v1/web/customer/oa/authByPhone,post,客户手机授权 +web/customer/auth/oa,/api/v1/web/customer/oa/authByProfile,post,公众号客户信息授权 +mp/dictionary,/api/v1/web/dictionary/types/page-list,get,获取字典类型列表 +mp/dictionary,/api/v1/web/dictionary/types/:type,get,获取字典类型 +mp/dictionary,/api/v1/web/dictionary/items,get,获取字典项列表 +mp/dictionary,/api/v1/web/dictionary/items/:type/:key,get,获取字典项 +web/infoorganization/category,/api/v1/web/info-organization/category-tree,get,查询类别列表 +web/infoorganization/category,/api/v1/web/info-organization/categories/:id,get,查询类别详情 +web/infoorganization/category,/api/v1/web/info-organization/categories,post,创新类别 +web/infoorganization/category,/api/v1/web/info-organization/categories/:id,put,修改类别 +web/infoorganization/category,/api/v1/web/info-organization/categories/:id,patch,修改类别父级 +web/infoorganization/category,/api/v1/web/info-organization/categories/:id,delete,删除类别 +web/infoorganization/label,/api/v1/web/info-organization/label-tree,get,查询框架标签列表 +web/infoorganization/label,/api/v1/web/info-organization/labels/:id,get,查询框架标签详情 +web/infoorganization/label,/api/v1/web/info-organization/labels,post,创新框架标签 +web/infoorganization/label,/api/v1/web/info-organization/labels/:id,put,修改框架标签 +web/infoorganization/label,/api/v1/web/info-organization/labels/:id,patch,修改框架标签父级 +web/infoorganization/label,/api/v1/web/info-organization/labels/:id,delete,删除框架标签 +web/infoorganization/tag,/api/v1/web/info-organization/tag-tree,get,查询碎片标签列表 +web/infoorganization/tag,/api/v1/web/info-organization/tags/:id,get,查询碎片标签详情 +web/infoorganization/tag,/api/v1/web/info-organization/tags,post,创新碎片标签 +web/infoorganization/tag,/api/v1/web/info-organization/tags/:id,put,修改碎片标签 +web/infoorganization/tag,/api/v1/web/info-organization/tags/:id,patch,修改碎片标签父级 +web/infoorganization/tag,/api/v1/web/info-organization/tags/:id,delete,删除碎片标签 +web/scene,/api/v1/web/scene/qrcode/detail/:qid(SceneRequest),get,获取场景落地页详情 diff --git a/api/admin.crm.api b/api/admin.crm.api index 74f79174..30a274fa 100644 --- a/api/admin.crm.api +++ b/api/admin.crm.api @@ -11,6 +11,6 @@ import "admin/crm/product/product.api" import "admin/crm/product/artisan.api" import "admin/crm/trade/tokenproduct.api" import "admin/crm/trade/shippingaddress.api" -import "admin/crm/trade/billingaddress.api" -import "admin/crm/trade/deliveryaddress.api" -import "admin/crm/trade/warehouse.api" \ No newline at end of file +//import "admin/crm/trade/billingaddress.api" +//import "admin/crm/trade/deliveryaddress.api" +//import "admin/crm/trade/warehouse.api" \ No newline at end of file diff --git a/api/admin/crm/business/opportunity.api b/api/admin/crm/business/opportunity.api index 3fc35449..fe0ef18d 100644 --- a/api/admin/crm/business/opportunity.api +++ b/api/admin/crm/business/opportunity.api @@ -3,8 +3,8 @@ syntax = "v1" info( title: "商机管理" desc: "商机管理" - author: "YourName" - email: "yourEmail@example.com" + author: "Matrix-X" + email: "matrix-x@artisan-cloud.com" version: "v1" ) diff --git a/api/admin/crm/product/product.api b/api/admin/crm/product/product.api index 74b6a215..22d1dc3c 100644 --- a/api/admin/crm/product/product.api +++ b/api/admin/crm/product/product.api @@ -197,7 +197,7 @@ type ( ProductId int64 `path:"id"` } - DisableProductReply struct{ + DisableProductReply{ ProductId int64 `json:"id"` } diff --git a/api/admin/crm/trade/billingaddress.api b/api/admin/crm/trade/billingaddress.api index 1eeaf1d4..d196b83d 100644 --- a/api/admin/crm/trade/billingaddress.api +++ b/api/admin/crm/trade/billingaddress.api @@ -16,27 +16,27 @@ info( ) service PowerX { - @doc("查询账单地址列表") + @doc "查询账单地址列表" @handler ListBillingAddressesPage get /billing/page-list (ListBillingAddressesPageRequest) returns (ListBillingAddressesPageReply) - @doc("查询账单地址详情") + @doc "查询账单地址详情" @handler GetBillingAddress get /billing/:id (GetBillingAddressRequest) returns (GetBillingAddressReply) - @doc("创建账单地址") + @doc "创建账单地址" @handler CreateBillingAddress post /billing (CreateBillingAddressRequest) returns (CreateBillingAddressReply) - @doc("更新账单地址") + @doc "更新账单地址" @handler PutBillingAddress put /billing/:id (PutBillingAddressRequest) returns (PutBillingAddressReply) - @doc("部分更新账单地址") + @doc "部分更新账单地址" @handler PatchBillingAddress patch /billing/:id (PatchBillingAddressRequest) returns (PatchBillingAddressReply) - @doc("删除账单地址") + @doc "删除账单地址" @handler DeleteBillingAddress delete /billing/:id (DeleteBillingAddressRequest) returns (DeleteBillingAddressReply) } diff --git a/api/admin/crm/trade/deliveryaddress.api b/api/admin/crm/trade/deliveryaddress.api index 3b81868b..957c0154 100644 --- a/api/admin/crm/trade/deliveryaddress.api +++ b/api/admin/crm/trade/deliveryaddress.api @@ -16,27 +16,27 @@ info( ) service PowerX { - @doc("查询订单发货地址列表") + @doc "查询订单发货地址列表" @handler ListDeliveryAddressesPage get /delivery/page-list (ListDeliveryAddressesPageRequest) returns (ListDeliveryAddressesPageReply) - @doc("查询订单发货地址详情") + @doc "查询订单发货地址详情" @handler GetDeliveryAddress get /delivery/:id (GetDeliveryAddressRequest) returns (GetDeliveryAddressReply) - @doc("创建订单发货地址") + @doc "创建订单发货地址" @handler CreateDeliveryAddress post /delivery (CreateDeliveryAddressRequest) returns (CreateDeliveryAddressReply) - @doc("更新订单发货地址") + @doc "更新订单发货地址" @handler PutDeliveryAddress put /delivery/:id (PutDeliveryAddressRequest) returns (PutDeliveryAddressReply) - @doc("部分更新订单发货地址") + @doc "部分更新订单发货地址" @handler PatchDeliveryAddress patch /delivery/:id (PatchDeliveryAddressRequest) returns (PatchDeliveryAddressReply) - @doc("删除订单发货地址") + @doc "删除订单发货地址" @handler DeleteDeliveryAddress delete /delivery/:id (DeleteDeliveryAddressRequest) returns (DeleteDeliveryAddressReply) } diff --git a/api/admin/crm/trade/logistics.api b/api/admin/crm/trade/logistics.api index 27b62114..c361d12f 100644 --- a/api/admin/crm/trade/logistics.api +++ b/api/admin/crm/trade/logistics.api @@ -16,27 +16,27 @@ info ( service PowerX { - @doc("查询物流列表") + @doc "查询物流列表" @handler ListLogisticss get /logisticses (ListLogisticssRequest) returns (ListLogisticssResponse) - @doc("获取物流详情") + @doc "获取物流详情" @handler GetLogistics get /logisticses/:id (GetLogisticsRequest) returns (GetLogisticsResponse) - @doc("创建物流") + @doc "创建物流" @handler CreateLogistics post /logisticses (CreateLogisticsRequest) returns (CreateLogisticsResponse) - @doc("更新物流") + @doc "更新物流" @handler UpdateLogistics put /logisticses/:id (UpdateLogisticsRequest) returns (UpdateLogisticsResponse) - @doc("部分更新物流") + @doc "部分更新物流" @handler PatchLogistics patch /logisticses/:id (PatchLogisticsRequest) returns (PatchLogisticsResponse) - @doc("删除物流") + @doc "删除物流" @handler DeleteLogistics delete /logisticses/:id (DeleteLogisticsRequest) returns (DeleteLogisticsResponse) } diff --git a/api/admin/crm/trade/order.api b/api/admin/crm/trade/order.api index ed17369e..265b14cb 100644 --- a/api/admin/crm/trade/order.api +++ b/api/admin/crm/trade/order.api @@ -17,35 +17,35 @@ import "./payment.api" middleware: UserJWTAuth ) service PowerX { - @doc("查询订单列表") + @doc "查询订单列表" @handler ListOrdersPage get /orders/page-list (ListOrdersPageRequest) returns (ListOrdersPageReply) - @doc("查询订单详情") + @doc "查询订单详情" @handler GetOrder get /orders/:id (GetOrderRequest) returns (GetOrderReply) - @doc("创建订单") + @doc "创建订单" @handler CreateOrder post /orders (CreateOrderRequest) returns (CreateOrderReply) - @doc("更新订单") + @doc "更新订单" @handler PutOrder put /orders/:id (PutOrderRequest) returns (PutOrderReply) - @doc("部分更新订单") + @doc "部分更新订单" @handler PatchOrder patch /orders/:id (PatchOrderRequest) returns (PatchOrderReply) - @doc("删除订单") + @doc "删除订单" @handler DeleteOrder delete /orders/:id (DeleteOrderRequest) returns (DeleteOrderReply) - @doc("导出订单") + @doc "导出订单" @handler ExportOrders get /orders/export (ExportOrdersRequest) returns (ExportOrdersReply) - @doc("导入订单") + @doc "导入订单" @handler ImportOrders post /orders/import returns (ImportOrdersReply) diff --git a/api/admin/crm/trade/refundorder.api b/api/admin/crm/trade/refundorder.api index 1cf2a037..8a90dddb 100644 --- a/api/admin/crm/trade/refundorder.api +++ b/api/admin/crm/trade/refundorder.api @@ -16,27 +16,27 @@ info( middleware: UserJWTAuth ) service PowerX { - @doc("查询退款单列表") + @doc "查询退款单列表" @handler ListRefundOrdersPage get /refund-order/page-list (ListRefundOrdersPageRequest) returns (ListRefundOrdersPageReply) - @doc("查询退款单详情") + @doc "查询退款单详情" @handler GetRefundOrder get /refund-order/:id (GetRefundOrderRequest) returns (GetRefundOrderReply) - @doc("创建退款单") + @doc "创建退款单" @handler CreateRefundOrder post /refund-order (CreateRefundOrderRequest) returns (CreateRefundOrderReply) - @doc("更新退款单") + @doc "更新退款单" @handler PutRefundOrder put /refund-order/:id (PutRefundOrderRequest) returns (PutRefundOrderReply) - @doc("部分更新退款单") + @doc "部分更新退款单" @handler PatchRefundOrder patch /refund-order/:id (PatchRefundOrderRequest) returns (PatchRefundOrderReply) - @doc("删除退款单") + @doc "删除退款单" @handler DeleteRefundOrder delete /refund-order/:id (DeleteRefundOrderRequest) returns (DeleteRefundOrderReply) } diff --git a/api/admin/crm/trade/shippingaddress.api b/api/admin/crm/trade/shippingaddress.api index b41b888c..2e5c35f9 100644 --- a/api/admin/crm/trade/shippingaddress.api +++ b/api/admin/crm/trade/shippingaddress.api @@ -16,27 +16,27 @@ info( ) service PowerX { - @doc("查询收货地址列表") + @doc "查询收货地址列表" @handler ListShippingAddressesPage get /shipping/page-list (ListShippingAddressesPageRequest) returns (ListShippingAddressesPageReply) - @doc("查询收货地址详情") + @doc "查询收货地址详情" @handler GetShippingAddress get /shipping/:id (GetShippingAddressRequest) returns (GetShippingAddressReply) - @doc("创建收货地址") + @doc "创建收货地址" @handler CreateShippingAddress post /shipping (CreateShippingAddressRequest) returns (CreateShippingAddressReply) - @doc("更新收货地址") + @doc "更新收货地址" @handler PutShippingAddress put /shipping/:id (PutShippingAddressRequest) returns (PutShippingAddressReply) - @doc("部分更新收货地址") + @doc "部分更新收货地址" @handler PatchShippingAddress patch /shipping/:id (PatchShippingAddressRequest) returns (PatchShippingAddressReply) - @doc("删除收货地址") + @doc "删除收货地址" @handler DeleteShippingAddress delete /shipping/:id (DeleteShippingAddressRequest) returns (DeleteShippingAddressReply) } diff --git a/api/admin/crm/trade/warehouse.api b/api/admin/crm/trade/warehouse.api index d9d89257..85a93159 100644 --- a/api/admin/crm/trade/warehouse.api +++ b/api/admin/crm/trade/warehouse.api @@ -15,28 +15,27 @@ info ( ) service PowerX { - - @doc("查询仓库列表") + @doc "查询仓库列表" @handler ListWarehouses get /warehouses (ListWarehousesRequest) returns (ListWarehousesResponse) - @doc("获取仓库详情") + @doc "获取仓库详情" @handler GetWarehouse get /warehouses/:id (GetWarehouseRequest) returns (GetWarehouseResponse) - @doc("创建仓库") + @doc "创建仓库" @handler CreateWarehouse post /warehouses (CreateWarehouseRequest) returns (CreateWarehouseResponse) - @doc("更新仓库") + @doc "更新仓库" @handler UpdateWarehouse put /warehouses/:id (UpdateWarehouseRequest) returns (UpdateWarehouseResponse) - @doc("部分更新仓库") + @doc "部分更新仓库" @handler PatchWarehouse patch /warehouses/:id (PatchWarehouseRequest) returns (PatchWarehouseResponse) - @doc("删除仓库") + @doc "删除仓库" @handler DeleteWarehouse delete /warehouses/:id (DeleteWarehouseRequest) returns (DeleteWarehouseResponse) } diff --git a/api/admin/dictionary.api b/api/admin/dictionary.api index 27a38229..5f8a0ea4 100644 --- a/api/admin/dictionary.api +++ b/api/admin/dictionary.api @@ -84,11 +84,11 @@ type ( Total int64 `json:"total"` } - GetDictionaryTypeRequest struct{ + GetDictionaryTypeRequest{ DictionaryType string `path:"type"` } - GetDictionaryTypeReply struct{ + GetDictionaryTypeReply{ *DictionaryType } ) @@ -150,12 +150,12 @@ type ( List []DictionaryItem `json:"list"` } - GetDictionaryItemRequest struct{ + GetDictionaryItemRequest{ DictionaryType string `path:"type"` DictionaryItem string `path:"key"` } - GetDictionaryItemReply struct{ + GetDictionaryItemReply{ *DictionaryItem } ) diff --git a/api/admin/scrm/app/weworkapp.api b/api/admin/scrm/app/weworkapp.api index a08bef94..0c1e24e9 100644 --- a/api/admin/scrm/app/weworkapp.api +++ b/api/admin/scrm/app/weworkapp.api @@ -24,8 +24,6 @@ service PowerX { get /options returns (AppWeWorkListReply) } - - type ( ApplicationRequest { AgentId int `form:"agentId"` @@ -45,13 +43,15 @@ type ( HomeUrl string `json:"homeUrl"` CustomizedPublishStatus int `json:"customizedPublishStatus"` } - AllowUserinfos { - User []User `json:"user"` - } - User { + + WeworkUser { Userid string `json:"userId"` } + AllowUserinfos { + User []WeworkUser `json:"user"` + } + AllowPartys { Partyid []int `json:"partyId"` } @@ -60,9 +60,6 @@ type ( } ) - - - type ( AppWeWorkListReply { List []*AppWechat `json:"list"` diff --git a/api/admin/scrm/organization/weworuser.api b/api/admin/scrm/organization/weworkuser.api similarity index 100% rename from api/admin/scrm/organization/weworuser.api rename to api/admin/scrm/organization/weworkuser.api diff --git a/api/mp/product/productcategory.api b/api/mp/product/productcategory.api index 03d1e879..b5c431d8 100644 --- a/api/mp/product/productcategory.api +++ b/api/mp/product/productcategory.api @@ -28,13 +28,13 @@ service PowerX { } type ( - ListProductCategoriesRequest struct{ + ListProductCategoriesRequest{ CategoryPId int `form:"categoryPId,optional"` NeedChildren bool `form:"needChildren,optional"` Limit int `form:"limit,optional"` } - ListProductCategoriesReply struct{ + ListProductCategoriesReply{ ProductCategories []*ProductCategory `json:"list"` } ) diff --git a/api/mp/trade/billingaddress.api b/api/mp/trade/billingaddress.api index dec5a25a..7915ea8e 100644 --- a/api/mp/trade/billingaddress.api +++ b/api/mp/trade/billingaddress.api @@ -9,7 +9,7 @@ info( ) -import "./shippingaddress.api" +import "../../admin/crm/trade/billingaddress.api" @server( group: mp/crm/trade/address/billing @@ -18,27 +18,27 @@ import "./shippingaddress.api" ) service PowerX { - @doc("查询账单地址列表") + @doc "查询账单地址列表" @handler ListBillingAddressesPage get /billing/page-list (ListBillingAddressesPageRequest) returns (ListBillingAddressesPageReply) - @doc("查询账单地址详情") + @doc "查询账单地址详情" @handler GetBillingAddress get /billing/:id (GetBillingAddressRequest) returns (GetBillingAddressReply) - @doc("创建账单地址") + @doc "创建账单地址" @handler CreateBillingAddress post /billing (CreateBillingAddressRequest) returns (CreateBillingAddressReply) - @doc("更新账单地址") + @doc "更新账单地址" @handler PutBillingAddress put /billing/:id (PutBillingAddressRequest) returns (PutBillingAddressReply) - @doc("部分更新账单地址") + @doc "部分更新账单地址" @handler PatchBillingAddress patch /billing/:id (PatchBillingAddressRequest) returns (PatchBillingAddressReply) - @doc("删除账单地址") + @doc "删除账单地址" @handler DeleteBillingAddress delete /billing/:id (DeleteBillingAddressRequest) returns (DeleteBillingAddressReply) } diff --git a/api/mp/trade/deliveryaddress.api b/api/mp/trade/deliveryaddress.api index 015cf23f..f2d5041c 100644 --- a/api/mp/trade/deliveryaddress.api +++ b/api/mp/trade/deliveryaddress.api @@ -8,7 +8,7 @@ info( version: "v1" ) -import "./shippingaddress.api" +import "../../admin/crm/trade/deliveryaddress.api" @server( group: mp/crm/trade/address/delivery @@ -17,27 +17,27 @@ import "./shippingaddress.api" ) service PowerX { - @doc("查询订单发货地址列表") +// @doc "查询订单发货地址列表" @handler ListDeliveryAddressesPage get /delivery/page-list (ListDeliveryAddressesPageRequest) returns (ListDeliveryAddressesPageReply) - @doc("查询订单发货地址详情") + @doc "查询订单发货地址详情" @handler GetDeliveryAddress get /delivery/:id (GetDeliveryAddressRequest) returns (GetDeliveryAddressReply) - @doc("创建订单发货地址") + @doc "创建订单发货地址" @handler CreateDeliveryAddress post /delivery (CreateDeliveryAddressRequest) returns (CreateDeliveryAddressReply) - @doc("更新订单发货地址") + @doc "更新订单发货地址" @handler PutDeliveryAddress put /delivery/:id (PutDeliveryAddressRequest) returns (PutDeliveryAddressReply) - @doc("部分更新订单发货地址") + @doc "部分更新订单发货地址" @handler PatchDeliveryAddress patch /delivery/:id (PatchDeliveryAddressRequest) returns (PatchDeliveryAddressReply) - @doc("删除订单发货地址") + @doc "删除订单发货地址" @handler DeleteDeliveryAddress delete /delivery/:id (DeleteDeliveryAddressRequest) returns (DeleteDeliveryAddressReply) } diff --git a/api/mp/trade/shippingaddress.api b/api/mp/trade/shippingaddress.api index 37f92c2c..6b80b3dc 100644 --- a/api/mp/trade/shippingaddress.api +++ b/api/mp/trade/shippingaddress.api @@ -9,34 +9,35 @@ info( ) +import "../../admin/crm/trade/shippingaddress.api" + @server( group: mp/crm/trade/address/shipping prefix: /api/v1/mp/trade/address middleware: MPCustomerJWTAuth, MPCustomerGet ) - service PowerX { - @doc("查询收货地址列表") + @doc "查询收货地址列表" @handler ListShippingAddressesPage get /shipping/page-list (ListShippingAddressesPageRequest) returns (ListShippingAddressesPageReply) - @doc("查询收货地址详情") + @doc "查询收货地址详情" @handler GetShippingAddress get /shipping/:id (GetShippingAddressRequest) returns (GetShippingAddressReply) - @doc("创建收货地址") + @doc "创建收货地址" @handler CreateShippingAddress post /shipping (CreateShippingAddressRequest) returns (CreateShippingAddressReply) - @doc("更新收货地址") + @doc "更新收货地址" @handler PutShippingAddress put /shipping/:id (PutShippingAddressRequest) returns (PutShippingAddressReply) - @doc("部分更新收货地址") + @doc "部分更新收货地址" @handler PatchShippingAddress patch /shipping/:id (PatchShippingAddressRequest) returns (PatchShippingAddressReply) - @doc("删除收货地址") + @doc "删除收货地址" @handler DeleteShippingAddress delete /shipping/:id (DeleteShippingAddressRequest) returns (DeleteShippingAddressReply) } diff --git a/api/openapi.api b/api/openapi.api new file mode 100644 index 00000000..b0335ac3 --- /dev/null +++ b/api/openapi.api @@ -0,0 +1,2 @@ +import "openapi/auth.api" +import "openapi/demo.api" \ No newline at end of file diff --git a/api/openapi/auth.api b/api/openapi/auth.api new file mode 100644 index 00000000..5685d20f --- /dev/null +++ b/api/openapi/auth.api @@ -0,0 +1,36 @@ +syntax = "v1" + +info( + title: "Demo Open API" + desc: "This is a api of Open API in Artisan Cloud" + author: "Matrix-X" + email: "matrix-x@artisan-cloud.com" + version: "v1" +) + +@server( + group: openapi/auth + prefix: /openapi/v1/auth +) + + +service PowerX { + @doc "Auth by platform" + @handler AuthPlatform + post / (PlatformAuthRequest) returns (PlatformAuthResponse) +} + + +type ( + PlatformAuthRequest { + AccessKey string `json:"accessKey"` + SecretKey string `json:"secretKey"` + } + + PlatformAuthResponse { + TokenType string `json:"tokenType"` + ExpiresIn string `json:"expiresIn"` + AccessToken string `json:"accessToken"` + RefreshToken string `json:"refreshToken"` + } +) \ No newline at end of file diff --git a/api/openapi/demo.api b/api/openapi/demo.api new file mode 100644 index 00000000..f2d607a0 --- /dev/null +++ b/api/openapi/demo.api @@ -0,0 +1,43 @@ +syntax = "v1" + +info( + title: "Demo Open API" + desc: "This is a api of Open API in Artisan Cloud" + author: "Matrix-X" + email: "matrix-x@artisan-cloud.com" + version: "v1" +) + + +@server( + group: openapi + prefix: /openapi/v1 + middleware: OpenAPIJWTAuth, OpenAPIPlatformGet +) + + +service PowerX { + @doc "Get the version of the API" + @handler GetVersion + get /version returns (GetVersionResponse) + + @doc "Create a new echo message" + @handler CreateEcho + post /echo (CreateEchoRequest) returns (CreateEchoResponse) +} + + +type ( + GetVersionResponse { + Version string `json:"version,optional"` + } + + + CreateEchoRequest { + Echo string `json:"echo,optional"` + } + + CreateEchoResponse { + Response string `json:"response,optional"` + } +) \ No newline at end of file diff --git a/api/powerx.api b/api/powerx.api index 37fc5cfc..7202be62 100644 --- a/api/powerx.api +++ b/api/powerx.api @@ -1,10 +1,10 @@ syntax = "v1" -info( - title: "统一接口" - desc: "统一接口" - author: "MichaelHu" - email: "matrix-x@artisan-cloud.com" +info ( + title: "统一接口" + desc: "统一接口" + author: "MichaelHu" + email: "matrix-x@artisan-cloud.com" version: "v1" ) @@ -14,19 +14,20 @@ import "admin.scrm.api" import "admin.wechat.offiaccount.api" import "mp.api" import "web.api" - -import "custom.api" +import "openapi.api" +//import "custom.api" import "plugin.api" import "health.api" service PowerX { @doc "根目录访问" @handler GetHome - get / returns (GetHomeReply) + get / returns (GetHomeReply) } type GetHomeReply { Greet string `json:"greet,optional"` Description string `json:"description,optional"` Version string `json:"version,optional"` -} \ No newline at end of file +} + diff --git a/api_group.csv b/api_group.csv index f0d4ae77..5b529e7c 100644 --- a/api_group.csv +++ b/api_group.csv @@ -423,3 +423,89 @@ web/infoorganization/category,/api/v1/web/info-organization,类别,类别 web/infoorganization/label,/api/v1/web/info-organization,框架标签,框架标签 web/infoorganization/tag,/api/v1/web/info-organization,碎片标签,碎片标签 web/scene,/api/v1/web/scene,场景活码,场景活码 +admin/auth,/api/v1/admin/auth,公开接口-登录相关,公开接口-登录相关 +admin/common,/api/v1/admin/common,通用接口,通用接口 +admin/crm/business/opportunity,/api/v1/admin/business,商机管理,商机管理 +admin/crm/customerdomain/customer,/api/v1/admin/customerdomain,客户管理,客户管理 +admin/crm/customerdomain/leader,/api/v1/admin/customerdomain,线索管理,线索管理 +admin/crm/customerdomain/registercode,/api/v1/admin/customerdomain,注册码管理,注册码管理 +admin/crm/market/brandstory,/api/v1/admin/market,品牌故事,品牌故事 +admin/crm/market/media,/api/v1/admin/market,媒体管理,媒体管理 +admin/crm/market/mgm,/api/v1/admin/market,MGMRule管理,MGMRule管理 +admin/crm/market/store,/api/v1/admin/market,门店,门店 +admin/crm/membership,/api/v1/admin/membership,会籍管理,会籍管理 +admin/crm/product/artisan,/api/v1/admin/product,元匠,元匠 +admin/crm/product/pricebook,/api/v1/admin/product,价格手册,价格手册 +admin/crm/product/pricebookentry,/api/v1/admin/product,价格手册条目,价格手册条目 +admin/crm/product,/api/v1/admin/product,产品服务,产品服务 +admin/crm/product/category,/api/v1/admin/product,产品品类,产品品类 +admin/crm/product/productspecific,/api/v1/admin/product,产品规格服务,产品规格服务 +admin/crm/product/productstatistics,/api/v1/admin/product,产品统计,产品统计 +admin/crm/product/sku,/api/v1/admin/product,SKU服务,SKU服务 +admin/crm/trade/address/billing,/api/v1/admin/trade/address,账单地址服务,账单地址服务 +admin/crm/trade/address/delivery,/api/v1/admin/trade/address,订单发货地址服务,订单发货地址服务 +admin/crm/trade/logistics,/api/v1/admin/trade,物流服务,物流服务 +admin/crm/trade/order,/api/v1/admin/trade,订单服务,订单服务 +admin/crm/trade/payment,/api/v1/admin/trade,支付单服务,支付单服务 +admin/crm/trade/order,/api/v1/admin/trade,退款单服务,退款单服务 +admin/crm/trade/address/shipping,/api/v1/admin/trade/address,收获地址服务,收获地址服务 +admin/crm/trade/token,/api/v1/admin/trade/token,代币产品,代币产品 +admin/crm/trade/warehouse,/api/v1/admin/trade,仓库服务,仓库服务 +admin/department,/api/v1/admin/department,待命名分组,待描述 +admin/dictionary,/api/v1/admin/dictionary,字典管理API,字典管理API +admin/infoorganization/category,/api/v1/admin/info-organization,类别,类别 +admin/infoorganization/label,/api/v1/admin/info-organization,框架标签,框架标签 +admin/infoorganization/tag,/api/v1/admin/info-organization,碎片标签,碎片标签 +admin/mediaresource,/api/v1/admin/media,媒资管理,媒资管理 +admin/permission,/api/v1/admin/permission,权限管理,权限管理 +admin/position,/api/v1/admin/position,待命名分组,待描述 +admin/scrm/app,/api/v1/admin/scrm/app/wechat,企业应用App,企业应用App +admin/scrm/app,/api/v1/admin/scrm/app/wechat,企业应用App,企业应用App +admin/scrm/app,/api/v1/admin/scrm/app/wechat,企业应用App,企业应用App +admin/scrm/bot,/api/v1/admin/scrm/bot/wechat,企业微信机器人,企业微信机器人 +admin/scrm/contractway,/api/v1/admin/contract-way,Contract Way Management,Contract Way Management +admin/scrm/customer,/api/v1/admin/scrm/customer/wechat,企业微信客户管理,企业微信客户管理 +admin/scrm/customer,/api/v1/admin/scrm/customer/wechat,企业微信客户管理,企业微信客户管理 +admin/scrm/customer,/api/v1/admin/scrm/customer,企业微信客户管理,企业微信客户管理 +admin/scrm/organization,/api/v1/admin/scrm/organization/wechat,企业微信部门管理,企业微信部门管理 +admin/scrm/organization,/api/v1/admin/scrm/organization/wechat,企业微信员工管理,企业微信员工管理 +admin/scrm/qrcode,/api/v1/admin/scrm/qrcode/wechat,企业微信二维码,企业微信二维码 +admin/scrm/resource,/api/v1/admin/scrm/resource/wechat,微信资源管理,微信资源管理 +admin/scrm/tag,/api/v1/admin/scrm/tag/wechat,企业微信标签管理,企业微信标签管理 +admin/tag,/api/v1/admin/tags,标签,标签 +admin/user,/api/v1/admin/user,员工管理,员工管理 +admin/userinfo,/api/v1/admin/user-center,用户中心,用户中心 +admin/wechat/officialaccount/media,/api/v1/admin/wechat/official-account,菜单管理,菜单管理 +admin/wechat/officialaccount/menu,/api/v1/admin/wechat/official-account,菜单管理,菜单管理 +system/health,/api/v1/system,健康管理,健康管理 +mp/crm/customer/auth,/api/v1/mp/customer,小程序客户模块,小程序客户模块接口集合 +mp/crm/customer,/api/v1/mp/customer,客户服务,客户服务 +mp/dictionary,/api/v1/mp/dictionary,字典管理API,字典管理API +mp/infoorganization/category,/api/v1/mp/info-organization,类别,类别 +web/infoorganization/label,/api/v1/web/info-organization,框架标签,框架标签 +web/infoorganization/tag,/api/v1/web/info-organization,碎片标签,碎片标签 +mp/crm/market/media,/api/v1/mp/market,媒资管理,媒资管理 +mp/crm/market/store,/api/v1/mp/market,小程序店铺模块,小程序店铺模块接口集合 +mp/crm/membership,/api/v1/mp/membership,会籍管理,会籍管理 +mp/crm/product/artisan,/api/v1/mp/product,元匠,元匠 +mp/crm/product,/api/v1/mp/product,小程序产品模块,小程序产品模块接口集合 +mp/crm/product,/api/v1/mp/product,产品品类,产品品类 +mp/crm/product/productstatistics,/api/v1/mp/product,产品统计,产品统计 +mp/crm/trade/address/billing,/api/v1/mp/trade/address,账单地址服务,账单地址服务 +mp/crm/trade/cart,/api/v1/mp/trade,购物车服务,购物车服务API +mp/crm/trade/address/delivery,/api/v1/mp/trade/address,订单发货地址服务,订单发货地址服务 +mp/crm/trade/logistics,/api/v1/mp/trade,物流服务,物流服务 +mp/crm/trade/order,/api/v1/mp/trade,订单服务,订单服务 +mp/crm/trade/payment,/api/v1/mp/trade,支付单服务,支付单服务 +mp/crm/trade/address/shipping,/api/v1/mp/trade/address,收获地址服务,收获地址服务 +mp/crm/trade/token,/api/v1/mp/trade/token,代币管理,代币管理 +openapi,/openapi/v1,Demo Open API,This is a demo Open API for testing purposes. +plugin,/api/v1,待命名分组,待描述 +web/customer/auth,/api/v1/web/customer,Web客户模块,Web客户模块接口集合 +web/customer/auth,/api/v1/web/customer,Web客户模块,Web客户模块接口集合 +web/customer/auth/oa,/api/v1/web/customer,公众号客户模块,公众号客户模块接口集合 +mp/dictionary,/api/v1/web/dictionary,字典管理API,字典管理API +web/infoorganization/category,/api/v1/web/info-organization,类别,类别 +web/infoorganization/label,/api/v1/web/info-organization,框架标签,框架标签 +web/infoorganization/tag,/api/v1/web/info-organization,碎片标签,碎片标签 +web/scene,/api/v1/web/scene,场景活码,场景活码 diff --git a/etc/powerx-example.yaml b/etc/powerx-example.yaml index f1491c8a..fe4efa23 100644 --- a/etc/powerx-example.yaml +++ b/etc/powerx-example.yaml @@ -31,6 +31,20 @@ JWT: MPJWTSecret: dev_mp # 小程序 JWT密钥 WebJWTSecret: dev_web # Web JWT密钥 +OpenAPI: + platforms: + # 访问PowerX OpenAPI的restful 配置 + brain_x: + access_key: "key_power_x" + secret_key: "123456789" + + providers: + # 访问BrainX OpenAPI的restful 配置 + brain_x: + base_url: "http://127.0.0.1:8000/openapi/v1" + access_key: "key_brain_x" + secret_key: '987654321' + Casbin: SelfHosted: true # 是否使用自己的Casbin服务 @@ -47,7 +61,9 @@ PowerXDatabase: RedisBase: Host: 127.0.0.1:6379 + Username: Password: + DB: 0 WechatOA: AppId: wx93607xxxxxxxxxx # 微信公众号AppID diff --git a/go.mod b/go.mod index b0003a89..a5a5da81 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module PowerX -go 1.21 +go 1.21.0 //replace github.com/ArtisanCloud/PowerWeChat/v3 => ../../../PowerWechat/PowerWeChat @@ -14,19 +14,19 @@ require ( github.com/gin-gonic/gin v1.9.0 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang-module/carbon/v2 v2.2.3 - github.com/google/uuid v1.3.1 + github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.0 github.com/kr/pretty v0.3.1 github.com/minio/minio-go/v7 v7.0.52 github.com/pkg/errors v0.9.1 github.com/robfig/cron/v3 v3.0.1 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/urfave/cli/v2 v2.11.0 - github.com/zeromicro/go-zero v1.5.6 - github.com/zeromicro/go-zero/tools/goctl v1.5.6 + github.com/zeromicro/go-zero v1.7.2 + github.com/zeromicro/go-zero/tools/goctl v1.7.2 github.com/zeromicro/zero-contrib/router/gin v0.0.0-20230708101417-16e73a5d116c - golang.org/x/crypto v0.13.0 - golang.org/x/oauth2 v0.10.0 + golang.org/x/crypto v0.26.0 + golang.org/x/oauth2 v0.22.0 gopkg.in/yaml.v3 v3.0.1 gorm.io/datatypes v1.1.1 gorm.io/driver/mysql v1.4.7 @@ -35,92 +35,91 @@ require ( ) require ( + filippo.io/edwards25519 v1.1.0 // indirect github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bytedance/sonic v1.8.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/clbanning/mxj/v2 v2.7.0 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.17.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.11.2 // indirect - github.com/go-redis/redis/v8 v8.11.5 // indirect - github.com/go-sql-driver/mysql v1.7.1 // indirect + github.com/go-sql-driver/mysql v1.8.1 // indirect github.com/goccy/go-json v0.10.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/gookit/color v1.5.4 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect - github.com/jackc/pgx/v5 v5.4.3 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/pgx/v5 v5.6.0 // indirect + github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.16.0 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.2.1 // indirect github.com/lib/pq v1.10.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/sha256-simd v1.0.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/openzipkin/zipkin-go v0.4.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/openzipkin/zipkin-go v0.4.3 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/redis/go-redis/v9 v9.1.0 // indirect - github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/prometheus/client_golang v1.20.2 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.58.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/redis/go-redis/v9 v9.6.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/xid v1.4.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.9 // indirect - github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/zeromicro/antlr v0.0.1 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/zipkin v1.14.0 // indirect - go.opentelemetry.io/otel/sdk v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect - go.opentelemetry.io/proto/otlp v0.19.0 // indirect + go.opentelemetry.io/otel v1.29.0 // indirect + go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0 // indirect + go.opentelemetry.io/otel/exporters/zipkin v1.29.0 // indirect + go.opentelemetry.io/otel/metric v1.29.0 // indirect + go.opentelemetry.io/otel/sdk v1.29.0 // indirect + go.opentelemetry.io/otel/trace v1.29.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb // indirect - google.golang.org/grpc v1.58.2 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.66.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 4ba2ade4..5eb94045 100644 --- a/go.sum +++ b/go.sum @@ -385,6 +385,8 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/ArtisanCloud/PowerLibs/v3 v3.0.16 h1:LBgAuPIkNKGh0fL/HK4HHSqWuoMIbRtfFVMHwl2cAsc= github.com/ArtisanCloud/PowerLibs/v3 v3.0.16/go.mod h1:nuUJGlLNKhBmo5nLBqJOuKD2+oDoJkWaqzxxhkLPo5s= github.com/ArtisanCloud/PowerSocialite/v3 v3.0.7 h1:P+erNlErr+X2v7Et+yTWaTfIRhw+HfpAPdvNIEwk9Gw= @@ -412,11 +414,12 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= +github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 h1:uvdUDbHQHO85qeSydJtItA4T55Pw6BtAejd0APRJOCE= +github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= github.com/alicebob/miniredis/v2 v2.30.2/go.mod h1:b25qWj4fCEsBeAAR2mlb0ufImGC6uH3VlUfb/HS5zKg= -github.com/alicebob/miniredis/v2 v2.30.5 h1:3r6kTHdKnuP4fkS8k2IrvSfxpxUTcW1SOL0wN7b7Dt0= -github.com/alicebob/miniredis/v2 v2.30.5/go.mod h1:b25qWj4fCEsBeAAR2mlb0ufImGC6uH3VlUfb/HS5zKg= +github.com/alicebob/miniredis/v2 v2.33.0 h1:uvTF0EDeu9RLnUEG27Db5I68ESoIxTiXbNUiji6lZrA= +github.com/alicebob/miniredis/v2 v2.33.0/go.mod h1:MhP4a3EU7aENRi9aO+tHfTBZicLqQevyi/DJpoj6mi0= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -429,10 +432,10 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/brianvoe/gofakeit/v6 v6.21.0 h1:tNkm9yxEbpuPK8Bx39tT4sSc5i9SUGiciLdNix+VDQY= github.com/brianvoe/gofakeit/v6 v6.21.0/go.mod h1:Ow6qC71xtwm79anlwKRlWZW6zVq9D2XHE4QSSMP/rU8= -github.com/bsm/ginkgo/v2 v2.9.5 h1:rtVBYPs3+TC5iLUVOis1B9tjLTup7Cj5IfzosKtvTJ0= -github.com/bsm/ginkgo/v2 v2.9.5/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= -github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y= -github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= @@ -440,16 +443,18 @@ github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZX github.com/casbin/casbin/v2 v2.33.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/casbin/casbin/v2 v2.60.0 h1:ZmC0/t4wolfEsDpDxTEsu2z6dfbMNpc11F52ceLs2Eo= github.com/casbin/casbin/v2 v2.60.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= @@ -476,8 +481,9 @@ github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03V github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -508,16 +514,15 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fullstorydev/grpcurl v1.8.7/go.mod h1:pVtM4qe3CMoLaIzYS8uvTuDj2jVYmXqMUkZeijnXp/E= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -540,8 +545,9 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -561,11 +567,10 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= -github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= -github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= -github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= @@ -583,8 +588,6 @@ github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -616,7 +619,6 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -669,8 +671,8 @@ github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8I github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= @@ -698,8 +700,9 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 h1:1JYBfzqrWPcCclBwxFCPAou9n+q86mfnu7NAeHfte7A= github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0/go.mod h1:YDZoGHuwE+ov0c8smSH49WLF3F2LaWnYYuDVd+EWrc0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -718,14 +721,17 @@ github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= -github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgx/v5 v5.2.0/go.mod h1:Ptn7zmohNsWEsdxRawMzk3gaKma2obW+NWTnKa0S4nk= github.com/jackc/pgx/v5 v5.3.1/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8= -github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY= -github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= +github.com/jackc/pgx/v5 v5.6.0 h1:SWJzexBzPL5jb0GEsrPMLIsi/3jOo7RHlzTjcAeDrPY= +github.com/jackc/pgx/v5 v5.6.0/go.mod h1:DNZ/vlrUnhWCoFGxHAG8U2ljioxukquj7utPDgtQdTw= github.com/jackc/puddle/v2 v2.1.2/go.mod h1:2lpufsF5mRHO6SuZkm0fNYxM6SWHfvyFj62KwNzgels= github.com/jackc/puddle/v2 v2.2.0/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= @@ -759,8 +765,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= -github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= -github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -780,6 +786,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= @@ -795,14 +803,14 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/microsoft/go-mssqldb v0.17.0 h1:Fto83dMZPnYv1Zwx5vHHxpNraeEaUlQ/hhHLgZiaenE= github.com/microsoft/go-mssqldb v0.17.0/go.mod h1:OkoNGhGEs8EZqchVTtochlXruEhEOaO4S0d2sB5aeGQ= @@ -823,6 +831,7 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -830,13 +839,11 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+ github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= @@ -858,16 +865,16 @@ github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= -github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= -github.com/openzipkin/zipkin-go v0.4.1 h1:kNd/ST2yLLWhaWrkgchya40TJabe8Hioj9udfPcEO5A= github.com/openzipkin/zipkin-go v0.4.1/go.mod h1:qY0VqDSN1pOBN94dBc6w2GJlWLiovAyg7Qt6/I9HecM= +github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg= +github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -890,21 +897,23 @@ github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrb github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg= +github.com/prometheus/client_golang v1.20.2/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.58.0 h1:N+N8vY4/23r6iYfD3UQZUoJPnUYAo7v6LG5XZxjZTXo= +github.com/prometheus/common v0.58.0/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= @@ -912,12 +921,12 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rabbitmq/amqp091-go v1.5.0/go.mod h1:JsV0ofX5f1nwOGafb8L5rBItt9GyhfQfcJj+oyz0dGg= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/redis/go-redis/v9 v9.1.0 h1:137FnGdk+EQdCbye1FW+qOEcY5S+SpY9T0NiuqvtfMY= -github.com/redis/go-redis/v9 v9.1.0/go.mod h1:urWj3He21Dj5k4TK1y59xH8Uj6ATueP8AH1cY3lZl4c= +github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4= +github.com/redis/go-redis/v9 v9.6.1/go.mod h1:0C0c6ycQsdpVNQpxb1njEQIqkx5UcsM8FJCQLgE9+RA= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= @@ -925,8 +934,9 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= @@ -949,8 +959,9 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -961,8 +972,9 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= @@ -974,8 +986,8 @@ github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= @@ -986,15 +998,16 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE= github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= +github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= +github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= github.com/zeromicro/antlr v0.0.1 h1:CQpIn/dc0pUjgGQ81y98s/NGOm2Hfru2NNio2I9mQgk= github.com/zeromicro/antlr v0.0.1/go.mod h1:nfpjEwFR6Q4xGDJMcZnCL9tEfQRgszMwu3rDz2Z+p5M= github.com/zeromicro/go-zero v1.5.2/go.mod h1:ndCd1nMMAdEMZgPfdm1fpavHUdBW0ykB6ckCRaSG10w= -github.com/zeromicro/go-zero v1.5.6 h1:vBzrLaj+xQySBAeMBA6vhPxNgasz0T3WE60s98H0Bb4= -github.com/zeromicro/go-zero v1.5.6/go.mod h1:FX2a2MQd5EvAYO7neJBm2GAmPU5XfFnj3JMM/qj+kpY= -github.com/zeromicro/go-zero/tools/goctl v1.5.6 h1:DZvUrkorZktSqDlO/CY0uH6NLy83vVr0dQJO9kOTVoM= -github.com/zeromicro/go-zero/tools/goctl v1.5.6/go.mod h1:biBOlLRw2zx63yiO3M30YlUzR3dO3kmImSjwIbbVo90= +github.com/zeromicro/go-zero v1.7.2 h1:a8lyVOG3KXG4LrAy6ZmtJTJtisX4Ostc4Pst4fE704I= +github.com/zeromicro/go-zero v1.7.2/go.mod h1:WFXfF92Exw0O7WECifS6r99JSzv4KEN49x9RhAfgkMc= +github.com/zeromicro/go-zero/tools/goctl v1.7.2 h1:8cJ0E0kdatiCyNSPPk1JceRNCtmXMHjKVDWNBVzk0c8= +github.com/zeromicro/go-zero/tools/goctl v1.7.2/go.mod h1:gD8pV/JJ7yWC5TBWUVr9P8V852EPCzfr/R2tqk84v1k= github.com/zeromicro/zero-contrib/router/gin v0.0.0-20230708101417-16e73a5d116c h1:cXVQ+uZ7TLLLwyj4dXYOJfcWTR1bzCe5Tp/FAwEozN0= github.com/zeromicro/zero-contrib/router/gin v0.0.0-20230708101417-16e73a5d116c/go.mod h1:w9haoIt+6xm7fpr8+RriEisPtVcN8KDP+QW0ILY34ik= go.etcd.io/etcd/api/v3 v3.5.8/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= @@ -1009,30 +1022,40 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/exporters/jaeger v1.14.0 h1:CjbUNd4iN2hHmWekmOqZ+zSCU+dzZppG8XsV+A3oc8Q= +go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= +go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= go.opentelemetry.io/otel/exporters/jaeger v1.14.0/go.mod h1:4Ay9kk5vELRrbg5z4cpP9EtmQRFap2Wb0woPG4lujZA= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 h1:/fXHZHGvro6MVqV34fJzDhi7sHGpX3Ej/Qjmfn003ho= +go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= +go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0/go.mod h1:UFG7EBMRdXyFstOwH028U0sVf+AvukSGhF0g8+dmNG8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 h1:TKf2uAs2ueguzLaxOCBXNpHxfO/aC7PAdDsSH0IbeRQ= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0/go.mod h1:HrbCVv40OOLTABmOn1ZWty6CHXkU8DK/Urc43tHug70= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 h1:ap+y8RXX3Mu9apKVtOkM6WSFESLM8K3wNQyOU8sWHcc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 h1:dIIDULZJpgdiHz5tXrTgKIMLkus6jEFa7x5SOKcyR7E= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0/go.mod h1:jlRVBe7+Z1wyxFSUs48L6OBQZ5JwH2Hg/Vbl+t9rAgI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0/go.mod h1:5w41DY6S9gZrbjuq6Y+753e96WfPha5IcsOSZTtullM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0 h1:3jAYbRHQAqzLjd9I4tzxwJ8Pk/N6AqBcF6m1ZHrxG94= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0 h1:nSiV3s7wiCam610XcLbYOmMfJxB9gO4uK3Xgv5gmTgg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0/go.mod h1:hKn/e/Nmd19/x1gvIHwtOwVWM+VhuITSWip3JUDghj0= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0/go.mod h1:+N7zNjIJv4K+DeX67XXET0P+eIciESgaFDBqh+ZJFS4= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 h1:sEL90JjOO/4yhquXl5zTAkLLsZ5+MycAgX99SDsxGc8= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0/go.mod h1:oCslUcizYdpKYyS9e8srZEqM6BB8fq41VJBjLAE6z1w= -go.opentelemetry.io/otel/exporters/zipkin v1.14.0 h1:reEVE1upBF9tcujgvSqLJS0SrI7JQPaTKP4s4rymnSs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 h1:JAv0Jwtl01UFiyWZEMiJZBiTlv5A50zNs8lsthXqIio= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0/go.mod h1:QNKLmUEAq2QUbPQUfvw4fmv0bgbK7UlOSFCnXyfvSNc= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0 h1:X3ZjNp36/WlkSYx0ul2jw4PtbNEDDeLskw3VPsrpYM0= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.29.0/go.mod h1:2uL/xnOXh0CHOBFCWXz5u1A4GXLiW+0IQIzVbeOEQ0U= go.opentelemetry.io/otel/exporters/zipkin v1.14.0/go.mod h1:RcjvOAcvhzcufQP8aHmzRw1gE9g/VEZufDdo2w+s4sk= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= +go.opentelemetry.io/otel/exporters/zipkin v1.29.0 h1:rqaUJdM9ItWf6DGrelaShXnJpb8rd3HTbcZWptvcsWA= +go.opentelemetry.io/otel/exporters/zipkin v1.29.0/go.mod h1:wDIyU6DjrUYqUgnmzjWnh1HOQGZCJ6YXMIJCdMc+T9Y= +go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= +go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= +go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= +go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= +go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= @@ -1040,8 +1063,9 @@ go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -1070,8 +1094,8 @@ golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1082,6 +1106,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZtfTpbJLDr/lwfgO53E= +golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1183,8 +1209,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1213,8 +1239,8 @@ golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1231,6 +1257,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1329,8 +1357,8 @@ golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1357,8 +1385,8 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1493,7 +1521,6 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1610,12 +1637,10 @@ google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614G google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= -google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= -google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb h1:Isk1sSH7bovx8Rti2wZK0UZF6oraBDK74uoyLEEVFN0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1656,8 +1681,8 @@ google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCD google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= -google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1676,8 +1701,8 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.2-0.20230222093303-bc1253ad3743/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1695,7 +1720,6 @@ gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1746,8 +1770,9 @@ k8s.io/kube-openapi v0.0.0-20230123231816-1cb3ae25d79a/go.mod h1:/BYxry62FuDzmI+ k8s.io/kube-openapi v0.0.0-20230307230338-69ee2d25a840/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/internal/config/config.go b/internal/config/config.go index c5c7bce1..a760033d 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -8,90 +8,6 @@ import ( const DriverPostgres = "postgres" const DriverMysql = "mysql" -type Database struct { - Driver string - DSN string - SeedCommerceData bool - SeedDepartment bool -} - -type RedisBase struct { - Host string - //Username string - Password string - //DB int -} - -type WeWork struct { - CropId string - AgentId int - Secret string - Token string - EncodingAESKey string - OAuth struct { - Callback string - Scopes []string - } - HttpDebug bool - Debug bool -} - -type WechatOA struct { - AppId string - Secret string - AESKey string - OAuth struct { - Callback string - Scopes []string - } - HttpDebug bool - Debug bool -} - -type WechatPay struct { - AppId string - MchId string - MchApiV3Key string - Key string - CertPath string - KeyPath string - RSAPublicKeyPath string - SerialNo string - WechatPaySerial string - NotifyUrl string - HttpDebug bool - Debug bool -} - -type WechatMP struct { - AppId string - Secret string - AESKey string - OAuth struct { - Callback string - Scopes []string - } - HttpDebug bool - Debug bool -} - -type MediaResource struct { - LocalStorage struct { - StoragePath string - } - OSS struct { - Enable bool - Minio struct { - Endpoint string - Credentials struct { - AccessKey string - SecretKey string - } - UseSSL bool - } - } -} - type Root struct { Account string Password string @@ -109,6 +25,7 @@ type Config struct { MPJWTSecret string WebJWTSecret string } + OpenAPI OpenAPI PowerXDatabase Database RedisBase RedisBase diff --git a/internal/config/database.go b/internal/config/database.go new file mode 100644 index 00000000..00e17696 --- /dev/null +++ b/internal/config/database.go @@ -0,0 +1,8 @@ +package config + +type Database struct { + Driver string + DSN string + SeedCommerceData bool + SeedDepartment bool +} diff --git a/internal/config/mediaResource.go b/internal/config/mediaResource.go new file mode 100644 index 00000000..944de3e1 --- /dev/null +++ b/internal/config/mediaResource.go @@ -0,0 +1,18 @@ +package config + +type MediaResource struct { + LocalStorage struct { + StoragePath string + } + OSS struct { + Enable bool + Minio struct { + Endpoint string + Credentials struct { + AccessKey string + SecretKey string + } + UseSSL bool + } + } +} diff --git a/internal/config/openapi.go b/internal/config/openapi.go new file mode 100644 index 00000000..8af01bbd --- /dev/null +++ b/internal/config/openapi.go @@ -0,0 +1,15 @@ +package config + +import ( + "PowerX/internal/config/openapiplatform" + "PowerX/internal/config/openapiprovider" +) + +type OpenAPI struct { + Platforms struct { + BrainX openapiplatform.BrainX + } + Providers struct { + BrainX openapiprovider.BrainX + } +} diff --git a/internal/config/openapiplatform/brainx.go b/internal/config/openapiplatform/brainx.go new file mode 100644 index 00000000..6e8d7e54 --- /dev/null +++ b/internal/config/openapiplatform/brainx.go @@ -0,0 +1,6 @@ +package openapiplatform + +type BrainX struct { + AccessKey string + SecretKey string +} diff --git a/internal/config/openapiprovider/brainx.go b/internal/config/openapiprovider/brainx.go new file mode 100644 index 00000000..cec7217d --- /dev/null +++ b/internal/config/openapiprovider/brainx.go @@ -0,0 +1,7 @@ +package openapiprovider + +type BrainX struct { + BaseUrl string + AccessKey string + SecretKey string +} diff --git a/internal/config/redis.go b/internal/config/redis.go new file mode 100644 index 00000000..e5c9a508 --- /dev/null +++ b/internal/config/redis.go @@ -0,0 +1,8 @@ +package config + +type RedisBase struct { + Host string + Username string + Password string + DB int +} diff --git a/internal/config/wechat.go b/internal/config/wechat.go new file mode 100644 index 00000000..720cfcfe --- /dev/null +++ b/internal/config/wechat.go @@ -0,0 +1,54 @@ +package config + +type WeWork struct { + CropId string + AgentId int + Secret string + Token string + EncodingAESKey string + OAuth struct { + Callback string + Scopes []string + } + HttpDebug bool + Debug bool +} + +type WechatOA struct { + AppId string + Secret string + AESKey string + OAuth struct { + Callback string + Scopes []string + } + HttpDebug bool + Debug bool +} + +type WechatPay struct { + AppId string + MchId string + MchApiV3Key string + Key string + CertPath string + KeyPath string + RSAPublicKeyPath string + SerialNo string + WechatPaySerial string + NotifyUrl string + HttpDebug bool + Debug bool +} + +type WechatMP struct { + AppId string + Secret string + AESKey string + OAuth struct { + Callback string + Scopes []string + } + HttpDebug bool + Debug bool +} diff --git a/internal/handler/openapi/auth/authplatformhandler.go b/internal/handler/openapi/auth/authplatformhandler.go new file mode 100644 index 00000000..6105a9fc --- /dev/null +++ b/internal/handler/openapi/auth/authplatformhandler.go @@ -0,0 +1,29 @@ +package auth + +import ( + "net/http" + + "PowerX/internal/logic/openapi/auth" + "PowerX/internal/svc" + "PowerX/internal/types" + "github.com/zeromicro/go-zero/rest/httpx" +) + +// Auth by platform +func AuthPlatformHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + var req types.PlatformAuthRequest + if err := httpx.Parse(r, &req); err != nil { + httpx.ErrorCtx(r.Context(), w, err) + return + } + + l := auth.NewAuthPlatformLogic(r.Context(), svcCtx) + resp, err := l.AuthPlatform(&req) + if err != nil { + httpx.ErrorCtx(r.Context(), w, err) + } else { + httpx.OkJsonCtx(r.Context(), w, resp) + } + } +} diff --git a/internal/handler/openapi/createechohandler.go b/internal/handler/openapi/createechohandler.go new file mode 100644 index 00000000..f93949eb --- /dev/null +++ b/internal/handler/openapi/createechohandler.go @@ -0,0 +1,29 @@ +package openapi + +import ( + "net/http" + + "PowerX/internal/logic/openapi" + "PowerX/internal/svc" + "PowerX/internal/types" + "github.com/zeromicro/go-zero/rest/httpx" +) + +// Create a new echo message +func CreateEchoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + var req types.CreateEchoRequest + if err := httpx.Parse(r, &req); err != nil { + httpx.ErrorCtx(r.Context(), w, err) + return + } + + l := openapi.NewCreateEchoLogic(r.Context(), svcCtx) + resp, err := l.CreateEcho(&req) + if err != nil { + httpx.ErrorCtx(r.Context(), w, err) + } else { + httpx.OkJsonCtx(r.Context(), w, resp) + } + } +} diff --git a/internal/handler/openapi/getversionhandler.go b/internal/handler/openapi/getversionhandler.go new file mode 100644 index 00000000..c38336b4 --- /dev/null +++ b/internal/handler/openapi/getversionhandler.go @@ -0,0 +1,22 @@ +package openapi + +import ( + "net/http" + + "PowerX/internal/logic/openapi" + "PowerX/internal/svc" + "github.com/zeromicro/go-zero/rest/httpx" +) + +// Get the version of the API +func GetVersionHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + l := openapi.NewGetVersionLogic(r.Context(), svcCtx) + resp, err := l.GetVersion() + if err != nil { + httpx.ErrorCtx(r.Context(), w, err) + } else { + httpx.OkJsonCtx(r.Context(), w, resp) + } + } +} diff --git a/internal/handler/routes.go b/internal/handler/routes.go index 836167fc..552067c9 100644 --- a/internal/handler/routes.go +++ b/internal/handler/routes.go @@ -1,4 +1,6 @@ // Code generated by goctl. DO NOT EDIT. +// goctl 1.7.2 + package handler import ( @@ -28,10 +30,8 @@ import ( admincrmtradeorder "PowerX/internal/handler/admin/crm/trade/order" admincrmtradepayment "PowerX/internal/handler/admin/crm/trade/payment" admincrmtradetoken "PowerX/internal/handler/admin/crm/trade/token" - admincrmtradewarehouse "PowerX/internal/handler/admin/crm/trade/warehouse" admindepartment "PowerX/internal/handler/admin/department" admindictionary "PowerX/internal/handler/admin/dictionary" - adminuser "PowerX/internal/handler/admin/user" admininfoorganizationcategory "PowerX/internal/handler/admin/infoorganization/category" adminmediaresource "PowerX/internal/handler/admin/mediaresource" adminpermission "PowerX/internal/handler/admin/permission" @@ -45,6 +45,7 @@ import ( adminscrmresource "PowerX/internal/handler/admin/scrm/resource" adminscrmtag "PowerX/internal/handler/admin/scrm/tag" admintag "PowerX/internal/handler/admin/tag" + adminuser "PowerX/internal/handler/admin/user" adminuserinfo "PowerX/internal/handler/admin/userinfo" adminwechatofficialaccountmedia "PowerX/internal/handler/admin/wechat/officialaccount/media" adminwechatofficialaccountmenu "PowerX/internal/handler/admin/wechat/officialaccount/menu" @@ -65,6 +66,8 @@ import ( mpcrmtradetoken "PowerX/internal/handler/mp/crm/trade/token" mpdictionary "PowerX/internal/handler/mp/dictionary" mpinfoorganizationcategory "PowerX/internal/handler/mp/infoorganization/category" + openapi "PowerX/internal/handler/openapi" + openapiauth "PowerX/internal/handler/openapi/auth" plugin "PowerX/internal/handler/plugin" systemhealth "PowerX/internal/handler/system/health" webcustomerauth "PowerX/internal/handler/web/customer/auth" @@ -80,6 +83,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( []rest.Route{ { + // 根目录访问 Method: http.MethodGet, Path: "/", Handler: GetHomeHandler(serverCtx), @@ -87,29 +91,51 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, ) + server.AddRoutes( + []rest.Route{ + { + // 登录 + Method: http.MethodPost, + Path: "/access/actions/basic-login", + Handler: adminauth.LoginHandler(serverCtx), + }, + { + // Exchange + Method: http.MethodPost, + Path: "/access/actions/exchange-token", + Handler: adminauth.ExchangeHandler(serverCtx), + }, + }, + rest.WithPrefix("/api/v1/admin/auth"), + ) + server.AddRoutes( rest.WithMiddlewares( []rest.Middleware{serverCtx.UserNoPermJWTAuth}, []rest.Route{ { + // 通用获取Options Method: http.MethodGet, - Path: "/options/users", - Handler: admincommon.GetUserOptionsHandler(serverCtx), + Path: "/options", + Handler: admincommon.GetOptionsHandler(serverCtx), }, { + // 部门Options远程搜索 Method: http.MethodGet, - Path: "/options/user-query", - Handler: admincommon.GetUserQueryOptionsHandler(serverCtx), + Path: "/options/departments", + Handler: admincommon.GetDepartmentOptionsHandler(serverCtx), }, { + // 查询员工过滤条件 Method: http.MethodGet, - Path: "/options/departments", - Handler: admincommon.GetDepartmentOptionsHandler(serverCtx), + Path: "/options/user-query", + Handler: admincommon.GetUserQueryOptionsHandler(serverCtx), }, { + // 员工Options远程搜索 Method: http.MethodGet, - Path: "/options", - Handler: admincommon.GetOptionsHandler(serverCtx), + Path: "/options/users", + Handler: admincommon.GetUserOptionsHandler(serverCtx), }, }..., ), @@ -121,33 +147,38 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 查询商机列表 Method: http.MethodGet, - Path: "/department-tree/:depId", - Handler: admindepartment.GetDepartmentTreeHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/departments/:id", - Handler: admindepartment.GetDepartmentHandler(serverCtx), + Path: "/opportunities", + Handler: admincrmbusinessopportunity.GetOpportunityListHandler(serverCtx), }, { + // 创建商机 Method: http.MethodPost, - Path: "/departments", - Handler: admindepartment.CreateDepartmentHandler(serverCtx), + Path: "/opportunities", + Handler: admincrmbusinessopportunity.CreateOpportunityHandler(serverCtx), }, { - Method: http.MethodPatch, - Path: "/departments/:id", - Handler: admindepartment.PatchDepartmentHandler(serverCtx), + // 修改商机信息 + Method: http.MethodPut, + Path: "/opportunities/:id", + Handler: admincrmbusinessopportunity.UpdateOpportunityHandler(serverCtx), }, { + // 删除商机 Method: http.MethodDelete, - Path: "/departments/:id", - Handler: admindepartment.DeleteDepartmentHandler(serverCtx), + Path: "/opportunities/:id", + Handler: admincrmbusinessopportunity.DeleteOpportunityHandler(serverCtx), + }, + { + // 为商机分配员工 + Method: http.MethodPut, + Path: "/opportunities/:id/assign-user", + Handler: admincrmbusinessopportunity.AssignUserToOpportunityHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/department"), + rest.WithPrefix("/api/v1/admin/business"), ) server.AddRoutes( @@ -155,33 +186,50 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 创建客户 Method: http.MethodPost, - Path: "/positions", - Handler: adminposition.CreatePositionHandler(serverCtx), + Path: "/customers", + Handler: admincrmcustomerdomaincustomer.CreateCustomerHandler(serverCtx), + }, + { + // 查询客户 + Method: http.MethodGet, + Path: "/customers/:id", + Handler: admincrmcustomerdomaincustomer.GetCustomerHandler(serverCtx), + }, + { + // 全量客户 + Method: http.MethodPut, + Path: "/customers/:id", + Handler: admincrmcustomerdomaincustomer.PutCustomerHandler(serverCtx), }, { + // 增量客户 Method: http.MethodPatch, - Path: "/positions/:id", - Handler: adminposition.PatchPositionHandler(serverCtx), + Path: "/customers/:id", + Handler: admincrmcustomerdomaincustomer.PatchCustomerHandler(serverCtx), }, { + // 删除客户 Method: http.MethodDelete, - Path: "/positions/:id", - Handler: adminposition.DeletePositionHandler(serverCtx), + Path: "/customers/:id", + Handler: admincrmcustomerdomaincustomer.DeleteCustomerHandler(serverCtx), }, { - Method: http.MethodGet, - Path: "/positions", - Handler: adminposition.ListPositionsHandler(serverCtx), + // 为客户分配员工 + Method: http.MethodPost, + Path: "/customers/:id/actions/users", + Handler: admincrmcustomerdomaincustomer.AssignCustomerToUserHandler(serverCtx), }, { + // 获取客户分页列表 Method: http.MethodGet, - Path: "/positions/:id", - Handler: adminposition.GetPositionHandler(serverCtx), + Path: "/customers/page-list", + Handler: admincrmcustomerdomaincustomer.ListCustomersPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/position"), + rest.WithPrefix("/api/v1/admin/customerdomain"), ) server.AddRoutes( @@ -189,43 +237,50 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 创建线索 Method: http.MethodPost, - Path: "/users/actions/sync", - Handler: adminuser.SyncUsersHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/users/:id", - Handler: adminuser.GetUserHandler(serverCtx), + Path: "/leads", + Handler: admincrmcustomerdomainleader.CreateLeadHandler(serverCtx), }, { + // 查询线索 Method: http.MethodGet, - Path: "/users", - Handler: adminuser.ListUsersHandler(serverCtx), + Path: "/leads/:id", + Handler: admincrmcustomerdomainleader.GetLeadHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/users", - Handler: adminuser.CreateUserHandler(serverCtx), + // 全量线索 + Method: http.MethodPut, + Path: "/leads/:id", + Handler: admincrmcustomerdomainleader.PutLeadHandler(serverCtx), }, { + // 增量线索 Method: http.MethodPatch, - Path: "/users/:id", - Handler: adminuser.UpdateUserHandler(serverCtx), + Path: "/leads/:id", + Handler: admincrmcustomerdomainleader.PatchLeadHandler(serverCtx), }, { + // 删除线索 Method: http.MethodDelete, - Path: "/users/:id", - Handler: adminuser.DeleteUserHandler(serverCtx), + Path: "/leads/:id", + Handler: admincrmcustomerdomainleader.DeleteLeadHandler(serverCtx), }, { + // 为线索分配员工 Method: http.MethodPost, - Path: "/users/actions/reset-password", - Handler: adminuser.ResetPasswordHandler(serverCtx), + Path: "/leads/:id/actions/users", + Handler: admincrmcustomerdomainleader.AssignLeadToUserHandler(serverCtx), + }, + { + // 获取线索分页列表 + Method: http.MethodGet, + Path: "/leads/page-list", + Handler: admincrmcustomerdomainleader.ListLeadsPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/user"), + rest.WithPrefix("/api/v1/admin/customerdomain"), ) server.AddRoutes( @@ -233,69 +288,50 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/roles", - Handler: adminpermission.ListRolesHandler(serverCtx), - }, - { + // 创建注册码 Method: http.MethodPost, - Path: "/roles", - Handler: adminpermission.CreateRoleHandler(serverCtx), + Path: "/register-codes", + Handler: admincrmcustomerdomainregistercode.CreateRegisterCodeHandler(serverCtx), }, { + // 查询注册码 Method: http.MethodGet, - Path: "/roles/:roleCode", - Handler: adminpermission.GetRoleHandler(serverCtx), - }, - { - Method: http.MethodPatch, - Path: "/roles/:roleCode", - Handler: adminpermission.PatchRoleHandler(serverCtx), + Path: "/register-codes/:id", + Handler: admincrmcustomerdomainregistercode.GetRegisterCodeHandler(serverCtx), }, { - Method: http.MethodGet, - Path: "/roles/:roleCode/users", - Handler: adminpermission.GetRoleUsersHandler(serverCtx), + // 全量注册码 + Method: http.MethodPut, + Path: "/register-codes/:id", + Handler: admincrmcustomerdomainregistercode.PutRegisterCodeHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/roles/:roleCode/actions/set-permissions", - Handler: adminpermission.SetRolePermissionsHandler(serverCtx), + // 增量注册码 + Method: http.MethodPatch, + Path: "/register-codes/:id", + Handler: admincrmcustomerdomainregistercode.PatchRegisterCodeHandler(serverCtx), }, { - Method: http.MethodGet, - Path: "/api-list", - Handler: adminpermission.ListAPIHandler(serverCtx), + // 删除注册码 + Method: http.MethodDelete, + Path: "/register-codes/:id", + Handler: admincrmcustomerdomainregistercode.DeleteRegisterCodeHandler(serverCtx), }, { + // 批量创建注册码 Method: http.MethodPost, - Path: "/roles/:roleCode/actions/set-users", - Handler: adminpermission.SetRoleUsersHandler(serverCtx), + Path: "/register-codes/generate", + Handler: admincrmcustomerdomainregistercode.GenerateRegisterCodeHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/users/:userId/actions/set-roles", - Handler: adminpermission.SetUserRolesHandler(serverCtx), + // 获取注册码分页列表 + Method: http.MethodGet, + Path: "/register-codes/page-list", + Handler: admincrmcustomerdomainregistercode.ListRegisterCodesPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/permission"), - ) - - server.AddRoutes( - []rest.Route{ - { - Method: http.MethodPost, - Path: "/access/actions/basic-login", - Handler: adminauth.LoginHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/access/actions/exchange-token", - Handler: adminauth.ExchangeHandler(serverCtx), - }, - }, - rest.WithPrefix("/api/v1/admin/auth"), + rest.WithPrefix("/api/v1/admin/customerdomain"), ) server.AddRoutes( @@ -303,63 +339,122 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/types/page-list", - Handler: admindictionary.ListDictionaryPageTypesHandler(serverCtx), + // 请求媒体上传链接 + Method: http.MethodPost, + Path: "/medias", + Handler: admincrmmarketmedia.CreateMediaHandler(serverCtx), + }, + { + // 创建或更新媒体 + Method: http.MethodPut, + Path: "/medias/:id", + Handler: admincrmmarketmedia.UpdateMediaHandler(serverCtx), }, { + // 根据媒体key获取媒体 Method: http.MethodGet, - Path: "/types", - Handler: admindictionary.ListDictionaryTypesHandler(serverCtx), + Path: "/medias/:id", + Handler: admincrmmarketmedia.GetMediaHandler(serverCtx), }, { + // 删除媒体 + Method: http.MethodDelete, + Path: "/medias/:id", + Handler: admincrmmarketmedia.DeleteMediaHandler(serverCtx), + }, + { + // 查询媒体列表 Method: http.MethodGet, - Path: "/types/:type", - Handler: admindictionary.GetDictionaryTypeHandler(serverCtx), + Path: "/medias/page-list", + Handler: admincrmmarketmedia.ListMediasPageHandler(serverCtx), }, + }..., + ), + rest.WithPrefix("/api/v1/admin/market"), + ) + + server.AddRoutes( + rest.WithMiddlewares( + []rest.Middleware{serverCtx.UserJWTAuth}, + []rest.Route{ { + // 请求MGMRule上传链接 Method: http.MethodPost, - Path: "/types", - Handler: admindictionary.CreateDictionaryTypeHandler(serverCtx), + Path: "/mgms", + Handler: admincrmmarketmgm.CreateMGMRuleHandler(serverCtx), }, { + // 创建或更新MGMRule Method: http.MethodPut, - Path: "/types/:type", - Handler: admindictionary.UpdateDictionaryTypeHandler(serverCtx), + Path: "/mgms/:id", + Handler: admincrmmarketmgm.UpdateMGMRuleHandler(serverCtx), }, { - Method: http.MethodDelete, - Path: "/types/:type", - Handler: admindictionary.DeleteDictionaryTypeHandler(serverCtx), + // 根据获取MGMRule + Method: http.MethodGet, + Path: "/mgms/:id", + Handler: admincrmmarketmgm.GetMGMRuleHandler(serverCtx), }, { - Method: http.MethodGet, - Path: "/items", - Handler: admindictionary.ListDictionaryItemsHandler(serverCtx), + // 删除MGMRule + Method: http.MethodDelete, + Path: "/mgms/:id", + Handler: admincrmmarketmgm.DeleteMGMRuleHandler(serverCtx), }, { + // 查询MGMRule列表 Method: http.MethodGet, - Path: "/items/:type/:key", - Handler: admindictionary.GetDictionaryItemHandler(serverCtx), + Path: "/mgms/page-list", + Handler: admincrmmarketmgm.ListMGMRulesPageHandler(serverCtx), }, + }..., + ), + rest.WithPrefix("/api/v1/admin/market"), + ) + + server.AddRoutes( + rest.WithMiddlewares( + []rest.Middleware{serverCtx.UserJWTAuth}, + []rest.Route{ { + // 创建门店 Method: http.MethodPost, - Path: "/items", - Handler: admindictionary.CreateDictionaryItemHandler(serverCtx), + Path: "/stores", + Handler: admincrmmarketstore.CreateStoreHandler(serverCtx), + }, + { + // 查询门店详情 + Method: http.MethodGet, + Path: "/stores/:id", + Handler: admincrmmarketstore.GetStoreHandler(serverCtx), }, { + // 全量门店 Method: http.MethodPut, - Path: "/items/:type/:key", - Handler: admindictionary.UpdateDictionaryItemHandler(serverCtx), + Path: "/stores/:id", + Handler: admincrmmarketstore.PutStoreHandler(serverCtx), }, { + // 删除门店 Method: http.MethodDelete, - Path: "/items/:type/:key", - Handler: admindictionary.DeleteDictionaryItemHandler(serverCtx), + Path: "/stores/:id", + Handler: admincrmmarketstore.DeleteStoreHandler(serverCtx), + }, + { + // 分配门店经理给门店 + Method: http.MethodPost, + Path: "/stores/:id/actions/assign-to-store-categroy", + Handler: admincrmmarketstore.AssignStoreToStoreManagerHandler(serverCtx), + }, + { + // 查询门店列表 + Method: http.MethodGet, + Path: "/stores/page-list", + Handler: admincrmmarketstore.ListStoresPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/dictionary"), + rest.WithPrefix("/api/v1/admin/market"), ) server.AddRoutes( @@ -367,23 +462,14 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 查询会籍 Method: http.MethodGet, - Path: "/user-info", - Handler: adminuserinfo.GetUserInfoHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/menu-roles", - Handler: adminuserinfo.GetMenuRolesHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/users/actions/modify-password", - Handler: adminuserinfo.ModifyUserPasswordHandler(serverCtx), + Path: "/customers/:id", + Handler: admincrmmembership.GetCustomerHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/user-center"), + rest.WithPrefix("/api/v1/admin/membership"), ) server.AddRoutes( @@ -391,38 +477,56 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/tag-tree", - Handler: admintag.ListTagTreeHandler(serverCtx), + // 创建产品 + Method: http.MethodPost, + Path: "/products", + Handler: admincrmproduct.CreateProductHandler(serverCtx), }, { + // 查询产品详情 Method: http.MethodGet, - Path: "/:id", - Handler: admintag.GetTagHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/", - Handler: admintag.CreateTagHandler(serverCtx), + Path: "/products/:id", + Handler: admincrmproduct.GetProductHandler(serverCtx), }, { + // 全量产品 Method: http.MethodPut, - Path: "/:id", - Handler: admintag.UpdateTagHandler(serverCtx), + Path: "/products/:id", + Handler: admincrmproduct.PutProductHandler(serverCtx), }, { + // 增量产品 Method: http.MethodPatch, - Path: "/:id", - Handler: admintag.PatchTagHandler(serverCtx), + Path: "/products/:id", + Handler: admincrmproduct.PatchProductHandler(serverCtx), }, { + // 删除产品 Method: http.MethodDelete, - Path: "/:id", - Handler: admintag.DeleteTagHandler(serverCtx), + Path: "/products/:id", + Handler: admincrmproduct.DeleteProductHandler(serverCtx), + }, + { + // 分配产品品类给产品品类分类 + Method: http.MethodPost, + Path: "/products/:id/actions/assign-to-product-categroy", + Handler: admincrmproduct.AssignProductToProductCategoryHandler(serverCtx), + }, + { + // 下架产品 + Method: http.MethodPut, + Path: "/products/disable/:id", + Handler: admincrmproduct.DisableProductHandler(serverCtx), + }, + { + // 查询产品列表 + Method: http.MethodGet, + Path: "/products/page-list", + Handler: admincrmproduct.ListProductsPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/tags"), + rest.WithPrefix("/api/v1/admin/product"), ) server.AddRoutes( @@ -430,38 +534,44 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/category-tree", - Handler: admininfoorganizationcategory.ListCategoryTreeHandler(serverCtx), + // 创建元匠 + Method: http.MethodPost, + Path: "/artisans", + Handler: admincrmproductartisan.CreateArtisanHandler(serverCtx), }, { + // 查询元匠详情 Method: http.MethodGet, - Path: "/categories/:id", - Handler: admininfoorganizationcategory.GetCategoryHandler(serverCtx), + Path: "/artisans/:id", + Handler: admincrmproductartisan.GetArtisanHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/categories", - Handler: admininfoorganizationcategory.CreateCategoryHandler(serverCtx), + // 全量元匠 + Method: http.MethodPut, + Path: "/artisans/:id", + Handler: admincrmproductartisan.PutArtisanHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/categories/:id", - Handler: admininfoorganizationcategory.UpdateCategoryHandler(serverCtx), + // 删除元匠 + Method: http.MethodDelete, + Path: "/artisans/:id", + Handler: admincrmproductartisan.DeleteArtisanHandler(serverCtx), }, { - Method: http.MethodPatch, - Path: "/categories/:id", - Handler: admininfoorganizationcategory.PatchCategoryHandler(serverCtx), + // 元匠绑定门店 + Method: http.MethodPost, + Path: "/artisans/bind/stores", + Handler: admincrmproductartisan.BindArtisanToStoreHandler(serverCtx), }, { - Method: http.MethodDelete, - Path: "/categories/:id", - Handler: admininfoorganizationcategory.DeleteCategoryHandler(serverCtx), + // 查询元匠列表 + Method: http.MethodGet, + Path: "/artisans/page-list", + Handler: admincrmproductartisan.ListArtisansPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/info-organization"), + rest.WithPrefix("/api/v1/admin/product"), ) server.AddRoutes( @@ -469,43 +579,44 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/leads/:id", - Handler: admincrmcustomerdomainleader.GetLeadHandler(serverCtx), + // 创新产品品类 + Method: http.MethodPost, + Path: "/product-categories", + Handler: admincrmproductcategory.CreateProductCategoryHandler(serverCtx), }, { + // 查询产品品类详情 Method: http.MethodGet, - Path: "/leads/page-list", - Handler: admincrmcustomerdomainleader.ListLeadsPageHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/leads", - Handler: admincrmcustomerdomainleader.CreateLeadHandler(serverCtx), + Path: "/product-categories/:id", + Handler: admincrmproductcategory.GetProductCategoryHandler(serverCtx), }, { + // 修改产品品类 Method: http.MethodPut, - Path: "/leads/:id", - Handler: admincrmcustomerdomainleader.PutLeadHandler(serverCtx), + Path: "/product-categories/:id", + Handler: admincrmproductcategory.UpdateProductCategoryHandler(serverCtx), }, { + // 修改产品品类父级 Method: http.MethodPatch, - Path: "/leads/:id", - Handler: admincrmcustomerdomainleader.PatchLeadHandler(serverCtx), + Path: "/product-categories/:id", + Handler: admincrmproductcategory.PatchProductCategoryHandler(serverCtx), }, { + // 删除产品品类 Method: http.MethodDelete, - Path: "/leads/:id", - Handler: admincrmcustomerdomainleader.DeleteLeadHandler(serverCtx), + Path: "/product-categories/:id", + Handler: admincrmproductcategory.DeleteProductCategoryHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/leads/:id/actions/users", - Handler: admincrmcustomerdomainleader.AssignLeadToUserHandler(serverCtx), + // 查询产品品类列表 + Method: http.MethodGet, + Path: "/product-category-tree", + Handler: admincrmproductcategory.ListProductCategoryTreeHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/customerdomain"), + rest.WithPrefix("/api/v1/admin/product"), ) server.AddRoutes( @@ -513,43 +624,32 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/customers/:id", - Handler: admincrmcustomerdomaincustomer.GetCustomerHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/customers/page-list", - Handler: admincrmcustomerdomaincustomer.ListCustomersPageHandler(serverCtx), - }, - { + // 创新价格手册 Method: http.MethodPost, - Path: "/customers", - Handler: admincrmcustomerdomaincustomer.CreateCustomerHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/customers/:id", - Handler: admincrmcustomerdomaincustomer.PutCustomerHandler(serverCtx), + Path: "/price-books", + Handler: admincrmproductpricebook.UpsertPriceBookHandler(serverCtx), }, { - Method: http.MethodPatch, - Path: "/customers/:id", - Handler: admincrmcustomerdomaincustomer.PatchCustomerHandler(serverCtx), + // 查询价格手册详情 + Method: http.MethodGet, + Path: "/price-books/:id", + Handler: admincrmproductpricebook.GetPriceBookHandler(serverCtx), }, { + // 删除价格手册 Method: http.MethodDelete, - Path: "/customers/:id", - Handler: admincrmcustomerdomaincustomer.DeleteCustomerHandler(serverCtx), + Path: "/price-books/:id", + Handler: admincrmproductpricebook.DeletePriceBookHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/customers/:id/actions/users", - Handler: admincrmcustomerdomaincustomer.AssignCustomerToUserHandler(serverCtx), + // 查询价格手册列表 + Method: http.MethodGet, + Path: "/price-books/page-list", + Handler: admincrmproductpricebook.ListPriceBooksHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/customerdomain"), + rest.WithPrefix("/api/v1/admin/product"), ) server.AddRoutes( @@ -557,43 +657,38 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 查询价格手册条目详情 Method: http.MethodGet, - Path: "/register-codes/:id", - Handler: admincrmcustomerdomainregistercode.GetRegisterCodeHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/register-codes/page-list", - Handler: admincrmcustomerdomainregistercode.ListRegisterCodesPageHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/register-codes", - Handler: admincrmcustomerdomainregistercode.CreateRegisterCodeHandler(serverCtx), + Path: "/price-book-entries/:id", + Handler: admincrmproductpricebookentry.GetPriceBookEntryHandler(serverCtx), }, { + // 配置价格手册条目条目 Method: http.MethodPost, - Path: "/register-codes/generate", - Handler: admincrmcustomerdomainregistercode.GenerateRegisterCodeHandler(serverCtx), + Path: "/price-book-entries/:id", + Handler: admincrmproductpricebookentry.UpdatePriceBookEntryHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/register-codes/:id", - Handler: admincrmcustomerdomainregistercode.PutRegisterCodeHandler(serverCtx), + // 删除价格手册条目 + Method: http.MethodDelete, + Path: "/price-book-entries/:id", + Handler: admincrmproductpricebookentry.DeletePriceBookEntryHandler(serverCtx), }, { - Method: http.MethodPatch, - Path: "/register-codes/:id", - Handler: admincrmcustomerdomainregistercode.PatchRegisterCodeHandler(serverCtx), + // 配置价格手册条目条目 + Method: http.MethodPost, + Path: "/price-book-entries/config", + Handler: admincrmproductpricebookentry.ConfigPriceBookEntryHandler(serverCtx), }, { - Method: http.MethodDelete, - Path: "/register-codes/:id", - Handler: admincrmcustomerdomainregistercode.DeleteRegisterCodeHandler(serverCtx), + // 查询价格手册条目列表 + Method: http.MethodGet, + Path: "/price-book-entries/page-list", + Handler: admincrmproductpricebookentry.ListPriceBookEntriesHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/customerdomain"), + rest.WithPrefix("/api/v1/admin/product"), ) server.AddRoutes( @@ -601,13 +696,50 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 创建产品规格 + Method: http.MethodPost, + Path: "/product-specifics", + Handler: admincrmproductproductspecific.CreateProductSpecificHandler(serverCtx), + }, + { + // 查询产品规格详情 Method: http.MethodGet, - Path: "/customers/:id", - Handler: admincrmmembership.GetCustomerHandler(serverCtx), + Path: "/product-specifics/:id", + Handler: admincrmproductproductspecific.GetProductSpecificHandler(serverCtx), }, - }..., + { + // 全量产品规格 + Method: http.MethodPut, + Path: "/product-specifics/:id", + Handler: admincrmproductproductspecific.PutProductSpecificHandler(serverCtx), + }, + { + // 增量产品规格 + Method: http.MethodPatch, + Path: "/product-specifics/:id", + Handler: admincrmproductproductspecific.PatchProductSpecificHandler(serverCtx), + }, + { + // 删除产品规格 + Method: http.MethodDelete, + Path: "/product-specifics/:id", + Handler: admincrmproductproductspecific.DeleteProductSpecificHandler(serverCtx), + }, + { + // 配置产品规格 + Method: http.MethodPost, + Path: "/product-specifics/config", + Handler: admincrmproductproductspecific.ConfigProductSpecificHandler(serverCtx), + }, + { + // 查询产品规格列表 + Method: http.MethodGet, + Path: "/product-specifics/page-list", + Handler: admincrmproductproductspecific.ListProductSpecificPageHandler(serverCtx), + }, + }..., ), - rest.WithPrefix("/api/v1/admin/membership"), + rest.WithPrefix("/api/v1/admin/product"), ) server.AddRoutes( @@ -615,33 +747,38 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 查询产品统计详情 Method: http.MethodGet, - Path: "/medias/page-list", - Handler: admincrmmarketmedia.ListMediasPageHandler(serverCtx), + Path: "/product-statistics/:id", + Handler: admincrmproductproductstatistics.GetProductStatisticsHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/medias", - Handler: admincrmmarketmedia.CreateMediaHandler(serverCtx), + // 全量产品统计 + Method: http.MethodPut, + Path: "/product-statistics/:id", + Handler: admincrmproductproductstatistics.PutProductStatisticsHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/medias/:id", - Handler: admincrmmarketmedia.UpdateMediaHandler(serverCtx), + // 增量产品统计 + Method: http.MethodPatch, + Path: "/product-statistics/:id", + Handler: admincrmproductproductstatistics.PatchProductStatisticsHandler(serverCtx), }, { - Method: http.MethodGet, - Path: "/medias/:id", - Handler: admincrmmarketmedia.GetMediaHandler(serverCtx), + // 配置产品统计 + Method: http.MethodPost, + Path: "/product-statistics/config", + Handler: admincrmproductproductstatistics.ConfigProductStatisticsHandler(serverCtx), }, { - Method: http.MethodDelete, - Path: "/medias/:id", - Handler: admincrmmarketmedia.DeleteMediaHandler(serverCtx), + // 查询产品统计列表 + Method: http.MethodGet, + Path: "/product-statistics/page-list", + Handler: admincrmproductproductstatistics.ListProductStatisticsPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/market"), + rest.WithPrefix("/api/v1/admin/product"), ) server.AddRoutes( @@ -649,38 +786,50 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/stores/page-list", - Handler: admincrmmarketstore.ListStoresPageHandler(serverCtx), + // 创建SKU + Method: http.MethodPost, + Path: "/skus", + Handler: admincrmproductsku.CreateSKUHandler(serverCtx), }, { + // 查询SKU详情 Method: http.MethodGet, - Path: "/stores/:id", - Handler: admincrmmarketstore.GetStoreHandler(serverCtx), + Path: "/skus/:id", + Handler: admincrmproductsku.GetSKUHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/stores", - Handler: admincrmmarketstore.CreateStoreHandler(serverCtx), + // 全量SKU + Method: http.MethodPut, + Path: "/skus/:id", + Handler: admincrmproductsku.PutSKUHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/stores/:id", - Handler: admincrmmarketstore.PutStoreHandler(serverCtx), + // 增量SKU + Method: http.MethodPatch, + Path: "/skus/:id", + Handler: admincrmproductsku.PatchSKUHandler(serverCtx), }, { + // 删除SKU Method: http.MethodDelete, - Path: "/stores/:id", - Handler: admincrmmarketstore.DeleteStoreHandler(serverCtx), + Path: "/skus/:id", + Handler: admincrmproductsku.DeleteSKUHandler(serverCtx), }, { + // 配置SKU Method: http.MethodPost, - Path: "/stores/:id/actions/assign-to-store-categroy", - Handler: admincrmmarketstore.AssignStoreToStoreManagerHandler(serverCtx), + Path: "/skus/config", + Handler: admincrmproductsku.ConfigSKUHandler(serverCtx), + }, + { + // 查询SKU列表 + Method: http.MethodGet, + Path: "/skus/page-list", + Handler: admincrmproductsku.ListSKUPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/market"), + rest.WithPrefix("/api/v1/admin/product"), ) server.AddRoutes( @@ -688,33 +837,44 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/mgms/page-list", - Handler: admincrmmarketmgm.ListMGMRulesPageHandler(serverCtx), + // 创建账单地址 + Method: http.MethodPost, + Path: "/billing", + Handler: admincrmtradeaddressbilling.CreateBillingAddressHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/mgms", - Handler: admincrmmarketmgm.CreateMGMRuleHandler(serverCtx), + // 查询账单地址详情 + Method: http.MethodGet, + Path: "/billing/:id", + Handler: admincrmtradeaddressbilling.GetBillingAddressHandler(serverCtx), }, { + // 更新账单地址 Method: http.MethodPut, - Path: "/mgms/:id", - Handler: admincrmmarketmgm.UpdateMGMRuleHandler(serverCtx), + Path: "/billing/:id", + Handler: admincrmtradeaddressbilling.PutBillingAddressHandler(serverCtx), }, { - Method: http.MethodGet, - Path: "/mgms/:id", - Handler: admincrmmarketmgm.GetMGMRuleHandler(serverCtx), + // 部分更新账单地址 + Method: http.MethodPatch, + Path: "/billing/:id", + Handler: admincrmtradeaddressbilling.PatchBillingAddressHandler(serverCtx), }, { + // 删除账单地址 Method: http.MethodDelete, - Path: "/mgms/:id", - Handler: admincrmmarketmgm.DeleteMGMRuleHandler(serverCtx), + Path: "/billing/:id", + Handler: admincrmtradeaddressbilling.DeleteBillingAddressHandler(serverCtx), + }, + { + // 查询账单地址列表 + Method: http.MethodGet, + Path: "/billing/page-list", + Handler: admincrmtradeaddressbilling.ListBillingAddressesPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/market"), + rest.WithPrefix("/api/v1/admin/trade/address"), ) server.AddRoutes( @@ -722,33 +882,44 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/opportunities", - Handler: admincrmbusinessopportunity.GetOpportunityListHandler(serverCtx), + // 创建订单发货地址 + Method: http.MethodPost, + Path: "/delivery", + Handler: admincrmtradeaddressdelivery.CreateDeliveryAddressHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/opportunities", - Handler: admincrmbusinessopportunity.CreateOpportunityHandler(serverCtx), + // 查询订单发货地址详情 + Method: http.MethodGet, + Path: "/delivery/:id", + Handler: admincrmtradeaddressdelivery.GetDeliveryAddressHandler(serverCtx), }, { + // 更新订单发货地址 Method: http.MethodPut, - Path: "/opportunities/:id/assign-user", - Handler: admincrmbusinessopportunity.AssignUserToOpportunityHandler(serverCtx), + Path: "/delivery/:id", + Handler: admincrmtradeaddressdelivery.PutDeliveryAddressHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/opportunities/:id", - Handler: admincrmbusinessopportunity.UpdateOpportunityHandler(serverCtx), + // 部分更新订单发货地址 + Method: http.MethodPatch, + Path: "/delivery/:id", + Handler: admincrmtradeaddressdelivery.PatchDeliveryAddressHandler(serverCtx), }, { + // 删除订单发货地址 Method: http.MethodDelete, - Path: "/opportunities/:id", - Handler: admincrmbusinessopportunity.DeleteOpportunityHandler(serverCtx), + Path: "/delivery/:id", + Handler: admincrmtradeaddressdelivery.DeleteDeliveryAddressHandler(serverCtx), + }, + { + // 查询订单发货地址列表 + Method: http.MethodGet, + Path: "/delivery/page-list", + Handler: admincrmtradeaddressdelivery.ListDeliveryAddressesPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/business"), + rest.WithPrefix("/api/v1/admin/trade/address"), ) server.AddRoutes( @@ -756,28 +927,44 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/price-books/page-list", - Handler: admincrmproductpricebook.ListPriceBooksHandler(serverCtx), + // 创建收货地址 + Method: http.MethodPost, + Path: "/shipping", + Handler: admincrmtradeaddressshipping.CreateShippingAddressHandler(serverCtx), }, { + // 查询收货地址详情 Method: http.MethodGet, - Path: "/price-books/:id", - Handler: admincrmproductpricebook.GetPriceBookHandler(serverCtx), + Path: "/shipping/:id", + Handler: admincrmtradeaddressshipping.GetShippingAddressHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/price-books", - Handler: admincrmproductpricebook.UpsertPriceBookHandler(serverCtx), + // 更新收货地址 + Method: http.MethodPut, + Path: "/shipping/:id", + Handler: admincrmtradeaddressshipping.PutShippingAddressHandler(serverCtx), + }, + { + // 部分更新收货地址 + Method: http.MethodPatch, + Path: "/shipping/:id", + Handler: admincrmtradeaddressshipping.PatchShippingAddressHandler(serverCtx), }, { + // 删除收货地址 Method: http.MethodDelete, - Path: "/price-books/:id", - Handler: admincrmproductpricebook.DeletePriceBookHandler(serverCtx), + Path: "/shipping/:id", + Handler: admincrmtradeaddressshipping.DeleteShippingAddressHandler(serverCtx), + }, + { + // 查询收货地址列表 + Method: http.MethodGet, + Path: "/shipping/page-list", + Handler: admincrmtradeaddressshipping.ListShippingAddressesPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/product"), + rest.WithPrefix("/api/v1/admin/trade/address"), ) server.AddRoutes( @@ -785,48 +972,56 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/products/page-list", - Handler: admincrmproduct.ListProductsPageHandler(serverCtx), + // 创建订单 + Method: http.MethodPost, + Path: "/orders", + Handler: admincrmtradeorder.CreateOrderHandler(serverCtx), }, { + // 查询订单详情 Method: http.MethodGet, - Path: "/products/:id", - Handler: admincrmproduct.GetProductHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/products", - Handler: admincrmproduct.CreateProductHandler(serverCtx), + Path: "/orders/:id", + Handler: admincrmtradeorder.GetOrderHandler(serverCtx), }, { + // 更新订单 Method: http.MethodPut, - Path: "/products/:id", - Handler: admincrmproduct.PutProductHandler(serverCtx), + Path: "/orders/:id", + Handler: admincrmtradeorder.PutOrderHandler(serverCtx), }, { + // 部分更新订单 Method: http.MethodPatch, - Path: "/products/:id", - Handler: admincrmproduct.PatchProductHandler(serverCtx), + Path: "/orders/:id", + Handler: admincrmtradeorder.PatchOrderHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/products/disable/:id", - Handler: admincrmproduct.DisableProductHandler(serverCtx), + // 删除订单 + Method: http.MethodDelete, + Path: "/orders/:id", + Handler: admincrmtradeorder.DeleteOrderHandler(serverCtx), }, { - Method: http.MethodDelete, - Path: "/products/:id", - Handler: admincrmproduct.DeleteProductHandler(serverCtx), + // 导出订单 + Method: http.MethodGet, + Path: "/orders/export", + Handler: admincrmtradeorder.ExportOrdersHandler(serverCtx), }, { + // 导入订单 Method: http.MethodPost, - Path: "/products/:id/actions/assign-to-product-categroy", - Handler: admincrmproduct.AssignProductToProductCategoryHandler(serverCtx), + Path: "/orders/import", + Handler: admincrmtradeorder.ImportOrdersHandler(serverCtx), + }, + { + // 查询订单列表 + Method: http.MethodGet, + Path: "/orders/page-list", + Handler: admincrmtradeorder.ListOrdersPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/product"), + rest.WithPrefix("/api/v1/admin/trade"), ) server.AddRoutes( @@ -834,33 +1029,44 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/resources/page-list", - Handler: adminmediaresource.ListMediaResourcesHandler(serverCtx), - }, - { + // 创建支付单 Method: http.MethodPost, - Path: "/resources", - Handler: adminmediaresource.CreateMediaResourceHandler(serverCtx), + Path: "/payments", + Handler: admincrmtradepayment.CreatePaymentHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/resources/base64", - Handler: adminmediaresource.CreateMediaResourceByBase64Handler(serverCtx), + // 查询支付单详情 + Method: http.MethodGet, + Path: "/payments/:id", + Handler: admincrmtradepayment.GetPaymentHandler(serverCtx), }, { - Method: http.MethodGet, - Path: "/resources/:id", - Handler: adminmediaresource.GetMediaResourceHandler(serverCtx), + // 全量支付单 + Method: http.MethodPut, + Path: "/payments/:id", + Handler: admincrmtradepayment.PutPaymentHandler(serverCtx), + }, + { + // 增量支付单 + Method: http.MethodPatch, + Path: "/payments/:id", + Handler: admincrmtradepayment.PatchPaymentHandler(serverCtx), }, { + // 删除支付单 Method: http.MethodDelete, - Path: "/resources/:id", - Handler: adminmediaresource.DeleteMediaResourceHandler(serverCtx), + Path: "/payments/:id", + Handler: admincrmtradepayment.DeletePaymentHandler(serverCtx), + }, + { + // 查询支付单列表 + Method: http.MethodGet, + Path: "/payments/page-list", + Handler: admincrmtradepayment.ListPaymentsPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/media"), + rest.WithPrefix("/api/v1/admin/trade"), ) server.AddRoutes( @@ -868,38 +1074,44 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/product-category-tree", - Handler: admincrmproductcategory.ListProductCategoryTreeHandler(serverCtx), + // 创建代币产品 + Method: http.MethodPost, + Path: "/products", + Handler: admincrmtradetoken.CreateTokenProductHandler(serverCtx), }, { + // 查询代币产品详情 Method: http.MethodGet, - Path: "/product-categories/:id", - Handler: admincrmproductcategory.GetProductCategoryHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/product-categories", - Handler: admincrmproductcategory.CreateProductCategoryHandler(serverCtx), + Path: "/products/:id", + Handler: admincrmtradetoken.GetTokenProductHandler(serverCtx), }, { + // 全量代币产品 Method: http.MethodPut, - Path: "/product-categories/:id", - Handler: admincrmproductcategory.UpdateProductCategoryHandler(serverCtx), + Path: "/products/:id", + Handler: admincrmtradetoken.PutTokenProductHandler(serverCtx), }, { + // 增量代币产品 Method: http.MethodPatch, - Path: "/product-categories/:id", - Handler: admincrmproductcategory.PatchProductCategoryHandler(serverCtx), + Path: "/products/:id", + Handler: admincrmtradetoken.PatchTokenProductHandler(serverCtx), }, { + // 删除代币产品 Method: http.MethodDelete, - Path: "/product-categories/:id", - Handler: admincrmproductcategory.DeleteProductCategoryHandler(serverCtx), + Path: "/products/:id", + Handler: admincrmtradetoken.DeleteTokenProductHandler(serverCtx), + }, + { + // 查询代币产品列表 + Method: http.MethodGet, + Path: "/products/page-list", + Handler: admincrmtradetoken.ListTokenProductsPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/product"), + rest.WithPrefix("/api/v1/admin/trade/token"), ) server.AddRoutes( @@ -907,43 +1119,38 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 查询组织架构 Method: http.MethodGet, - Path: "/product-specifics/page-list", - Handler: admincrmproductproductspecific.ListProductSpecificPageHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/product-specifics/:id", - Handler: admincrmproductproductspecific.GetProductSpecificHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/product-specifics", - Handler: admincrmproductproductspecific.CreateProductSpecificHandler(serverCtx), + Path: "/department-tree/:depId", + Handler: admindepartment.GetDepartmentTreeHandler(serverCtx), }, { + // 创建新部门 Method: http.MethodPost, - Path: "/product-specifics/config", - Handler: admincrmproductproductspecific.ConfigProductSpecificHandler(serverCtx), + Path: "/departments", + Handler: admindepartment.CreateDepartmentHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/product-specifics/:id", - Handler: admincrmproductproductspecific.PutProductSpecificHandler(serverCtx), + // 获取单个部门详情 + Method: http.MethodGet, + Path: "/departments/:id", + Handler: admindepartment.GetDepartmentHandler(serverCtx), }, { + // 更新部门信息(可选更新) Method: http.MethodPatch, - Path: "/product-specifics/:id", - Handler: admincrmproductproductspecific.PatchProductSpecificHandler(serverCtx), + Path: "/departments/:id", + Handler: admindepartment.PatchDepartmentHandler(serverCtx), }, { + // 删除部门 Method: http.MethodDelete, - Path: "/product-specifics/:id", - Handler: admincrmproductproductspecific.DeleteProductSpecificHandler(serverCtx), + Path: "/departments/:id", + Handler: admindepartment.DeleteDepartmentHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/product"), + rest.WithPrefix("/api/v1/admin/department"), ) server.AddRoutes( @@ -951,77 +1158,74 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 获取字典项列表 Method: http.MethodGet, - Path: "/skus/page-list", - Handler: admincrmproductsku.ListSKUPageHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/skus/:id", - Handler: admincrmproductsku.GetSKUHandler(serverCtx), + Path: "/items", + Handler: admindictionary.ListDictionaryItemsHandler(serverCtx), }, { + // 创建字典项 Method: http.MethodPost, - Path: "/skus", - Handler: admincrmproductsku.CreateSKUHandler(serverCtx), + Path: "/items", + Handler: admindictionary.CreateDictionaryItemHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/skus/config", - Handler: admincrmproductsku.ConfigSKUHandler(serverCtx), + // 获取字典项 + Method: http.MethodGet, + Path: "/items/:type/:key", + Handler: admindictionary.GetDictionaryItemHandler(serverCtx), }, { + // 更新字典项 Method: http.MethodPut, - Path: "/skus/:id", - Handler: admincrmproductsku.PutSKUHandler(serverCtx), - }, - { - Method: http.MethodPatch, - Path: "/skus/:id", - Handler: admincrmproductsku.PatchSKUHandler(serverCtx), + Path: "/items/:type/:key", + Handler: admindictionary.UpdateDictionaryItemHandler(serverCtx), }, { + // 删除字典项 Method: http.MethodDelete, - Path: "/skus/:id", - Handler: admincrmproductsku.DeleteSKUHandler(serverCtx), + Path: "/items/:type/:key", + Handler: admindictionary.DeleteDictionaryItemHandler(serverCtx), }, - }..., - ), - rest.WithPrefix("/api/v1/admin/product"), - ) - - server.AddRoutes( - rest.WithMiddlewares( - []rest.Middleware{serverCtx.UserJWTAuth}, - []rest.Route{ { + // 获取字典类型列表 Method: http.MethodGet, - Path: "/price-book-entries/page-list", - Handler: admincrmproductpricebookentry.ListPriceBookEntriesHandler(serverCtx), + Path: "/types", + Handler: admindictionary.ListDictionaryTypesHandler(serverCtx), }, { - Method: http.MethodGet, - Path: "/price-book-entries/:id", - Handler: admincrmproductpricebookentry.GetPriceBookEntryHandler(serverCtx), + // 创建字典类型 + Method: http.MethodPost, + Path: "/types", + Handler: admindictionary.CreateDictionaryTypeHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/price-book-entries/config", - Handler: admincrmproductpricebookentry.ConfigPriceBookEntryHandler(serverCtx), + // 获取字典类型 + Method: http.MethodGet, + Path: "/types/:type", + Handler: admindictionary.GetDictionaryTypeHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/price-book-entries/:id", - Handler: admincrmproductpricebookentry.UpdatePriceBookEntryHandler(serverCtx), + // 更新字典类型 + Method: http.MethodPut, + Path: "/types/:type", + Handler: admindictionary.UpdateDictionaryTypeHandler(serverCtx), }, { + // 删除字典类型 Method: http.MethodDelete, - Path: "/price-book-entries/:id", - Handler: admincrmproductpricebookentry.DeletePriceBookEntryHandler(serverCtx), + Path: "/types/:type", + Handler: admindictionary.DeleteDictionaryTypeHandler(serverCtx), + }, + { + // 获取字典类型列表 + Method: http.MethodGet, + Path: "/types/page-list", + Handler: admindictionary.ListDictionaryPageTypesHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/product"), + rest.WithPrefix("/api/v1/admin/dictionary"), ) server.AddRoutes( @@ -1029,38 +1233,44 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/artisans/page-list", - Handler: admincrmproductartisan.ListArtisansPageHandler(serverCtx), + // 创新类别 + Method: http.MethodPost, + Path: "/categories", + Handler: admininfoorganizationcategory.CreateCategoryHandler(serverCtx), }, { + // 查询类别详情 Method: http.MethodGet, - Path: "/artisans/:id", - Handler: admincrmproductartisan.GetArtisanHandler(serverCtx), + Path: "/categories/:id", + Handler: admininfoorganizationcategory.GetCategoryHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/artisans", - Handler: admincrmproductartisan.CreateArtisanHandler(serverCtx), + // 修改类别 + Method: http.MethodPut, + Path: "/categories/:id", + Handler: admininfoorganizationcategory.UpdateCategoryHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/artisans/:id", - Handler: admincrmproductartisan.PutArtisanHandler(serverCtx), + // 修改类别父级 + Method: http.MethodPatch, + Path: "/categories/:id", + Handler: admininfoorganizationcategory.PatchCategoryHandler(serverCtx), }, { + // 删除类别 Method: http.MethodDelete, - Path: "/artisans/:id", - Handler: admincrmproductartisan.DeleteArtisanHandler(serverCtx), + Path: "/categories/:id", + Handler: admininfoorganizationcategory.DeleteCategoryHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/artisans/bind/stores", - Handler: admincrmproductartisan.BindArtisanToStoreHandler(serverCtx), + // 查询类别列表 + Method: http.MethodGet, + Path: "/category-tree", + Handler: admininfoorganizationcategory.ListCategoryTreeHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/product"), + rest.WithPrefix("/api/v1/admin/info-organization"), ) server.AddRoutes( @@ -1068,38 +1278,38 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/products/page-list", - Handler: admincrmtradetoken.ListTokenProductsPageHandler(serverCtx), + // 创建媒资 + Method: http.MethodPost, + Path: "/resources", + Handler: adminmediaresource.CreateMediaResourceHandler(serverCtx), }, { + // 获取媒资详情 Method: http.MethodGet, - Path: "/products/:id", - Handler: admincrmtradetoken.GetTokenProductHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/products", - Handler: admincrmtradetoken.CreateTokenProductHandler(serverCtx), + Path: "/resources/:id", + Handler: adminmediaresource.GetMediaResourceHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/products/:id", - Handler: admincrmtradetoken.PutTokenProductHandler(serverCtx), + // 删除媒资 + Method: http.MethodDelete, + Path: "/resources/:id", + Handler: adminmediaresource.DeleteMediaResourceHandler(serverCtx), }, { - Method: http.MethodPatch, - Path: "/products/:id", - Handler: admincrmtradetoken.PatchTokenProductHandler(serverCtx), + // 创建媒资-Base64 + Method: http.MethodPost, + Path: "/resources/base64", + Handler: adminmediaresource.CreateMediaResourceByBase64Handler(serverCtx), }, { - Method: http.MethodDelete, - Path: "/products/:id", - Handler: admincrmtradetoken.DeleteTokenProductHandler(serverCtx), + // 查询媒资列表 + Method: http.MethodGet, + Path: "/resources/page-list", + Handler: adminmediaresource.ListMediaResourcesHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/trade/token"), + rest.WithPrefix("/api/v1/admin/media"), ) server.AddRoutes( @@ -1107,77 +1317,62 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 查询API列表 Method: http.MethodGet, - Path: "/shipping/page-list", - Handler: admincrmtradeaddressshipping.ListShippingAddressesPageHandler(serverCtx), + Path: "/api-list", + Handler: adminpermission.ListAPIHandler(serverCtx), }, { + // 查询角色列表 Method: http.MethodGet, - Path: "/shipping/:id", - Handler: admincrmtradeaddressshipping.GetShippingAddressHandler(serverCtx), + Path: "/roles", + Handler: adminpermission.ListRolesHandler(serverCtx), }, { + // 创建角色 Method: http.MethodPost, - Path: "/shipping", - Handler: admincrmtradeaddressshipping.CreateShippingAddressHandler(serverCtx), + Path: "/roles", + Handler: adminpermission.CreateRoleHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/shipping/:id", - Handler: admincrmtradeaddressshipping.PutShippingAddressHandler(serverCtx), + // 获取角色详情 + Method: http.MethodGet, + Path: "/roles/:roleCode", + Handler: adminpermission.GetRoleHandler(serverCtx), }, { + // 更新角色详情 Method: http.MethodPatch, - Path: "/shipping/:id", - Handler: admincrmtradeaddressshipping.PatchShippingAddressHandler(serverCtx), + Path: "/roles/:roleCode", + Handler: adminpermission.PatchRoleHandler(serverCtx), }, { - Method: http.MethodDelete, - Path: "/shipping/:id", - Handler: admincrmtradeaddressshipping.DeleteShippingAddressHandler(serverCtx), + // 为角色授予API权限 + Method: http.MethodPost, + Path: "/roles/:roleCode/actions/set-permissions", + Handler: adminpermission.SetRolePermissionsHandler(serverCtx), }, - }..., - ), - rest.WithPrefix("/api/v1/admin/trade/address"), - ) - - server.AddRoutes( - rest.WithMiddlewares( - []rest.Middleware{serverCtx.UserJWTAuth}, - []rest.Route{ { - Method: http.MethodGet, - Path: "/billing/page-list", - Handler: admincrmtradeaddressbilling.ListBillingAddressesPageHandler(serverCtx), + // 为角色分配用户 + Method: http.MethodPost, + Path: "/roles/:roleCode/actions/set-users", + Handler: adminpermission.SetRoleUsersHandler(serverCtx), }, { + // 获取角色的用户列表 Method: http.MethodGet, - Path: "/billing/:id", - Handler: admincrmtradeaddressbilling.GetBillingAddressHandler(serverCtx), + Path: "/roles/:roleCode/users", + Handler: adminpermission.GetRoleUsersHandler(serverCtx), }, { + // 为用户授予角色 Method: http.MethodPost, - Path: "/billing", - Handler: admincrmtradeaddressbilling.CreateBillingAddressHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/billing/:id", - Handler: admincrmtradeaddressbilling.PutBillingAddressHandler(serverCtx), - }, - { - Method: http.MethodPatch, - Path: "/billing/:id", - Handler: admincrmtradeaddressbilling.PatchBillingAddressHandler(serverCtx), - }, - { - Method: http.MethodDelete, - Path: "/billing/:id", - Handler: admincrmtradeaddressbilling.DeleteBillingAddressHandler(serverCtx), + Path: "/users/:userId/actions/set-roles", + Handler: adminpermission.SetUserRolesHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/trade/address"), + rest.WithPrefix("/api/v1/admin/permission"), ) server.AddRoutes( @@ -1185,38 +1380,38 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/delivery/page-list", - Handler: admincrmtradeaddressdelivery.ListDeliveryAddressesPageHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/delivery/:id", - Handler: admincrmtradeaddressdelivery.GetDeliveryAddressHandler(serverCtx), - }, - { + // 创建新职位 Method: http.MethodPost, - Path: "/delivery", - Handler: admincrmtradeaddressdelivery.CreateDeliveryAddressHandler(serverCtx), + Path: "/positions", + Handler: adminposition.CreatePositionHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/delivery/:id", - Handler: admincrmtradeaddressdelivery.PutDeliveryAddressHandler(serverCtx), + // 获取职位列表 + Method: http.MethodGet, + Path: "/positions", + Handler: adminposition.ListPositionsHandler(serverCtx), }, { + // 更新职位信息(可选更新) Method: http.MethodPatch, - Path: "/delivery/:id", - Handler: admincrmtradeaddressdelivery.PatchDeliveryAddressHandler(serverCtx), + Path: "/positions/:id", + Handler: adminposition.PatchPositionHandler(serverCtx), }, { + // 删除职位 Method: http.MethodDelete, - Path: "/delivery/:id", - Handler: admincrmtradeaddressdelivery.DeleteDeliveryAddressHandler(serverCtx), + Path: "/positions/:id", + Handler: adminposition.DeletePositionHandler(serverCtx), + }, + { + // 获取职位详情 + Method: http.MethodGet, + Path: "/positions/:id", + Handler: adminposition.GetPositionHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/trade/address"), + rest.WithPrefix("/api/v1/admin/position"), ) server.AddRoutes( @@ -1224,38 +1419,14 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/warehouses", - Handler: admincrmtradewarehouse.ListWarehousesHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/warehouses/:id", - Handler: admincrmtradewarehouse.GetWarehouseHandler(serverCtx), - }, - { + // App发送图文信息 Method: http.MethodPost, - Path: "/warehouses", - Handler: admincrmtradewarehouse.CreateWarehouseHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/warehouses/:id", - Handler: admincrmtradewarehouse.UpdateWarehouseHandler(serverCtx), - }, - { - Method: http.MethodPatch, - Path: "/warehouses/:id", - Handler: admincrmtradewarehouse.PatchWarehouseHandler(serverCtx), - }, - { - Method: http.MethodDelete, - Path: "/warehouses/:id", - Handler: admincrmtradewarehouse.DeleteWarehouseHandler(serverCtx), + Path: "/message/articles", + Handler: adminscrmapp.SendWeWorkAppArticleMessageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/trade"), + rest.WithPrefix("/api/v1/admin/scrm/app/wechat"), ) server.AddRoutes( @@ -1263,38 +1434,26 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/group-tree", - Handler: adminscrmcontractway.GetContractWayGroupTreeHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/groups", - Handler: adminscrmcontractway.GetContractWayGroupListHandler(serverCtx), + // App创建企业群 + Method: http.MethodPost, + Path: "/group/create", + Handler: adminscrmapp.CreateWeWorkAppGroupHandler(serverCtx), }, { + // App企业群列表/list Method: http.MethodGet, - Path: "/", - Handler: adminscrmcontractway.GetContractWaysHandler(serverCtx), + Path: "/group/list", + Handler: adminscrmapp.ListWeWorkAppGroupHandler(serverCtx), }, { + // App企业群推送图文信息 Method: http.MethodPost, - Path: "/", - Handler: adminscrmcontractway.CreateContractWayHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/:id", - Handler: adminscrmcontractway.UpdateContractWayHandler(serverCtx), - }, - { - Method: http.MethodDelete, - Path: "/:id", - Handler: adminscrmcontractway.DeleteContractWayHandler(serverCtx), + Path: "/group/message/articles", + Handler: adminscrmapp.SendWeWorkAppGroupArticleMessageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/contract-way"), + rest.WithPrefix("/api/v1/admin/scrm/app/wechat"), ) server.AddRoutes( @@ -1302,18 +1461,20 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodPost, - Path: "/user/page", - Handler: adminscrmorganization.ListWeWorkUserPageHandler(serverCtx), + // App详情 + Method: http.MethodGet, + Path: "/detail", + Handler: adminscrmapp.DetailWeWorkAppHandler(serverCtx), }, { + // App列表/options Method: http.MethodGet, - Path: "/sync", - Handler: adminscrmorganization.SyncWeWorkUserHandler(serverCtx), + Path: "/options", + Handler: adminscrmapp.ListWeWorkAppOptionHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/scrm/organization/wechat"), + rest.WithPrefix("/api/v1/admin/scrm/app/wechat"), ) server.AddRoutes( @@ -1321,13 +1482,14 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 机器人发送图文信息 Method: http.MethodPost, - Path: "/partment/page", - Handler: adminscrmorganization.ListWeWorkDepartMentPageHandler(serverCtx), + Path: "/message/articles", + Handler: adminscrmbot.BotWeWorkArticlesHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/scrm/organization/wechat"), + rest.WithPrefix("/api/v1/admin/scrm/bot/wechat"), ) server.AddRoutes( @@ -1335,42 +1497,44 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 查询渠道活码 Method: http.MethodGet, - Path: "/group/list", - Handler: adminscrmapp.ListWeWorkAppGroupHandler(serverCtx), + Path: "/", + Handler: adminscrmcontractway.GetContractWaysHandler(serverCtx), }, { + // 创建活码 Method: http.MethodPost, - Path: "/group/create", - Handler: adminscrmapp.CreateWeWorkAppGroupHandler(serverCtx), + Path: "/", + Handler: adminscrmcontractway.CreateContractWayHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/group/message/articles", - Handler: adminscrmapp.SendWeWorkAppGroupArticleMessageHandler(serverCtx), + // 修改活码 + Method: http.MethodPut, + Path: "/:id", + Handler: adminscrmcontractway.UpdateContractWayHandler(serverCtx), + }, + { + // 删除活码 + Method: http.MethodDelete, + Path: "/:id", + Handler: adminscrmcontractway.DeleteContractWayHandler(serverCtx), }, - }..., - ), - rest.WithPrefix("/api/v1/admin/scrm/app/wechat"), - ) - - server.AddRoutes( - rest.WithMiddlewares( - []rest.Middleware{serverCtx.UserJWTAuth}, - []rest.Route{ { + // 获取渠道活码分组树 Method: http.MethodGet, - Path: "/detail", - Handler: adminscrmapp.DetailWeWorkAppHandler(serverCtx), + Path: "/group-tree", + Handler: adminscrmcontractway.GetContractWayGroupTreeHandler(serverCtx), }, { + // 查询渠道活码分组列表 Method: http.MethodGet, - Path: "/options", - Handler: adminscrmapp.ListWeWorkAppOptionHandler(serverCtx), + Path: "/groups", + Handler: adminscrmcontractway.GetContractWayGroupListHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/scrm/app/wechat"), + rest.WithPrefix("/api/v1/admin/contract-way"), ) server.AddRoutes( @@ -1378,29 +1542,17 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 所有客户列表/page Method: http.MethodPost, - Path: "/message/articles", - Handler: adminscrmapp.SendWeWorkAppArticleMessageHandler(serverCtx), + Path: "/page", + Handler: adminscrmcustomer.ListWeWorkCustomerPageHandler(serverCtx), }, - }..., - ), - rest.WithPrefix("/api/v1/admin/scrm/app/wechat"), - ) - - server.AddRoutes( - rest.WithMiddlewares( - []rest.Middleware{serverCtx.UserJWTAuth}, - []rest.Route{ { + // 批量同步客户信息(根据员工ID同步/节流) Method: http.MethodPost, Path: "/sync", Handler: adminscrmcustomer.SyncWeWorkCustomerOptionHandler(serverCtx), }, - { - Method: http.MethodPost, - Path: "/page", - Handler: adminscrmcustomer.ListWeWorkCustomerPageHandler(serverCtx), - }, }..., ), rest.WithPrefix("/api/v1/admin/scrm/customer/wechat"), @@ -1411,11 +1563,13 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 客户群列表/limit Method: http.MethodPost, Path: "/group/list", Handler: adminscrmcustomer.ListWeWorkCustomerGroupLimitHandler(serverCtx), }, { + // 客户群发信息 Method: http.MethodPost, Path: "/group/message/template", Handler: adminscrmcustomer.SendWeWorkCustomerGroupMessageHandler(serverCtx), @@ -1430,13 +1584,20 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 同步组织架构/department&user + Method: http.MethodGet, + Path: "/sync", + Handler: adminscrmorganization.SyncWeWorkUserHandler(serverCtx), + }, + { + // 员工列表/page Method: http.MethodPost, - Path: "/message/articles", - Handler: adminscrmbot.BotWeWorkArticlesHandler(serverCtx), + Path: "/user/page", + Handler: adminscrmorganization.ListWeWorkUserPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/scrm/bot/wechat"), + rest.WithPrefix("/api/v1/admin/scrm/organization/wechat"), ) server.AddRoutes( @@ -1444,18 +1605,14 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 部门列表/page Method: http.MethodPost, - Path: "/image/upload", - Handler: adminscrmresource.CreateWeWorkImageHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/image/page", - Handler: adminscrmresource.ListWeWorkImageHandler(serverCtx), + Path: "/partment/page", + Handler: adminscrmorganization.ListWeWorkDepartMentPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/scrm/resource/wechat"), + rest.WithPrefix("/api/v1/admin/scrm/organization/wechat"), ) server.AddRoutes( @@ -1463,36 +1620,43 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodPost, - Path: "/group/page", - Handler: adminscrmqrcode.ListWeWorkQrcodePageHandler(serverCtx), + // 删除场景码 + Method: http.MethodDelete, + Path: "/group/:qid", + Handler: adminscrmqrcode.DeleteWeWorkQrcodeHandler(serverCtx), }, { + // 创建场景码 Method: http.MethodPost, Path: "/group/create", Handler: adminscrmqrcode.CreateWeWorkQrcodeHandler(serverCtx), }, { + // 禁用场景码 Method: http.MethodPatch, - Path: "/group/update/:qid", - Handler: adminscrmqrcode.UpdateWeWorkQrcodeHandler(serverCtx), + Path: "/group/disable/:qid", + Handler: adminscrmqrcode.DisableWeWorkQrcodeHandler(serverCtx), }, { + // 启用场景码 Method: http.MethodPatch, Path: "/group/enable/:qid", Handler: adminscrmqrcode.EnableWeWorkQrcodeHandler(serverCtx), }, { - Method: http.MethodPatch, - Path: "/group/disable/:qid", - Handler: adminscrmqrcode.DisableWeWorkQrcodeHandler(serverCtx), + // 场景码列表/page + Method: http.MethodPost, + Path: "/group/page", + Handler: adminscrmqrcode.ListWeWorkQrcodePageHandler(serverCtx), }, { - Method: http.MethodDelete, - Path: "/group/:qid", - Handler: adminscrmqrcode.DeleteWeWorkQrcodeHandler(serverCtx), + // 更新场景码 + Method: http.MethodPatch, + Path: "/group/update/:qid", + Handler: adminscrmqrcode.UpdateWeWorkQrcodeHandler(serverCtx), }, { + // 下载场景码/upload Method: http.MethodPatch, Path: "/qrcode/:qid", Handler: adminscrmqrcode.UpdateActiveQrcodeLinkHandler(serverCtx), @@ -1507,58 +1671,134 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/group/option", - Handler: adminscrmtag.ListWeWorkTagGroupOptionHandler(serverCtx), + // 微信素材库/page + Method: http.MethodPost, + Path: "/image/page", + Handler: adminscrmresource.ListWeWorkImageHandler(serverCtx), }, { + // 上传图片到微信 Method: http.MethodPost, - Path: "/group/page", - Handler: adminscrmtag.ListWeWorkTagGroupPageHandler(serverCtx), + Path: "/image/upload", + Handler: adminscrmresource.CreateWeWorkImageHandler(serverCtx), }, + }..., + ), + rest.WithPrefix("/api/v1/admin/scrm/resource/wechat"), + ) + + server.AddRoutes( + rest.WithMiddlewares( + []rest.Middleware{serverCtx.UserJWTAuth}, + []rest.Route{ { + // 标签列表对象/key=>val Method: http.MethodGet, Path: "/corp/option", Handler: adminscrmtag.ListWeWorkTagOptionHandler(serverCtx), }, { + // 标签列表/page + Method: http.MethodPost, + Path: "/corp/page", + Handler: adminscrmtag.ListWeWorkTagPageHandler(serverCtx), + }, + { + // 创建企业标签 + Method: http.MethodPost, + Path: "/crop/create", + Handler: adminscrmtag.CreateWeWorkCropTagHandler(serverCtx), + }, + { + // 批量删除企业标签 + Method: http.MethodDelete, + Path: "/crop/delete", + Handler: adminscrmtag.DeleteWeWorkCropTagHandler(serverCtx), + }, + { + // 编辑企业标签 + Method: http.MethodPatch, + Path: "/crop/update", + Handler: adminscrmtag.UpdateWeWorkCropTagHandler(serverCtx), + }, + { + // 编辑/删除客户标签 + Method: http.MethodPost, + Path: "/customer/action", + Handler: adminscrmtag.ActionWeWorkCustomerTagHandler(serverCtx), + }, + { + // 添加、删除标签组内的标签 Method: http.MethodPost, Path: "/group/action", Handler: adminscrmtag.ActionWeWorkCropTagGroupHandler(serverCtx), }, { + // 标签组列表/option + Method: http.MethodGet, + Path: "/group/option", + Handler: adminscrmtag.ListWeWorkTagGroupOptionHandler(serverCtx), + }, + { + // 标签组分页/page Method: http.MethodPost, - Path: "/corp/page", - Handler: adminscrmtag.ListWeWorkTagPageHandler(serverCtx), + Path: "/group/page", + Handler: adminscrmtag.ListWeWorkTagGroupPageHandler(serverCtx), }, { + // 全量同步标签/sync Method: http.MethodPut, Path: "/sync", Handler: adminscrmtag.SyncWeWorkGroupTagHandler(serverCtx), }, + }..., + ), + rest.WithPrefix("/api/v1/admin/scrm/tag/wechat"), + ) + + server.AddRoutes( + rest.WithMiddlewares( + []rest.Middleware{serverCtx.UserJWTAuth}, + []rest.Route{ { + // 创新标签 Method: http.MethodPost, - Path: "/crop/create", - Handler: adminscrmtag.CreateWeWorkCropTagHandler(serverCtx), + Path: "/", + Handler: admintag.CreateTagHandler(serverCtx), + }, + { + // 查询标签详情 + Method: http.MethodGet, + Path: "/:id", + Handler: admintag.GetTagHandler(serverCtx), }, { + // 修改标签 + Method: http.MethodPut, + Path: "/:id", + Handler: admintag.UpdateTagHandler(serverCtx), + }, + { + // 修改标签父级 Method: http.MethodPatch, - Path: "/crop/update", - Handler: adminscrmtag.UpdateWeWorkCropTagHandler(serverCtx), + Path: "/:id", + Handler: admintag.PatchTagHandler(serverCtx), }, { + // 删除标签 Method: http.MethodDelete, - Path: "/crop/delete", - Handler: adminscrmtag.DeleteWeWorkCropTagHandler(serverCtx), + Path: "/:id", + Handler: admintag.DeleteTagHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/customer/action", - Handler: adminscrmtag.ActionWeWorkCustomerTagHandler(serverCtx), + // 查询标签列表 + Method: http.MethodGet, + Path: "/tag-tree", + Handler: admintag.ListTagTreeHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/scrm/tag/wechat"), + rest.WithPrefix("/api/v1/admin/tags"), ) server.AddRoutes( @@ -1566,28 +1806,50 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // List员工 Method: http.MethodGet, - Path: "/menus-tree", - Handler: adminwechatofficialaccountmenu.QueryMenusHandler(serverCtx), + Path: "/users", + Handler: adminuser.ListUsersHandler(serverCtx), }, { + // 创建员工 Method: http.MethodPost, - Path: "/menus/sync", - Handler: adminwechatofficialaccountmenu.SyncMenusHandler(serverCtx), + Path: "/users", + Handler: adminuser.CreateUserHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/menus", - Handler: adminwechatofficialaccountmenu.CreateMenuHandler(serverCtx), + // 查询员工 + Method: http.MethodGet, + Path: "/users/:id", + Handler: adminuser.GetUserHandler(serverCtx), + }, + { + // 编辑员工信息 + Method: http.MethodPatch, + Path: "/users/:id", + Handler: adminuser.UpdateUserHandler(serverCtx), }, { + // 删除员工 Method: http.MethodDelete, - Path: "/menus", - Handler: adminwechatofficialaccountmenu.DeleteMenuHandler(serverCtx), + Path: "/users/:id", + Handler: adminuser.DeleteUserHandler(serverCtx), + }, + { + // 重设密码 + Method: http.MethodPost, + Path: "/users/actions/reset-password", + Handler: adminuser.ResetPasswordHandler(serverCtx), + }, + { + // 同步员工 + Method: http.MethodPost, + Path: "/users/actions/sync", + Handler: adminuser.SyncUsersHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/wechat/official-account"), + rest.WithPrefix("/api/v1/admin/user"), ) server.AddRoutes( @@ -1595,109 +1857,110 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 获取用户可见菜单 + Method: http.MethodGet, + Path: "/menu-roles", + Handler: adminuserinfo.GetMenuRolesHandler(serverCtx), + }, + { + // 获取用户信息 + Method: http.MethodGet, + Path: "/user-info", + Handler: adminuserinfo.GetUserInfoHandler(serverCtx), + }, + { + // 修改密码 Method: http.MethodPost, - Path: "/medias/page-list", - Handler: adminwechatofficialaccountmedia.GetOAMediaListHandler(serverCtx), + Path: "/users/actions/modify-password", + Handler: adminuserinfo.ModifyUserPasswordHandler(serverCtx), }, + }..., + ), + rest.WithPrefix("/api/v1/admin/user-center"), + ) + + server.AddRoutes( + rest.WithMiddlewares( + []rest.Middleware{serverCtx.UserJWTAuth}, + []rest.Route{ { + // 查询菜单列表 Method: http.MethodGet, Path: "/media/news/list", Handler: adminwechatofficialaccountmedia.GetOAMediaNewsListHandler(serverCtx), }, { + // 创建菜单 + Method: http.MethodPost, + Path: "/medias", + Handler: adminwechatofficialaccountmedia.CreateOAMediaHandler(serverCtx), + }, + { + // 请求菜单上传链接 Method: http.MethodGet, Path: "/medias/:mediaId", Handler: adminwechatofficialaccountmedia.GetOAMediaHandler(serverCtx), }, { - Method: http.MethodGet, - Path: "/medias/video/:mediaId", - Handler: adminwechatofficialaccountmedia.GetOAMediaByVideoHandler(serverCtx), + // 删除菜单 + Method: http.MethodDelete, + Path: "/medias/:mediaId", + Handler: adminwechatofficialaccountmedia.DeleteOAMediaHandler(serverCtx), }, { + // 查询菜单列表 Method: http.MethodPost, - Path: "/medias/upload", - Handler: adminwechatofficialaccountmedia.UploadOAMediaHandler(serverCtx), + Path: "/medias/page-list", + Handler: adminwechatofficialaccountmedia.GetOAMediaListHandler(serverCtx), }, { + // 创建菜单 Method: http.MethodPost, - Path: "/medias", - Handler: adminwechatofficialaccountmedia.CreateOAMediaHandler(serverCtx), + Path: "/medias/upload", + Handler: adminwechatofficialaccountmedia.UploadOAMediaHandler(serverCtx), }, { - Method: http.MethodDelete, - Path: "/medias/:mediaId", - Handler: adminwechatofficialaccountmedia.DeleteOAMediaHandler(serverCtx), + // 根据媒体key获取媒体 + Method: http.MethodGet, + Path: "/medias/video/:mediaId", + Handler: adminwechatofficialaccountmedia.GetOAMediaByVideoHandler(serverCtx), }, }..., ), rest.WithPrefix("/api/v1/admin/wechat/official-account"), ) - server.AddRoutes( - []rest.Route{ - { - Method: http.MethodGet, - Path: "/types/page-list", - Handler: mpdictionary.ListDictionaryPageTypesHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/types/:type", - Handler: mpdictionary.GetDictionaryTypeHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/items", - Handler: mpdictionary.ListDictionaryItemsHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/items/:type/:key", - Handler: mpdictionary.GetDictionaryItemHandler(serverCtx), - }, - }, - rest.WithPrefix("/api/v1/mp/dictionary"), - ) - - server.AddRoutes( - []rest.Route{ - { - Method: http.MethodGet, - Path: "/validToken", - Handler: mpcrmcustomerauth.ValidTokenHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/login", - Handler: mpcrmcustomerauth.LoginHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/authByPhone", - Handler: mpcrmcustomerauth.AuthByPhoneHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/authByProfile", - Handler: mpcrmcustomerauth.AuthByProfileHandler(serverCtx), - }, - }, - rest.WithPrefix("/api/v1/mp/customer"), - ) - server.AddRoutes( rest.WithMiddlewares( - []rest.Middleware{serverCtx.MPCustomerJWTAuth, serverCtx.MPCustomerGet}, + []rest.Middleware{serverCtx.UserJWTAuth}, []rest.Route{ { + // 创建菜单 + Method: http.MethodPost, + Path: "/menus", + Handler: adminwechatofficialaccountmenu.CreateMenuHandler(serverCtx), + }, + { + // 删除菜单 + Method: http.MethodDelete, + Path: "/menus", + Handler: adminwechatofficialaccountmenu.DeleteMenuHandler(serverCtx), + }, + { + // 查询菜单列表 Method: http.MethodGet, - Path: "/user-info", - Handler: mpcrmcustomer.GetUserInfoHandler(serverCtx), + Path: "/menus-tree", + Handler: adminwechatofficialaccountmenu.QueryMenusHandler(serverCtx), + }, + { + // 请求菜单上传链接 + Method: http.MethodPost, + Path: "/menus/sync", + Handler: adminwechatofficialaccountmenu.SyncMenusHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/mp/customer"), + rest.WithPrefix("/api/v1/admin/wechat/official-account"), ) server.AddRoutes( @@ -1705,26 +1968,53 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.MPCustomerJWTAuth, serverCtx.MPCustomerGet}, []rest.Route{ { + // 获取用户信息 Method: http.MethodGet, - Path: "/customer", - Handler: mpcrmmembership.GetCustomerMembershipHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/:id", - Handler: mpcrmmembership.GetMembershipHandler(serverCtx), + Path: "/user-info", + Handler: mpcrmcustomer.GetUserInfoHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/mp/membership"), + rest.WithPrefix("/api/v1/mp/customer"), + ) + + server.AddRoutes( + []rest.Route{ + { + // 客户手机授权 + Method: http.MethodPost, + Path: "/authByPhone", + Handler: mpcrmcustomerauth.AuthByPhoneHandler(serverCtx), + }, + { + // 客户信息授权 + Method: http.MethodPost, + Path: "/authByProfile", + Handler: mpcrmcustomerauth.AuthByProfileHandler(serverCtx), + }, + { + // 微信小程序登录 + Method: http.MethodPost, + Path: "/login", + Handler: mpcrmcustomerauth.LoginHandler(serverCtx), + }, + { + // 微信小程序Token验证 + Method: http.MethodGet, + Path: "/validToken", + Handler: mpcrmcustomerauth.ValidTokenHandler(serverCtx), + }, + }, + rest.WithPrefix("/api/v1/mp/customer"), ) server.AddRoutes( []rest.Route{ { + // 查询媒资列表 Method: http.MethodGet, - Path: "/stores/page-list", - Handler: mpcrmmarketstore.ListStoresPageHandler(serverCtx), + Path: "/medias/page-list", + Handler: mpcrmmarketmedia.ListMediasPageHandler(serverCtx), }, }, rest.WithPrefix("/api/v1/mp/market"), @@ -1733,9 +2023,10 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( []rest.Route{ { + // 店铺列表 Method: http.MethodGet, - Path: "/medias/page-list", - Handler: mpcrmmarketmedia.ListMediasPageHandler(serverCtx), + Path: "/stores/page-list", + Handler: mpcrmmarketstore.ListStoresPageHandler(serverCtx), }, }, rest.WithPrefix("/api/v1/mp/market"), @@ -1743,34 +2034,38 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( rest.WithMiddlewares( - []rest.Middleware{serverCtx.MPCustomerJWTAuth}, + []rest.Middleware{serverCtx.MPCustomerJWTAuth, serverCtx.MPCustomerGet}, []rest.Route{ { + // 查询会籍 Method: http.MethodGet, - Path: "/artisans/page-list", - Handler: mpcrmproductartisan.ListArtisansPageHandler(serverCtx), + Path: "/:id", + Handler: mpcrmmembership.GetMembershipHandler(serverCtx), }, { + // 查询会籍 Method: http.MethodGet, - Path: "/artisans/:id", - Handler: mpcrmproductartisan.GetArtisanHandler(serverCtx), + Path: "/customer", + Handler: mpcrmmembership.GetCustomerMembershipHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/mp/product"), + rest.WithPrefix("/api/v1/mp/membership"), ) server.AddRoutes( []rest.Route{ { + // 查询产品详情 Method: http.MethodGet, - Path: "/products/page-list", - Handler: mpcrmproduct.ListProductsPageHandler(serverCtx), + Path: "/products/:id", + Handler: mpcrmproduct.GetProductHandler(serverCtx), }, { + // 产品列表 Method: http.MethodGet, - Path: "/products/:id", - Handler: mpcrmproduct.GetProductHandler(serverCtx), + Path: "/products/page-list", + Handler: mpcrmproduct.ListProductsPageHandler(serverCtx), }, }, rest.WithPrefix("/api/v1/mp/product"), @@ -1779,14 +2074,16 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( []rest.Route{ { + // 查询产品品类列表 Method: http.MethodGet, - Path: "/product-category-tree", - Handler: mpcrmproduct.ListProductCategoryTreeHandler(serverCtx), + Path: "/product-categories", + Handler: mpcrmproduct.ListProductCategoriesHandler(serverCtx), }, { + // 查询产品品类树形表 Method: http.MethodGet, - Path: "/product-categories", - Handler: mpcrmproduct.ListProductCategoriesHandler(serverCtx), + Path: "/product-category-tree", + Handler: mpcrmproduct.ListProductCategoryTreeHandler(serverCtx), }, }, rest.WithPrefix("/api/v1/mp/product"), @@ -1794,49 +2091,38 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( rest.WithMiddlewares( - []rest.Middleware{serverCtx.UserJWTAuth}, + []rest.Middleware{serverCtx.MPCustomerJWTAuth}, []rest.Route{ { + // 查询元匠详情 Method: http.MethodGet, - Path: "/product-statistics/page-list", - Handler: admincrmproductproductstatistics.ListProductStatisticsPageHandler(serverCtx), + Path: "/artisans/:id", + Handler: mpcrmproductartisan.GetArtisanHandler(serverCtx), }, { + // 查询元匠列表 Method: http.MethodGet, - Path: "/product-statistics/:id", - Handler: admincrmproductproductstatistics.GetProductStatisticsHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/product-statistics/config", - Handler: admincrmproductproductstatistics.ConfigProductStatisticsHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/product-statistics/:id", - Handler: admincrmproductproductstatistics.PutProductStatisticsHandler(serverCtx), - }, - { - Method: http.MethodPatch, - Path: "/product-statistics/:id", - Handler: admincrmproductproductstatistics.PatchProductStatisticsHandler(serverCtx), + Path: "/artisans/page-list", + Handler: mpcrmproductartisan.ListArtisansPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/product"), + rest.WithPrefix("/api/v1/mp/product"), ) server.AddRoutes( []rest.Route{ { + // 查询产品统计详情 Method: http.MethodGet, - Path: "/product-statistics/page-list", - Handler: mpcrmproductproductstatistics.ListProductStatisticsPageHandler(serverCtx), + Path: "/product-statistics/:id", + Handler: mpcrmproductproductstatistics.GetProductStatisticsHandler(serverCtx), }, { + // 查询产品统计列表 Method: http.MethodGet, - Path: "/product-statistics/:id", - Handler: mpcrmproductproductstatistics.GetProductStatisticsHandler(serverCtx), + Path: "/product-statistics/page-list", + Handler: mpcrmproductproductstatistics.ListProductStatisticsPageHandler(serverCtx), }, }, rest.WithPrefix("/api/v1/mp/product"), @@ -1847,160 +2133,88 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.MPCustomerJWTAuth, serverCtx.MPCustomerGet}, []rest.Route{ { - Method: http.MethodGet, - Path: "/cart/items/page-list", - Handler: mpcrmtradecart.ListCartItemsPageHandler(serverCtx), + // 创建账单地址 + Method: http.MethodPost, + Path: "/billing", + Handler: mpcrmtradeaddressbilling.CreateBillingAddressHandler(serverCtx), }, { + // 查询账单地址详情 Method: http.MethodGet, - Path: "/cart/:cartId", - Handler: mpcrmtradecart.GetCartHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/cart/items", - Handler: mpcrmtradecart.AddToCartHandler(serverCtx), + Path: "/billing/:id", + Handler: mpcrmtradeaddressbilling.GetBillingAddressHandler(serverCtx), }, { + // 更新账单地址 Method: http.MethodPut, - Path: "/cart/items/:itemId", - Handler: mpcrmtradecart.UpdateCartItemQuantityHandler(serverCtx), + Path: "/billing/:id", + Handler: mpcrmtradeaddressbilling.PutBillingAddressHandler(serverCtx), }, { - Method: http.MethodDelete, - Path: "/cart/items/:itemId", - Handler: mpcrmtradecart.RemoveCartItemHandler(serverCtx), + // 部分更新账单地址 + Method: http.MethodPatch, + Path: "/billing/:id", + Handler: mpcrmtradeaddressbilling.PatchBillingAddressHandler(serverCtx), }, { + // 删除账单地址 Method: http.MethodDelete, - Path: "/cart/items/clear", - Handler: mpcrmtradecart.ClearCartItemsHandler(serverCtx), - }, - }..., - ), - rest.WithPrefix("/api/v1/mp/trade"), - ) - - server.AddRoutes( - rest.WithMiddlewares( - []rest.Middleware{serverCtx.MPCustomerJWTAuth, serverCtx.MPCustomerGet}, - []rest.Route{ - { - Method: http.MethodGet, - Path: "/orders/page-list", - Handler: mpcrmtradeorder.ListOrdersPageHandler(serverCtx), + Path: "/billing/:id", + Handler: mpcrmtradeaddressbilling.DeleteBillingAddressHandler(serverCtx), }, { + // 查询账单地址列表 Method: http.MethodGet, - Path: "/orders/:id", - Handler: mpcrmtradeorder.GetOrderHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/orders/products", - Handler: mpcrmtradeorder.CreateOrderByProductsHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/orders/cart-items", - Handler: mpcrmtradeorder.CreateOrderByCartItemsHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/orders/cancel/:id", - Handler: mpcrmtradeorder.CancelOrderHandler(serverCtx), + Path: "/billing/page-list", + Handler: mpcrmtradeaddressbilling.ListBillingAddressesPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/mp/trade"), + rest.WithPrefix("/api/v1/mp/trade/address"), ) server.AddRoutes( rest.WithMiddlewares( - []rest.Middleware{serverCtx.UserJWTAuth}, + []rest.Middleware{serverCtx.MPCustomerJWTAuth, serverCtx.MPCustomerGet}, []rest.Route{ { - Method: http.MethodGet, - Path: "/orders/page-list", - Handler: admincrmtradeorder.ListOrdersPageHandler(serverCtx), + // 创建订单发货地址 + Method: http.MethodPost, + Path: "/delivery", + Handler: mpcrmtradeaddressdelivery.CreateDeliveryAddressHandler(serverCtx), }, { + // 查询订单发货地址详情 Method: http.MethodGet, - Path: "/orders/:id", - Handler: admincrmtradeorder.GetOrderHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/orders", - Handler: admincrmtradeorder.CreateOrderHandler(serverCtx), + Path: "/delivery/:id", + Handler: mpcrmtradeaddressdelivery.GetDeliveryAddressHandler(serverCtx), }, { + // 更新订单发货地址 Method: http.MethodPut, - Path: "/orders/:id", - Handler: admincrmtradeorder.PutOrderHandler(serverCtx), + Path: "/delivery/:id", + Handler: mpcrmtradeaddressdelivery.PutDeliveryAddressHandler(serverCtx), }, { + // 部分更新订单发货地址 Method: http.MethodPatch, - Path: "/orders/:id", - Handler: admincrmtradeorder.PatchOrderHandler(serverCtx), + Path: "/delivery/:id", + Handler: mpcrmtradeaddressdelivery.PatchDeliveryAddressHandler(serverCtx), }, { + // 删除订单发货地址 Method: http.MethodDelete, - Path: "/orders/:id", - Handler: admincrmtradeorder.DeleteOrderHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/orders/export", - Handler: admincrmtradeorder.ExportOrdersHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/orders/import", - Handler: admincrmtradeorder.ImportOrdersHandler(serverCtx), - }, - }..., - ), - rest.WithPrefix("/api/v1/admin/trade"), - ) - - server.AddRoutes( - rest.WithMiddlewares( - []rest.Middleware{serverCtx.UserJWTAuth}, - []rest.Route{ - { - Method: http.MethodGet, - Path: "/payments/page-list", - Handler: admincrmtradepayment.ListPaymentsPageHandler(serverCtx), + Path: "/delivery/:id", + Handler: mpcrmtradeaddressdelivery.DeleteDeliveryAddressHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/payments/:id", - Handler: admincrmtradepayment.GetPaymentHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/payments", - Handler: admincrmtradepayment.CreatePaymentHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/payments/:id", - Handler: admincrmtradepayment.PutPaymentHandler(serverCtx), - }, - { - Method: http.MethodPatch, - Path: "/payments/:id", - Handler: admincrmtradepayment.PatchPaymentHandler(serverCtx), - }, - { - Method: http.MethodDelete, - Path: "/payments/:id", - Handler: admincrmtradepayment.DeletePaymentHandler(serverCtx), + Path: "/delivery/page-list", + Handler: mpcrmtradeaddressdelivery.ListDeliveryAddressesPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/admin/trade"), + rest.WithPrefix("/api/v1/mp/trade/address"), ) server.AddRoutes( @@ -2008,35 +2222,41 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.MPCustomerJWTAuth, serverCtx.MPCustomerGet}, []rest.Route{ { - Method: http.MethodGet, - Path: "/shipping/page-list", - Handler: mpcrmtradeaddressshipping.ListShippingAddressesPageHandler(serverCtx), + // 创建收货地址 + Method: http.MethodPost, + Path: "/shipping", + Handler: mpcrmtradeaddressshipping.CreateShippingAddressHandler(serverCtx), }, { + // 查询收货地址详情 Method: http.MethodGet, Path: "/shipping/:id", Handler: mpcrmtradeaddressshipping.GetShippingAddressHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/shipping", - Handler: mpcrmtradeaddressshipping.CreateShippingAddressHandler(serverCtx), - }, - { + // 更新收货地址 Method: http.MethodPut, Path: "/shipping/:id", Handler: mpcrmtradeaddressshipping.PutShippingAddressHandler(serverCtx), }, { + // 部分更新收货地址 Method: http.MethodPatch, Path: "/shipping/:id", Handler: mpcrmtradeaddressshipping.PatchShippingAddressHandler(serverCtx), }, { + // 删除收货地址 Method: http.MethodDelete, Path: "/shipping/:id", Handler: mpcrmtradeaddressshipping.DeleteShippingAddressHandler(serverCtx), }, + { + // 查询收货地址列表 + Method: http.MethodGet, + Path: "/shipping/page-list", + Handler: mpcrmtradeaddressshipping.ListShippingAddressesPageHandler(serverCtx), + }, }..., ), rest.WithPrefix("/api/v1/mp/trade/address"), @@ -2047,38 +2267,44 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.MPCustomerJWTAuth, serverCtx.MPCustomerGet}, []rest.Route{ { + // 获取购物车详情 Method: http.MethodGet, - Path: "/delivery/page-list", - Handler: mpcrmtradeaddressdelivery.ListDeliveryAddressesPageHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/delivery/:id", - Handler: mpcrmtradeaddressdelivery.GetDeliveryAddressHandler(serverCtx), + Path: "/cart/:cartId", + Handler: mpcrmtradecart.GetCartHandler(serverCtx), }, { + // 添加商品到购物车 Method: http.MethodPost, - Path: "/delivery", - Handler: mpcrmtradeaddressdelivery.CreateDeliveryAddressHandler(serverCtx), + Path: "/cart/items", + Handler: mpcrmtradecart.AddToCartHandler(serverCtx), }, { + // 更新购物车商品数量 Method: http.MethodPut, - Path: "/delivery/:id", - Handler: mpcrmtradeaddressdelivery.PutDeliveryAddressHandler(serverCtx), + Path: "/cart/items/:itemId", + Handler: mpcrmtradecart.UpdateCartItemQuantityHandler(serverCtx), }, { - Method: http.MethodPatch, - Path: "/delivery/:id", - Handler: mpcrmtradeaddressdelivery.PatchDeliveryAddressHandler(serverCtx), + // 删除购物车商品 + Method: http.MethodDelete, + Path: "/cart/items/:itemId", + Handler: mpcrmtradecart.RemoveCartItemHandler(serverCtx), }, { + // 清空购物车 Method: http.MethodDelete, - Path: "/delivery/:id", - Handler: mpcrmtradeaddressdelivery.DeleteDeliveryAddressHandler(serverCtx), + Path: "/cart/items/clear", + Handler: mpcrmtradecart.ClearCartItemsHandler(serverCtx), + }, + { + // 查询购物车列表 + Method: http.MethodGet, + Path: "/cart/items/page-list", + Handler: mpcrmtradecart.ListCartItemsPageHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/mp/trade/address"), + rest.WithPrefix("/api/v1/mp/trade"), ) server.AddRoutes( @@ -2086,38 +2312,38 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.MPCustomerJWTAuth, serverCtx.MPCustomerGet}, []rest.Route{ { + // 查询订单详情 Method: http.MethodGet, - Path: "/billing/page-list", - Handler: mpcrmtradeaddressbilling.ListBillingAddressesPageHandler(serverCtx), + Path: "/orders/:id", + Handler: mpcrmtradeorder.GetOrderHandler(serverCtx), }, { - Method: http.MethodGet, - Path: "/billing/:id", - Handler: mpcrmtradeaddressbilling.GetBillingAddressHandler(serverCtx), + // 取消订单 + Method: http.MethodPut, + Path: "/orders/cancel/:id", + Handler: mpcrmtradeorder.CancelOrderHandler(serverCtx), }, { + // 创建购物车订单 Method: http.MethodPost, - Path: "/billing", - Handler: mpcrmtradeaddressbilling.CreateBillingAddressHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/billing/:id", - Handler: mpcrmtradeaddressbilling.PutBillingAddressHandler(serverCtx), + Path: "/orders/cart-items", + Handler: mpcrmtradeorder.CreateOrderByCartItemsHandler(serverCtx), }, { - Method: http.MethodPatch, - Path: "/billing/:id", - Handler: mpcrmtradeaddressbilling.PatchBillingAddressHandler(serverCtx), + // 查询订单列表 + Method: http.MethodGet, + Path: "/orders/page-list", + Handler: mpcrmtradeorder.ListOrdersPageHandler(serverCtx), }, { - Method: http.MethodDelete, - Path: "/billing/:id", - Handler: mpcrmtradeaddressbilling.DeleteBillingAddressHandler(serverCtx), + // 创建产品订单 + Method: http.MethodPost, + Path: "/orders/products", + Handler: mpcrmtradeorder.CreateOrderByProductsHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/mp/trade/address"), + rest.WithPrefix("/api/v1/mp/trade"), ) server.AddRoutes( @@ -2125,25 +2351,29 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.MPCustomerJWTAuth, serverCtx.MPCustomerGet}, []rest.Route{ { - Method: http.MethodGet, - Path: "/payments/page-list", - Handler: mpcrmtradepayment.ListPaymentsPageHandler(serverCtx), + // 创建支付单 + Method: http.MethodPost, + Path: "/payments", + Handler: mpcrmtradepayment.CreatePaymentFromOrderHandler(serverCtx), }, { + // 查询支付单详情 Method: http.MethodGet, Path: "/payments/:id", Handler: mpcrmtradepayment.GetPaymentHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/payments", - Handler: mpcrmtradepayment.CreatePaymentFromOrderHandler(serverCtx), - }, - { + // 修改支付单 Method: http.MethodPut, Path: "/payments/:id", Handler: mpcrmtradepayment.UpdatePaymentHandler(serverCtx), }, + { + // 查询支付单列表 + Method: http.MethodGet, + Path: "/payments/page-list", + Handler: mpcrmtradepayment.ListPaymentsPageHandler(serverCtx), + }, }..., ), rest.WithPrefix("/api/v1/mp/trade"), @@ -2154,6 +2384,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.MPCustomerJWTAuth, serverCtx.MPCustomerGet}, []rest.Route{ { + // 查询代币 Method: http.MethodGet, Path: "/balance", Handler: mpcrmtradetoken.GetCustomerTokenBalanceHandler(serverCtx), @@ -2166,92 +2397,175 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( []rest.Route{ { + // 获取字典项列表 Method: http.MethodGet, - Path: "/category-tree", - Handler: mpinfoorganizationcategory.ListCategoryTreeHandler(serverCtx), + Path: "/items", + Handler: mpdictionary.ListDictionaryItemsHandler(serverCtx), }, { + // 获取字典项 Method: http.MethodGet, - Path: "/categories/:id", - Handler: mpinfoorganizationcategory.GetCategoryHandler(serverCtx), + Path: "/items/:type/:key", + Handler: mpdictionary.GetDictionaryItemHandler(serverCtx), + }, + { + // 获取字典类型 + Method: http.MethodGet, + Path: "/types/:type", + Handler: mpdictionary.GetDictionaryTypeHandler(serverCtx), + }, + { + // 获取字典类型列表 + Method: http.MethodGet, + Path: "/types/page-list", + Handler: mpdictionary.ListDictionaryPageTypesHandler(serverCtx), }, + }, + rest.WithPrefix("/api/v1/mp/dictionary"), + ) + + server.AddRoutes( + rest.WithMiddlewares( + []rest.Middleware{serverCtx.WebCustomerJWTAuth}, + []rest.Route{ + { + // 获取字典项列表 + Method: http.MethodGet, + Path: "/items", + Handler: mpdictionary.ListDictionaryItemsHandler(serverCtx), + }, + { + // 获取字典项 + Method: http.MethodGet, + Path: "/items/:type/:key", + Handler: mpdictionary.GetDictionaryItemHandler(serverCtx), + }, + { + // 获取字典类型 + Method: http.MethodGet, + Path: "/types/:type", + Handler: mpdictionary.GetDictionaryTypeHandler(serverCtx), + }, + { + // 获取字典类型列表 + Method: http.MethodGet, + Path: "/types/page-list", + Handler: mpdictionary.ListDictionaryPageTypesHandler(serverCtx), + }, + }..., + ), + rest.WithPrefix("/api/v1/web/dictionary"), + ) + + server.AddRoutes( + []rest.Route{ { + // 创新类别 Method: http.MethodPost, Path: "/categories", Handler: mpinfoorganizationcategory.CreateCategoryHandler(serverCtx), }, { + // 查询类别详情 + Method: http.MethodGet, + Path: "/categories/:id", + Handler: mpinfoorganizationcategory.GetCategoryHandler(serverCtx), + }, + { + // 修改类别 Method: http.MethodPut, Path: "/categories/:id", Handler: mpinfoorganizationcategory.UpdateCategoryHandler(serverCtx), }, { + // 修改类别父级 Method: http.MethodPatch, Path: "/categories/:id", Handler: mpinfoorganizationcategory.PatchCategoryHandler(serverCtx), }, { + // 删除类别 Method: http.MethodDelete, Path: "/categories/:id", Handler: mpinfoorganizationcategory.DeleteCategoryHandler(serverCtx), }, + { + // 查询类别列表 + Method: http.MethodGet, + Path: "/category-tree", + Handler: mpinfoorganizationcategory.ListCategoryTreeHandler(serverCtx), + }, }, rest.WithPrefix("/api/v1/mp/info-organization"), ) server.AddRoutes( rest.WithMiddlewares( - []rest.Middleware{serverCtx.WebCustomerJWTAuth}, + []rest.Middleware{serverCtx.OpenAPIJWTAuth, serverCtx.OpenAPIPlatformGet}, []rest.Route{ { - Method: http.MethodGet, - Path: "/types/page-list", - Handler: mpdictionary.ListDictionaryPageTypesHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/types/:type", - Handler: mpdictionary.GetDictionaryTypeHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/items", - Handler: mpdictionary.ListDictionaryItemsHandler(serverCtx), + // Create a new echo message + Method: http.MethodPost, + Path: "/echo", + Handler: openapi.CreateEchoHandler(serverCtx), }, { + // Get the version of the API Method: http.MethodGet, - Path: "/items/:type/:key", - Handler: mpdictionary.GetDictionaryItemHandler(serverCtx), + Path: "/version", + Handler: openapi.GetVersionHandler(serverCtx), }, }..., ), - rest.WithPrefix("/api/v1/web/dictionary"), + rest.WithPrefix("/openapi/v1"), ) server.AddRoutes( []rest.Route{ { + // Auth by platform Method: http.MethodPost, - Path: "/login", - Handler: webcustomerauth.LoginHandler(serverCtx), + Path: "/", + Handler: openapiauth.AuthPlatformHandler(serverCtx), }, + }, + rest.WithPrefix("/openapi/v1/auth"), + ) + + server.AddRoutes( + []rest.Route{ { - Method: http.MethodPost, - Path: "/registerByPhone", - Handler: webcustomerauth.RegisterCustomerByPhoneHandler(serverCtx), + // 插件路由拉取 + Method: http.MethodGet, + Path: "/plugin/v1/frontend-routes", + Handler: plugin.ListPluginFrontendRoutesHandler(serverCtx), }, { + // 插件接口 Method: http.MethodPost, - Path: "/registerByPhone/invite/:code", - Handler: webcustomerauth.RegisterCustomerByPhoneInInviteCodeHandler(serverCtx), + Path: "/plugin/v1/plugins", + Handler: plugin.RegisterPluginHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/registerByPhone/register/:code", - Handler: webcustomerauth.RegisterCustomerByPhoneInRegisterCodeHandler(serverCtx), + // 插件列表拉取 + Method: http.MethodGet, + Path: "/plugin/v1/plugins", + Handler: plugin.ListPluginHandler(serverCtx), }, }, - rest.WithPrefix("/api/v1/web/customer"), + rest.WithPrefix("/api/v1"), + ) + + server.AddRoutes( + []rest.Route{ + { + // 健康检查接口 + Method: http.MethodGet, + Path: "/health", + Handler: systemhealth.HealthCheckHandler(serverCtx), + }, + }, + rest.WithPrefix("/api/v1/system"), ) server.AddRoutes( @@ -2259,11 +2573,13 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.WebCustomerJWTAuth, serverCtx.WebCustomerGet}, []rest.Route{ { + // 客户信息更新 Method: http.MethodPost, Path: "/updateCustomerProfile/:id", Handler: webcustomerauth.UpdateCustomerProfileHandler(serverCtx), }, { + // 获取用户信息 Method: http.MethodGet, Path: "/user-info", Handler: webcustomerauth.GetUserInfoHandler(serverCtx), @@ -2276,19 +2592,28 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( []rest.Route{ { + // 微信Web登录 Method: http.MethodPost, - Path: "/oa/login", - Handler: webcustomerauthoa.OALoginHandler(serverCtx), + Path: "/login", + Handler: webcustomerauth.LoginHandler(serverCtx), }, { + // 客户手机注册 Method: http.MethodPost, - Path: "/oa/authByPhone", - Handler: webcustomerauthoa.AuthByPhoneHandler(serverCtx), + Path: "/registerByPhone", + Handler: webcustomerauth.RegisterCustomerByPhoneHandler(serverCtx), }, { + // 客户手机注册,邀请码机制 Method: http.MethodPost, - Path: "/oa/authByProfile", - Handler: webcustomerauthoa.AuthByProfileHandler(serverCtx), + Path: "/registerByPhone/invite/:code", + Handler: webcustomerauth.RegisterCustomerByPhoneInInviteCodeHandler(serverCtx), + }, + { + // 客户手机注册,注册码机制 + Method: http.MethodPost, + Path: "/registerByPhone/register/:code", + Handler: webcustomerauth.RegisterCustomerByPhoneInRegisterCodeHandler(serverCtx), }, }, rest.WithPrefix("/api/v1/web/customer"), @@ -2297,12 +2622,25 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( []rest.Route{ { - Method: http.MethodGet, - Path: "/qrcode/detail/:qid", - Handler: webscene.DetailQrcodeHandler(serverCtx), + // 客户手机授权 + Method: http.MethodPost, + Path: "/oa/authByPhone", + Handler: webcustomerauthoa.AuthByPhoneHandler(serverCtx), + }, + { + // 公众号客户信息授权 + Method: http.MethodPost, + Path: "/oa/authByProfile", + Handler: webcustomerauthoa.AuthByProfileHandler(serverCtx), + }, + { + // 微信公众号登录 + Method: http.MethodPost, + Path: "/oa/login", + Handler: webcustomerauthoa.OALoginHandler(serverCtx), }, }, - rest.WithPrefix("/api/v1/web/scene"), + rest.WithPrefix("/api/v1/web/customer"), ) server.AddRoutes( @@ -2310,35 +2648,41 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Middleware{serverCtx.WebCustomerJWTAuth}, []rest.Route{ { - Method: http.MethodGet, - Path: "/category-tree", - Handler: webinfoorganizationcategory.ListCategoryTreeHandler(serverCtx), + // 创新类别 + Method: http.MethodPost, + Path: "/categories", + Handler: webinfoorganizationcategory.CreateCategoryHandler(serverCtx), }, { + // 查询类别详情 Method: http.MethodGet, Path: "/categories/:id", Handler: webinfoorganizationcategory.GetCategoryHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/categories", - Handler: webinfoorganizationcategory.CreateCategoryHandler(serverCtx), - }, - { + // 修改类别 Method: http.MethodPut, Path: "/categories/:id", Handler: webinfoorganizationcategory.UpdateCategoryHandler(serverCtx), }, { + // 修改类别父级 Method: http.MethodPatch, Path: "/categories/:id", Handler: webinfoorganizationcategory.PatchCategoryHandler(serverCtx), }, { + // 删除类别 Method: http.MethodDelete, Path: "/categories/:id", Handler: webinfoorganizationcategory.DeleteCategoryHandler(serverCtx), }, + { + // 查询类别列表 + Method: http.MethodGet, + Path: "/category-tree", + Handler: webinfoorganizationcategory.ListCategoryTreeHandler(serverCtx), + }, }..., ), rest.WithPrefix("/api/v1/web/info-organization"), @@ -2347,32 +2691,12 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( []rest.Route{ { - Method: http.MethodPost, - Path: "/plugin/v1/plugins", - Handler: plugin.RegisterPluginHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/plugin/v1/plugins", - Handler: plugin.ListPluginHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/plugin/v1/frontend-routes", - Handler: plugin.ListPluginFrontendRoutesHandler(serverCtx), - }, - }, - rest.WithPrefix("/api/v1"), - ) - - server.AddRoutes( - []rest.Route{ - { + // 获取场景落地页详情 Method: http.MethodGet, - Path: "/health", - Handler: systemhealth.HealthCheckHandler(serverCtx), + Path: "/qrcode/detail/:qid", + Handler: webscene.DetailQrcodeHandler(serverCtx), }, }, - rest.WithPrefix("/api/v1/system"), + rest.WithPrefix("/api/v1/web/scene"), ) } diff --git a/internal/logic/admin/scrm/app/detailweworkapplogic.go b/internal/logic/admin/scrm/app/detailweworkapplogic.go index 1ee4af6b..cab9d494 100644 --- a/internal/logic/admin/scrm/app/detailweworkapplogic.go +++ b/internal/logic/admin/scrm/app/detailweworkapplogic.go @@ -71,8 +71,8 @@ func (app *DetailWeWorkAppLogic) DTO(detail *response.ResponseAgentGet) *types.A func (app *DetailWeWorkAppLogic) allowUserInfos(infos response.ResponseAgentAllowUserInfos) (infox types.AllowUserinfos) { for _, user := range infos.User { - infox.User = append(infox.User, types.User{ - Account: user.UserID, + infox.User = append(infox.User, types.WeworkUser{ + Userid: user.UserID, }) } return infox diff --git a/internal/logic/admin/user/listuserlogic.go b/internal/logic/admin/user/listuserlogic.go index c36b1767..d0eed4a5 100644 --- a/internal/logic/admin/user/listuserlogic.go +++ b/internal/logic/admin/user/listuserlogic.go @@ -14,13 +14,13 @@ import ( "github.com/zeromicro/go-zero/core/logx" ) -type ListUsersLogic struct { +type ListUserLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } -func NewListUsersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListUsersLogic { +func NewListUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListUsersLogic { return &ListUsersLogic{ Logger: logx.WithContext(ctx), ctx: ctx, @@ -28,7 +28,7 @@ func NewListUsersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListUse } } -func (l *ListUsersLogic) ListUsers(req *types.ListUsersRequest) (resp *types.ListUsersReply, err error) { +func (l *ListUsersLogic) ListUser(req *types.ListUsersRequest) (resp *types.ListUsersReply, err error) { opt := option.FindManyUsersOption{ Ids: req.Ids, LikeName: req.LikeName, diff --git a/internal/logic/admin/user/listuserslogic.go b/internal/logic/admin/user/listuserslogic.go new file mode 100644 index 00000000..f9f04d28 --- /dev/null +++ b/internal/logic/admin/user/listuserslogic.go @@ -0,0 +1,31 @@ +package user + +import ( + "context" + + "PowerX/internal/svc" + "PowerX/internal/types" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListUsersLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +// List员工 +func NewListUsersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListUsersLogic { + return &ListUsersLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *ListUsersLogic) ListUsers(req *types.ListUsersRequest) (resp *types.ListUsersReply, err error) { + // todo: add your logic here and delete this line + + return +} diff --git a/internal/logic/openapi/auth/authplatformlogic.go b/internal/logic/openapi/auth/authplatformlogic.go new file mode 100644 index 00000000..9a6a76a5 --- /dev/null +++ b/internal/logic/openapi/auth/authplatformlogic.go @@ -0,0 +1,49 @@ +package auth + +import ( + "PowerX/internal/types/errorx" + customerdomain2 "PowerX/internal/uc/powerx/crm/customerdomain" + "context" + "fmt" + + "PowerX/internal/svc" + "PowerX/internal/types" + + "github.com/zeromicro/go-zero/core/logx" +) + +type AuthPlatformLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +// Auth by platform +func NewAuthPlatformLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AuthPlatformLogic { + return &AuthPlatformLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *AuthPlatformLogic) AuthPlatform(req *types.PlatformAuthRequest) (resp *types.PlatformAuthResponse, err error) { + + // 暂时只开放给BrainX + if req.AccessKey != l.svcCtx.Config.OpenAPI.Platforms.BrainX.AccessKey { + return nil, errorx.ErrOpenAPIPlatformUnAuthorization + + } + if req.SecretKey != l.svcCtx.Config.OpenAPI.Platforms.BrainX.SecretKey { + return nil, errorx.ErrOpenAPIPlatformInvalidSecret + } + + token := l.svcCtx.OpenAPI.Auth.SignPlatformToken(req.AccessKey, l.svcCtx.Config.OpenAPI.Platforms.BrainX.SecretKey) + + return &types.PlatformAuthResponse{ + TokenType: token.TokenType, + ExpiresIn: fmt.Sprintf("%d", customerdomain2.CustomerTokenExpiredDuration), + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, + }, err +} diff --git a/internal/logic/openapi/createechologic.go b/internal/logic/openapi/createechologic.go new file mode 100644 index 00000000..c5bc4821 --- /dev/null +++ b/internal/logic/openapi/createechologic.go @@ -0,0 +1,35 @@ +package openapi + +import ( + "PowerX/internal/uc/openapi" + "context" + + "PowerX/internal/svc" + "PowerX/internal/types" + + "github.com/zeromicro/go-zero/core/logx" +) + +type CreateEchoLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +// Create a new echo message +func NewCreateEchoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateEchoLogic { + return &CreateEchoLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *CreateEchoLogic) CreateEcho(req *types.CreateEchoRequest) (resp *types.CreateEchoResponse, err error) { + vAuthPlatform := l.ctx.Value(openapi.AuthPlatformKey) + authCustomer := vAuthPlatform.(string) + + return &types.CreateEchoResponse{ + Response: "hello:" + authCustomer, + }, nil +} diff --git a/internal/logic/openapi/getversionlogic.go b/internal/logic/openapi/getversionlogic.go new file mode 100644 index 00000000..91359f81 --- /dev/null +++ b/internal/logic/openapi/getversionlogic.go @@ -0,0 +1,31 @@ +package openapi + +import ( + "context" + + "PowerX/internal/svc" + "PowerX/internal/types" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetVersionLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +// Get the version of the API +func NewGetVersionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetVersionLogic { + return &GetVersionLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *GetVersionLogic) GetVersion() (resp *types.GetVersionResponse, err error) { + return &types.GetVersionResponse{ + Version: "version 0.0.1", + }, nil +} diff --git a/internal/middleware/base.go b/internal/middleware/base.go new file mode 100644 index 00000000..3b69badf --- /dev/null +++ b/internal/middleware/base.go @@ -0,0 +1,29 @@ +package middleware + +type Option struct { + Public []string + WhiteList []string + DisableAuth bool +} + +type OptionFunc func(opt *Option) + +// WithPublicPrefix 公开访问前缀 +func WithPublicPrefix(path ...string) OptionFunc { + return func(opt *Option) { + opt.Public = path + } +} + +// WithWhiteListPrefix 无需权限验证前缀 +func WithWhiteListPrefix(path ...string) OptionFunc { + return func(opt *Option) { + opt.WhiteList = path + } +} + +func DisableToken(b bool) func(opt *Option) { + return func(opt *Option) { + opt.DisableAuth = b + } +} diff --git a/internal/middleware/mpcustomergetmiddleware.go b/internal/middleware/mpcustomergetmiddleware.go index 38333f17..03c44bf0 100644 --- a/internal/middleware/mpcustomergetmiddleware.go +++ b/internal/middleware/mpcustomergetmiddleware.go @@ -16,7 +16,7 @@ type MPCustomerGetMiddleware struct { px *uc.PowerXUseCase } -func NewMPCustomerGetMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...optionFunc) *MPCustomerGetMiddleware { +func NewMPCustomerGetMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...OptionFunc) *MPCustomerGetMiddleware { return &MPCustomerGetMiddleware{ conf: conf, px: px, diff --git a/internal/middleware/mpcustomerjwtauthmiddleware.go b/internal/middleware/mpcustomerjwtauthmiddleware.go index 0286d975..9ce4ff2e 100644 --- a/internal/middleware/mpcustomerjwtauthmiddleware.go +++ b/internal/middleware/mpcustomerjwtauthmiddleware.go @@ -20,7 +20,7 @@ type MPCustomerJWTAuthMiddleware struct { px *uc.PowerXUseCase } -func NewMPCustomerJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...optionFunc) *MPCustomerJWTAuthMiddleware { +func NewMPCustomerJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...OptionFunc) *MPCustomerJWTAuthMiddleware { return &MPCustomerJWTAuthMiddleware{ conf: conf, px: px, diff --git a/internal/middleware/mpmembershipgetmiddleware.go b/internal/middleware/mpmembershipgetmiddleware.go deleted file mode 100644 index eb3dbeb5..00000000 --- a/internal/middleware/mpmembershipgetmiddleware.go +++ /dev/null @@ -1,19 +0,0 @@ -package middleware - -import "net/http" - -type MPMembershipGetMiddleware struct { -} - -func NewMPMembershipGetMiddleware() *MPMembershipGetMiddleware { - return &MPMembershipGetMiddleware{} -} - -func (m *MPMembershipGetMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // TODO generate middleware implement function, delete after code implementation - - // Passthrough to next handler if need - next(w, r) - } -} diff --git a/internal/middleware/mpmembershipjwtauthmiddleware.go b/internal/middleware/mpmembershipjwtauthmiddleware.go deleted file mode 100644 index d15a3c23..00000000 --- a/internal/middleware/mpmembershipjwtauthmiddleware.go +++ /dev/null @@ -1,19 +0,0 @@ -package middleware - -import "net/http" - -type MPMembershipJWTAuthMiddleware struct { -} - -func NewMPMembershipJWTAuthMiddleware() *MPMembershipJWTAuthMiddleware { - return &MPMembershipJWTAuthMiddleware{} -} - -func (m *MPMembershipJWTAuthMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // TODO generate middleware implement function, delete after code implementation - - // Passthrough to next handler if need - next(w, r) - } -} diff --git a/internal/middleware/openapijwtauthmiddleware.go b/internal/middleware/openapijwtauthmiddleware.go new file mode 100644 index 00000000..9d856f40 --- /dev/null +++ b/internal/middleware/openapijwtauthmiddleware.go @@ -0,0 +1,74 @@ +package middleware + +import ( + "PowerX/internal/config" + "PowerX/internal/types" + "PowerX/internal/types/errorx" + "PowerX/internal/uc" + "PowerX/internal/uc/openapi" + "PowerX/internal/uc/powerx/crm/customerdomain" + "context" + "github.com/golang-jwt/jwt/v4" + "github.com/pkg/errors" + "github.com/zeromicro/go-zero/core/logx" + "github.com/zeromicro/go-zero/rest/httpx" + "net/http" + "strings" +) + +type OpenAPIJWTAuthMiddleware struct { + conf *config.Config + px *uc.PowerXUseCase +} + +func NewOpenAPIJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...OptionFunc) *OpenAPIJWTAuthMiddleware { + return &OpenAPIJWTAuthMiddleware{ + conf: conf, + px: px, + } +} + +func (m *OpenAPIJWTAuthMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc { + secret := m.conf.OpenAPI.Platforms.BrainX.SecretKey + unAuth := errorx.ErrUnAuthorization.(*errorx.Error) + + return func(writer http.ResponseWriter, request *http.Request) { + + authorization := request.Header.Get("Authorization") + splits := strings.Split(authorization, "Bearer") + if len(splits) != 2 { + httpx.Error(writer, unAuth) + return + } + tokenString := strings.TrimSpace(splits[1]) + + var claims types.TokenClaims + token, err := jwt.ParseWithClaims(tokenString, &claims, func(token *jwt.Token) (interface{}, error) { + return []byte(secret), nil + }) + if err != nil || !token.Valid { + if errors.Is(err, jwt.ErrTokenMalformed) { + httpx.Error(writer, unAuth) + } else if errors.Is(err, jwt.ErrTokenExpired) || errors.Is(err, jwt.ErrTokenNotValidYet) { + httpx.Error(writer, unAuth) + } else { + logx.WithContext(request.Context()).Error(err) + httpx.Error(writer, errorx.WithCause(unAuth, "违规Token")) + } + return + } + + // 获取对接平台的platformId + payload, err := customerdomain.GetPayloadFromToken(token.Raw) + if err != nil { + logx.WithContext(request.Context()).Error(err) + httpx.Error(writer, errorx.WithCause(unAuth, "无效客户信息")) + return + } + platformId := payload[openapi.AuthPlatformIdKey] + ctx := context.WithValue(request.Context(), openapi.AuthPlatformKey, platformId) + + // Pass through to next handler if need + next(writer, request.WithContext(ctx)) + } +} diff --git a/internal/middleware/openapiplatformgetmiddleware.go b/internal/middleware/openapiplatformgetmiddleware.go new file mode 100644 index 00000000..4dbdaffd --- /dev/null +++ b/internal/middleware/openapiplatformgetmiddleware.go @@ -0,0 +1,62 @@ +package middleware + +import ( + "PowerX/internal/config" + "PowerX/internal/types/errorx" + "PowerX/internal/uc" + "PowerX/internal/uc/openapi" + fmt "PowerX/pkg/printx" + "context" + "github.com/zeromicro/go-zero/rest/httpx" + "net/http" +) + +type OpenAPIPlatformGetMiddleware struct { + conf *config.Config + px *uc.PowerXUseCase +} + +func NewOpenAPIPlatformGetMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...OptionFunc) *OpenAPIPlatformGetMiddleware { + return &OpenAPIPlatformGetMiddleware{ + conf: conf, + px: px, + } +} + +func (m *OpenAPIPlatformGetMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + + unAuth := errorx.ErrUnAuthorization.(*errorx.Error) + + vPlatformId := r.Context().Value(openapi.AuthPlatformKey) + if vPlatformId == nil { + httpx.Error(w, errorx.WithCause(unAuth, "无效授权平台Id")) + return + } + fmt.Dump(vPlatformId) + platformId := vPlatformId.(string) + if platformId == "" { + httpx.Error(w, errorx.WithCause(unAuth, "授权授权平台Id为空")) + return + } + + //// 平台记录是否存在 + //authMPCustomer, err := m.px.WechatMP.FindOneMPCustomer(r.Context(), &wechat.FindMPCustomerOption{ + // OpenIds: []string{openId}, + //}) + //if err != nil { + // httpx.Error(w, errorx.WithCause(unAuth, "无效微信小程序客户")) + // return + //} + + // 平台记录是否存在 + //if authMPCustomer.Customer == nil { + // httpx.Error(w, errorx.WithCause(unAuth, "无效客户记录")) + // return + //} + + ctx := context.WithValue(r.Context(), openapi.AuthPlatformKey, "tobe query platform record") + + next(w, r.WithContext(ctx)) + } +} diff --git a/internal/middleware/Readme.md b/internal/middleware/readme.md similarity index 100% rename from internal/middleware/Readme.md rename to internal/middleware/readme.md diff --git a/internal/middleware/userjwtauthmiddleware.go b/internal/middleware/userjwtauthmiddleware.go index defbd5c0..75141c7e 100644 --- a/internal/middleware/userjwtauthmiddleware.go +++ b/internal/middleware/userjwtauthmiddleware.go @@ -18,39 +18,11 @@ import ( type UserJWTAuthMiddleware struct { conf *config.Config px *uc.PowerXUseCase - opt option + opt Option } -type option struct { - public []string - whiteList []string - disableAuth bool -} - -type optionFunc func(opt *option) - -// WithPublicPrefix 公开访问前缀 -func WithPublicPrefix(path ...string) optionFunc { - return func(opt *option) { - opt.public = path - } -} - -// WithWhiteListPrefix 无需权限验证前缀 -func WithWhiteListPrefix(path ...string) optionFunc { - return func(opt *option) { - opt.whiteList = path - } -} - -func DisableToken(b bool) func(opt *option) { - return func(opt *option) { - opt.disableAuth = b - } -} - -func NewUserJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...optionFunc) *UserJWTAuthMiddleware { - opt := option{} +func NewUserJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...OptionFunc) *UserJWTAuthMiddleware { + opt := Option{} for _, o := range opts { o(&opt) } @@ -68,12 +40,12 @@ func (m *UserJWTAuthMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc { unKnow := errorx.ErrUnKnow.(*errorx.Error) publicRouter := mux.NewRouter() - for _, s := range m.opt.public { + for _, s := range m.opt.Public { publicRouter.NewRoute().PathPrefix(s) } whiteRouter := mux.NewRouter() - for _, s := range m.opt.whiteList { + for _, s := range m.opt.WhiteList { whiteRouter.NewRoute().PathPrefix(s) } @@ -86,7 +58,7 @@ func (m *UserJWTAuthMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc { } // 校验Token - if m.opt.disableAuth { + if m.opt.DisableAuth { next(writer, request) return } diff --git a/internal/middleware/usernopermjwtauthmiddleware.go b/internal/middleware/usernopermjwtauthmiddleware.go index fe2195e0..6ce1dd79 100644 --- a/internal/middleware/usernopermjwtauthmiddleware.go +++ b/internal/middleware/usernopermjwtauthmiddleware.go @@ -10,11 +10,11 @@ import ( type UserNoPermJWTAuthMiddleware struct { conf *config.Config px *uc.PowerXUseCase - opt option + opt Option } -func NewUserNoPermJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...optionFunc) *UserJWTAuthMiddleware { - opt := option{} +func NewUserNoPermJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...OptionFunc) *UserJWTAuthMiddleware { + opt := Option{} for _, o := range opts { o(&opt) } @@ -32,12 +32,12 @@ func (m *UserNoPermJWTAuthMiddleware) Handle(next http.HandlerFunc) http.Handler //unKnow := errorx.ErrUnKnow.(*errorx.Error) publicRouter := mux.NewRouter() - for _, s := range m.opt.public { + for _, s := range m.opt.Public { publicRouter.NewRoute().PathPrefix(s) } whiteRouter := mux.NewRouter() - for _, s := range m.opt.whiteList { + for _, s := range m.opt.WhiteList { whiteRouter.NewRoute().PathPrefix(s) } diff --git a/internal/middleware/webcustomergetmiddleware.go b/internal/middleware/webcustomergetmiddleware.go index b13f994d..dca8251d 100644 --- a/internal/middleware/webcustomergetmiddleware.go +++ b/internal/middleware/webcustomergetmiddleware.go @@ -15,7 +15,7 @@ type WebCustomerGetMiddleware struct { px *uc.PowerXUseCase } -func NewWebCustomerGetMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...optionFunc) *WebCustomerGetMiddleware { +func NewWebCustomerGetMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...OptionFunc) *WebCustomerGetMiddleware { return &WebCustomerGetMiddleware{ conf: conf, px: px, @@ -27,7 +27,7 @@ func (m *WebCustomerGetMiddleware) Handle(next http.HandlerFunc) http.HandlerFun unAuth := errorx.ErrUnAuthorization.(*errorx.Error) - vCustomerId := r.Context().Value(customerdomain.AuthCustomerCustomerId) + vCustomerId := r.Context().Value(customerdomain.AuthCustomerIdKey) if vCustomerId == nil { httpx.Error(w, errorx.WithCause(unAuth, "无效授权客户Id")) return diff --git a/internal/middleware/webcustomerjwtauthmiddleware.go b/internal/middleware/webcustomerjwtauthmiddleware.go index 408bc0fd..d013458c 100644 --- a/internal/middleware/webcustomerjwtauthmiddleware.go +++ b/internal/middleware/webcustomerjwtauthmiddleware.go @@ -21,7 +21,7 @@ type WebCustomerJWTAuthMiddleware struct { px *uc.PowerXUseCase } -func NewWebCustomerJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...optionFunc) *WebCustomerJWTAuthMiddleware { +func NewWebCustomerJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...OptionFunc) *WebCustomerJWTAuthMiddleware { return &WebCustomerJWTAuthMiddleware{ conf: conf, px: px, @@ -66,7 +66,7 @@ func (m *WebCustomerJWTAuthMiddleware) Handle(next http.HandlerFunc) http.Handle return } customerId, _ := strconv.ParseInt(payload["sub"].(string), 10, 64) - ctx := context.WithValue(request.Context(), customerdomain.AuthCustomerCustomerId, customerId) + ctx := context.WithValue(request.Context(), customerdomain.AuthCustomerIdKey, customerId) // Pass through to next handler if need next(writer, request.WithContext(ctx)) diff --git a/internal/svc/servicecontext.go b/internal/svc/servicecontext.go index 6a239fc5..74b730bc 100644 --- a/internal/svc/servicecontext.go +++ b/internal/svc/servicecontext.go @@ -9,9 +9,10 @@ import ( ) type ServiceContext struct { - Config config.Config - PowerX *uc.PowerXUseCase - Custom *uc.CustomUseCase + Config config.Config + PowerX *uc.PowerXUseCase + OpenAPI *uc.OpenAPIUseCase + Custom *uc.CustomUseCase MPCustomerJWTAuth rest.Middleware MPCustomerGet rest.Middleware @@ -19,23 +20,29 @@ type ServiceContext struct { WebCustomerGet rest.Middleware UserJWTAuth rest.Middleware UserNoPermJWTAuth rest.Middleware + OpenAPIJWTAuth rest.Middleware + OpenAPIPlatformGet rest.Middleware Plugin *pluginx.Manager } func NewServiceContext(c config.Config, opts ...Option) *ServiceContext { powerx, _ := uc.NewPowerXUseCase(&c) + openapi, _ := uc.NewOpenAPIUseCase(&c, powerx) custom, _ := uc.NewCustomUseCase(&c, powerx) svcCtx := ServiceContext{ Config: c, PowerX: powerx, + OpenAPI: openapi, MPCustomerJWTAuth: middleware.NewMPCustomerJWTAuthMiddleware(&c, powerx).Handle, MPCustomerGet: middleware.NewMPCustomerGetMiddleware(&c, powerx).Handle, WebCustomerJWTAuth: middleware.NewWebCustomerJWTAuthMiddleware(&c, powerx).Handle, WebCustomerGet: middleware.NewWebCustomerGetMiddleware(&c, powerx).Handle, UserJWTAuth: middleware.NewUserJWTAuthMiddleware(&c, powerx).Handle, UserNoPermJWTAuth: middleware.NewUserNoPermJWTAuthMiddleware(&c, powerx).Handle, + OpenAPIJWTAuth: middleware.NewOpenAPIJWTAuthMiddleware(&c, powerx).Handle, + OpenAPIPlatformGet: middleware.NewOpenAPIPlatformGetMiddleware(&c, powerx).Handle, Custom: custom, } diff --git a/internal/types/errorx/errors.go b/internal/types/errorx/errors.go index 20e12baa..479edb90 100644 --- a/internal/types/errorx/errors.go +++ b/internal/types/errorx/errors.go @@ -15,6 +15,8 @@ var ErrBadRequest = NewError(400, "BAD_REQUEST", "违规请求") var ErrUnAuthorization = NewError(401, "UN_AUTHORIZATION", "未授权") var ErrPhoneUnAuthorization = NewError(401, "UN_PHONE_AUTHORIZATION", "用户需要先授权登录") +var ErrOpenAPIPlatformUnAuthorization = NewError(401, "ErrOpenAPIPlatformUnAuthorization", "访问平台账号无效") +var ErrOpenAPIPlatformInvalidSecret = NewError(401, "ErrOpenAPIPlatformInvalidSecret", "访问平台账号密钥错误") var ErrNotFoundObject = NewError(400, "OBJECT_NOT_FOUND", "对象未找到") var ErrCreateObject = NewError(400, "OBJECT_CREATE", "创建对象失败") diff --git a/internal/types/types.go b/internal/types/types.go index 50fb4b9f..8acdef4a 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -1,503 +1,492 @@ // Code generated by goctl. DO NOT EDIT. +// goctl 1.7.2 + package types -type GetHomeReply struct { - Greet string `json:"greet,optional"` - Description string `json:"description,optional"` - Version string `json:"version,optional"` +type ActionCorpTagGroupRequest struct { + AgentId *int64 `json:"agentId,optional"` + GroupId *string `json:"groupId,optional"` + GroupName string `json:"groupName,optional"` + Tags []ActionTagGroup `json:"tags"` } -type GetUserOptionsRequest struct { - LikeName string `form:"likeName,optional"` - LikeEmail string `form:"likeEmail,optional"` - LikePhoneNumber string `form:"likePhoneNumber,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type ActionCustomerTagRequest struct { + UserId string `json:"userId"` + ExternalUserId string `json:"externalUserId"` + AddTag []string `json:"addTag,optional"` + RemoveTag []string `json:"removeTag,optional"` } -type UserOption struct { - Id int64 `json:"id"` - Avatar string `json:"avatar"` - Account string `json:"account"` - Name string `json:"name"` - Email string `json:"email"` - PhoneNumber string `json:"phoneNumber"` +type ActionQrcodeActiveReply struct { + Status string `json:"status"` } -type GetUserOptionsReply struct { - List []UserOption `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type ActionRequest struct { + Qid string `path:"qid"` // 唯一标识 + SceneQrcodeLink string `json:"sceneQrcodeLink,optional"` } -type UserQueryRoleOption struct { - RoleCode string `json:"roleCode"` - RoleName string `json:"roleName"` +type ActionTagGroup struct { + TagId string `json:"tagId,optional"` + TagName string `json:"tagName,optional"` } -type UserQueryDepartmentOption struct { - DepartmentId int64 `json:"departmentId"` - DepartmentName string `json:"departmentName"` +type ActionWeWorkGroupQrcodeActiveReply struct { + Status string `json:"status"` } -type GetUserQueryOptionsReply struct { - Roles []UserQueryRoleOption `json:"roles"` - Departments []UserQueryDepartmentOption `json:"departments"` +type ActivePriceEntry struct { + Id int64 `json:"id,optional"` + UnitPrice float64 `json:"unitPrice,optional"` + ListPrice float64 `json:"listPrice,optional"` + Discount float32 `json:"discount,optional"` } -type GetDepartmentOptionsRequest struct { - Ids []int64 `form:"ids,optional"` - LikeName string `form:"likeName,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type AddToCartReply struct { + *CartItem } -type DepartmentOption struct { - Id int64 `json:"id"` - Name string `json:"name"` +type AddToCartRequest struct { + CartItem } -type GetDepartmentOptionsReply struct { - List []DepartmentOption `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type AdminAPI struct { + Id int64 `json:"id"` + API string `json:"api"` + Method string `json:"method"` + Name string `json:"name"` + GroupId int64 `json:"groupId"` + GroupName string `json:"groupName"` + Desc string `json:"desc"` } -type GetOptionsRequest struct { - Type string `form:"type,optional"` - Search string `form:"search,optional"` +type AdminRole struct { + RoleCode string `json:"roleCode"` + Name string `json:"name"` + Desc string `json:"desc"` + IsReserved bool `json:"isReserved"` + APIList []AdminAPI `json:"apiList"` + MenuNames []string `json:"menuNames"` } -type GetOptionsReply struct { - Options []map[string]interface{} `json:"options"` +type AllowPartys struct { + Partyid []int `json:"partyId"` } -type DepartmentLeader struct { - Id int64 `json:"id"` - Name string `json:"name"` - NickName string `json:"nickName"` - Avatar string `json:"avatar"` +type AllowTags struct { + Tagid []int `json:"tagId"` } -type DepartmentNode struct { - Id int64 `json:"id"` - DepName string `json:"depName"` - Leader DepartmentLeader `json:"leader"` - PhoneNumber string `json:"phoneNumber"` - Email string `json:"email"` - Remark string `json:"remark"` - Children []DepartmentNode `json:"children"` +type AllowUserinfos struct { + User []WeworkUser `json:"user"` } -type GetDepartmentTreeRequest struct { - DepId int64 `path:"depId"` +type AppGroupCreateReply struct { + ChatId string `json:"chatId"` } -type GetDepartmentTreeReply struct { - DepTree DepartmentNode `json:"depTree"` +type AppGroupCreateRequest struct { + Name string `json:"name"` // 名称 + Owner string `json:"owner"` // owner + UserList []string `json:"userList"` // 用户列表 + ChatId string `json:"chatId,optional"` } -type CreateDepartmentRequest struct { - DepName string `json:"depName"` - LeaderId int64 `json:"leaderId"` - PId int64 `json:"pId"` - Desc string `json:"desc,optional"` - PhoneNumber string `json:"phoneNumber,optional"` - Email string `json:"email,optional"` - Remark string `json:"remark,optional"` +type AppGroupListReply struct { + List interface{} `json:"list"` } -type CreateDepartmentReply struct { - Id int64 `json:"id"` +type AppGroupListRequest struct { + ChatId string `form:"chatId,optional"` } -type DeleteDepartmentRequest struct { - Id int64 `path:"id"` +type AppGroupMessageArticleRequest struct { + ChatIds []string `json:"chatIds"` + Title string `json:"title"` // "领奖通知", + Description string `json:"description"` // "