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"` // "
2016年9月26日
恭喜你抽中iPhone 7一台,领奖码:xxxx
请于2016年10月10日前联系行政同事领取
", + URL string `json:"url"` // "URL", + PicURL string `json:"picUrl"` // 多" + AppID string `json:"appId,optional"` + PagePath string `json:"pagePath,optional"` + SendTime int64 `json:"sendTime,optional"` // 定时发送,不填默认立刻发送 } -type DeleteDepartmentReply struct { - Id int64 `json:"id"` +type AppGroupMessageReply struct { + ChatIds []string `json:"chatIds"` } -type PatchDepartmentRequest struct { - Id int64 `path:"id"` - DepName string `json:"depName,optional"` - LeaderId int64 `json:"leaderId,optional"` - PId int64 `json:"pId,optional"` - Desc string `json:"desc,optional"` - PhoneNumber string `json:"phoneNumber,optional"` - Email string `json:"email,optional"` - Remark string `json:"remark,optional"` +type AppMessageArticlesRequest struct { + ToUser string `json:"toUser,optional"` // "UserID1|UserID2|UserID3", + ToParty string `json:"toParty,optional"` // "PartyID1|PartyID2", + ToTag string `json:"toTag,optional"` // "TagID1 | TagID2", + MsgType string `json:"msgType"` // "text", + AgentID int `json:"agentId"` // 1, + News *AppMessageRequestNews `json:"news"` // 内容 + SendTime int64 `json:"sendTime,optional"` // 定时发送,不填默认立刻发送 } -type PatchDepartmentReply struct { - *Department +type AppMessageBaseReply struct { + Message string `json:"message"` } -type Department 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"` +type AppMessageRequestNews struct { + Article []*Article `json:"articles"` } -type GetDepartmentRequest struct { - Id int64 `path:"id"` +type AppWeWorkListReply struct { + List []*AppWechat `json:"list"` } -type GetDepartmentReply struct { - *Department +type AppWechat struct { + Agentid int `json:"agentId"` + Name string `json:"name"` + SquareLogoUrl string `json:"squareLogoUrl"` } -type Position struct { - Id int64 `json:"id"` - Name string `json:"name"` - Desc string `json:"desc"` - Level string `json:"level"` - RoleCodes []string `json:"roleCodes"` +type ApplicationReply struct { + Agentid int `json:"agentId"` + Name string `json:"name"` + SquareLogoUrl string `json:"squareLogoUrl"` + Description string `json:"description"` + AllowUserinfos AllowUserinfos `json:"allowUserInfos"` + AllowPartys AllowPartys `json:"allowPartys"` + AllowTags AllowTags `json:"allowTags"` + Close int `json:"close"` + RedirectDomain string `json:"redirectDomain"` + ReportLocationFlag int `json:"reportLocationFlag"` + Isreportenter int `json:"isreportenter"` + HomeUrl string `json:"homeUrl"` + CustomizedPublishStatus int `json:"customizedPublishStatus"` } -type CreatePositionRequest struct { - Name string `json:"name"` - Desc string `json:"desc,optional"` - Level string `json:"level"` - RoleCodes []string `json:"roleCodes"` +type ApplicationRequest struct { + AgentId int `form:"agentId"` } -type CreatePositionReply struct { - Id int64 `json:"id"` +type Article struct { + Title string `json:"title"` // "领奖通知", + Description string `json:"description"` // "
2016年9月26日
恭喜你抽中iPhone 7一台,领奖码:xxxx
请于2016年10月10日前联系行政同事领取
", + URL string `json:"url"` // "URL", + PicURL string `json:"picUrl"` // + AppID string `json:"appId"` + PagePath string `json:"pagePath"` } -type PatchPositionRequest struct { - Id int64 `path:"id"` - Name string `json:"name,optional"` - Desc string `json:"desc,optional"` - Level string `json:"level,optional"` - RoleCodes []string `json:"roleCodes,optional"` +type Artisan struct { + Id int64 `json:"id,optional"` + UserId int64 `json:"userId,optional"` + Name string `json:"name,optional"` + Level int8 `json:"level"` + Gender bool `json:"gender,optional"` + Birthday string `json:"birthday,optional"` + PhoneNumber string `json:"phoneNumber,optional"` + WorkNo string `json:"workNo"` + Email string `json:"email,optional"` + Experience string `json:"experience,optional"` + Specialty string `json:"specialty,optional"` + Certificate string `json:"certificate,optional"` + Address string `json:"address,optional"` + CreatedAt string `json:"createdAt,optional"` + CoverImageId int64 `json:"coverImageId,optional"` + CoverImage *MediaResource `json:"coverImage,optional"` + DetailImageIds []int64 `json:"detailImageIds,optional"` + DetailImages []*MediaResource `json:"detailIOmages,optional"` + StoreIds []int64 `json:"storeIds,optional"` } -type PatchPositionReply struct { - *Position +type AssignCustomerToUserReply struct { + CustomerId int64 `json:"customerId"` } -type DeletePositionRequest struct { - Id int64 `path:"id"` +type AssignCustomerToUserRequest struct { + Id string `path:"id"` + UserId int64 `json:"userId"` } -type DeletePositionReply struct { - Id int64 `json:"id"` +type AssignLeadToUserReply struct { + LeadId int64 `json:"leadId"` } -type ListPositionsRequest struct { - LikeName string `query:"likeName,optional"` +type AssignLeadToUserRequest struct { + Id string `path:"id"` + UserId int64 `json:"userId"` } -type ListPositionsReply struct { - List []Position `json:"list"` +type AssignProductToProductCategoryReply struct { + Product } -type GetPositionRequest struct { - Id int64 `path:"id"` +type AssignProductToProductCategoryRequest struct { + Id int64 `json:"id"` + ProductCategoryId int64 `json:"productCategoryId"` } -type GetPositionReply struct { - *Position +type AssignRegisterCodeToUserReply struct { + RegisterCodeId int64 `json:"customerId"` } -type GetUserRequest struct { - Id int64 `path:"id"` +type AssignRegisterCodeToUserRequest struct { + Id string `path:"id"` + UserId int64 `json:"userId"` } -type GetUserReply struct { - *User +type AssignStoreManagerReply struct { + Store } -type ListUsersRequest struct { - Ids []int64 `form:"ids,optional"` - LikeName string `form:"likeName,optional"` - LikeEmail string `form:"likeEmail,optional"` - DepIds []int64 `form:"depIds,optional"` - PositionIds []int64 `form:"positionIds,optional"` - LikePhoneNumber string `form:"likePhoneNumber,optional"` - RoleCodes []string `form:"roleCodes,optional"` - IsEnabled *bool `form:"isEnable,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type AssignStoreManagerRequest struct { + Id int64 `path:"id"` + UserId int64 `json:"userId"` } -type UserDepartment struct { - DepId int64 `json:"depId"` - DepName string `json:"depName"` +type AssignUserToOpportunityReply struct { + Id int64 `json:"id"` } -type User struct { - Id int64 `json:"id"` - Account string `json:"account"` - Name string `json:"name"` - Email string `json:"email"` - MobilePhone string `json:"mobilePhone"` - Gender string `json:"gender"` - NickName string `json:"nickName,optional"` - Desc string `json:"desc,optional"` - Avatar string `json:"avatar,optional"` - ExternalEmail string `json:"externalEmail,optional"` - Roles []string `json:"roles"` - Department *UserDepartment `json:"department"` - Position *Position `json:"position"` - PositionId int64 `json:"positionId"` - JobTitle string `json:"jobTitle"` - IsEnabled bool `json:"isEnabled"` - CreatedAt string `json:"createdAt"` +type AssignUserToOpportunityRequest struct { + Id int64 `path:"id"` + UserId int64 `json:"userId"` } -type ListUsersReply struct { - List []User `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type BillingAddress struct { + Id int64 `json:"id,optional"` + OrderId int64 `gorm:"comment:订单Id; index" json:"orderId"` + CustomerId int64 `json:"customerId,optional"` + Recipient string `json:"recipient,optional"` + AddressLine string `json:"addressLine,optional"` + AddressLine2 string `json:"addressLine2,optional"` + Street string `json:"street,optional"` + City string `json:"city,optional"` + Province string `json:"province,optional"` + PostalCode string `json:"postalCode,optional"` + Country string `json:"country,optional"` + PhoneNumber string `json:"phoneNumber,optional"` + IsDefault bool `json:"isDefault,optional"` } -type SyncUsersRequest struct { - Source string `json:"source"` - Target string `json:"target"` +type BindArtisansToStoresReply struct { + PivotIds []int64 `json:"pivotIds"` } -type SyncUsersReply struct { - Status bool `json:"status"` +type BindArtisansToStoresRequest struct { + ArtisanIds []int64 `json:"artisanIds"` + StoreId []int64 `json:"storeIds"` } -type CreateUserRequest struct { - Account string `json:"account"` - Name string `json:"name"` - NickName string `json:"nickName,optional"` - Desc string `json:"desc,optional"` - Email string `json:"email"` - Avatar string `json:"avatar,optional"` - ExternalEmail string `json:"externalEmail,optional"` - MobilePhone string `json:"mobilePhone,optional"` - Gender string `json:"gender,options=male|female|un_know"` - DepId int64 `json:"depId"` - PositionId int64 `json:"positionId,optional"` - JobTitle string `json:"jobTitle,optional"` - Password string `json:"password,optional"` +type CancelOrderReply struct { + OrderId int64 `json:"orderId,optional"` } -type CreateUserReply struct { - Id int64 `json:"id"` +type CancelOrderRequest struct { + OrderId int64 `path:"id"` } -type UpdateUserRequest struct { - Id int64 `path:"id"` - Name string `json:"name,optional"` - NickName string `json:"nickName,optional"` - Desc string `json:"desc,optional"` - Email string `json:"email,optional"` - Avatar string `json:"avatar,optional"` - ExternalEmail string `json:"externalEmail,optional"` - MobilePhone string `json:"mobilePhone,optional"` - Gender string `json:"gender,optional,options=male|female|un_know"` - DepId int64 `json:"depId,optional"` - PositionId int64 `json:"positionId,optional"` - JobTitle string `json:"jobTitle,optional"` - Password string `json:"password,optional"` - Status string `json:"status,optional,options=enabled|disabled"` +type Cart struct { + Id int64 `json:"id", optional"` + CustomerId int64 `json:"customerId", optional"` + Status int `json:"status", optional"` + Items []*CartItem `json:"items", optional"` } -type UpdateUserReply struct { - *User +type CartItem struct { + Id int64 `json:"id, optional"` + CustomerId int64 `json:"customerId,omitempty,optional"` + CartId int64 `json:"cartId,omitempty,optional"` + ProductId int64 `json:"productId,omitempty,optional"` + SkuId int64 `json:"skuId,omitempty,optional"` + ProductName string `json:"productName,omitempty,optional"` + ListPrice float64 `json:"listPrice,omitempty,optional"` + UnitPrice float64 `json:"unitPrice,omitempty,optional"` + Discount float64 `json:"discount,omitempty,optional"` + Quantity int `json:"quantity,omitempty,optional"` + Specifications string `json:"specifications,omitempty,optional"` + ImageURL string `json:"imageUrl,omitempty,optional"` } -type DeleteUserRequest struct { - Id int64 `path:"id"` +type Category struct { + Id int64 `json:"id,optional"` + PId int64 `json:"pId"` + Name string `json:"name"` + Sort int `json:"sort"` + ViceName string `json:"viceName"` + Description string `json:"description"` + CreatedAt string `json:"createdAt,optional"` + ImageAbleInfo + CoverImageId int64 `json:"coverImageId,optional"` + CoverImage *MediaResource `json:"coverImage,optional"` + Children []*Category `json:"children,optional"` } -type DeleteUserReply struct { - Id int64 `json:"id"` +type ClearCartItemsReply struct { + Message string `json:"message"` } -type ResetPasswordRequest struct { - UserId int64 `json:"userId"` +type ClearCartItemsRequest struct { } -type ResetPasswordReply struct { - Status string `json:"status"` +type ConfigPriceBookEntryReply struct { + PriceBookEntries []*PriceBookEntry `json:"list"` } -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 ConfigPriceBookEntryRequest struct { + PriceBookEntries []PriceBookEntry `json:"priceBookEntries"` } -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 ConfigProductSpecificReply struct { + Result bool `json:"result"` } -type ListRolesReply struct { - List []AdminRole `json:"list"` +type ConfigProductSpecificRequest struct { + ProductSpecifics []ProductSpecific `json:"productSpecifics"` } -type CreateRoleRequest struct { - RoleCode string `json:"roleCode"` - Name string `json:"name"` - Desc string `json:"desc"` - APIIds []int64 `json:"apiIds"` - MenuNames []string `json:"menuNames"` +type ConfigProductStatisticsReply struct { + Result bool `json:"result"` } -type CreateRoleReply struct { - RoleCode string `json:"roleCode"` +type ConfigProductStatisticsRequest struct { + *ProductStatistics } -type GetRoleRequest struct { - RoleCode string `path:"roleCode"` +type ConfigSKUReply struct { + Result bool `json:"result"` } -type GetRoleReply struct { - *AdminRole +type ConfigSKURequest struct { + SKUs []SKU `json:"skus"` } -type PatchRoleReqeust struct { - RoleCode string `path:"roleCode"` - Name string `json:"name"` - Desc string `json:"desc,optional"` - APIIds []int64 `json:"apiIds,optional"` - MenuNames []string `json:"menuNames,optional"` +type Content struct { + Link Link `json:"link,optional"` } -type PatchRoleReply struct { - *AdminRole +type ContractWay struct { + Id int64 `json:"id"` + Type int `json:"type"` + Scene int `json:"scene"` + Style string `json:"style,optional"` + Remark string `json:"remark,optional"` + SkipVerify bool `json:"skipVerify,optional"` + State string `json:"state,optional"` + Users []string `json:"users,optional"` + Parties []int64 `json:"parties,optional"` + IsTemp bool `json:"isTemp,optional"` + ExpiresIn int `json:"expiresIn,optional"` + ChatExpiresIn int `json:"chatExpiresIn,optional"` + UnionId string `json:"unionId,optional"` + IsExclusive bool `json:"isExclusive,optional"` + Conclusions string `json:"conclusions,optional"` } -type SetRolePermissionsRequest struct { - RoleCode string `path:"roleCode"` - APIIds []int64 `json:"apiIds"` -} - -type SetRolePermissionsReply struct { - Status string `json:"status"` -} - -type SetRoleUsersRequest struct { - RoleCode string `path:"roleCode"` - UserIds []int64 `json:"userIds"` -} - -type SetRoleUsersReply struct { - Status string `json:"status"` +type ContractWayGroup struct { + Id int64 `json:"id"` + GroupName string `json:"groupName"` } -type ListAPIRequest struct { - GroupId int64 `form:"groupId,optional"` +type ContractWayGroupNode struct { + Id int64 `json:"id"` + GroupName string `json:"groupName"` + Children []ContractWayGroupNode `json:"children"` } -type ListAPIReply struct { - List []AdminAPI `json:"list"` +type CreateArtisanReply struct { + ArtisanId int64 `json:"id"` } -type GetRoleUsersReqeust struct { - RoleCode string `path:"roleCode"` - PageIndex int `form:"pageIndex"` - PageSize int `form:"pageSize"` +type CreateArtisanRequest struct { + Artisan } -type RoleUserDepartment struct { - Id int64 `json:"id"` - Name string `json:"name"` +type CreateBillingAddressReply struct { + BillingAddressId int64 `json:"id"` } -type RoleUser struct { - Id int64 `json:"id"` - Name string `json:"name"` - Nickname string `json:"nickname"` - Account string `json:"account"` - PhoneNumber string `json:"phoneNumber"` - Department *RoleUserDepartment `json:"department"` - Email string `json:"email"` +type CreateBillingAddressRequest struct { + BillingAddress *BillingAddress `json:"billingAddress"` } -type GetRoleUsersReply struct { - List []RoleUser `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type CreateCategoryReply struct { + *Category } -type SetUserRolesRequest struct { - UserId int64 `path:"userId"` - RoleCodes []string `json:"roleCodes"` +type CreateCategoryRequest struct { + Category } -type SetUserRolesReply struct { - Status string `json:"status"` +type CreateContractWayReply struct { + Id int64 `json:"id"` } -type LoginRequest struct { - UserName string `json:"userName,optional"` - PhoneNumber string `json:"phoneNumber,optional"` - Email string `json:"email,optional"` - Password string `json:"password"` +type CreateContractWayRequest struct { + Type int `json:"type"` + Scene int `json:"scene"` + Style string `json:"style,optional"` + Remark string `json:"remark,optional"` + SkipVerify bool `json:"skipVerify,optional"` + State string `json:"state,optional"` + Users []string `json:"users,optional"` + Parties []int64 `json:"parties,optional"` + IsTemp bool `json:"isTemp,optional"` + ExpiresIn int `json:"expiresIn,optional"` + ChatExpiresIn int `json:"chatExpiresIn,optional"` + UnionId string `json:"unionId,optional"` + IsExclusive bool `json:"isExclusive,optional"` + Conclusions string `json:"conclusions,optional"` } -type LoginReply struct { - Token string `json:"token"` - RefreshToken string `json:"refreshToken"` +type CreateCorpTagRequest struct { + GroupId string `json:"groupId,optional"` //et2lz4UgAArZWi6ZKx1X8jo3uxfbC_sA 下拉标签组 + GroupName string `json:"groupName"` + Sort int `json:"Sort,optional"` + Tag []*TagFieldTag `json:"tag,optional"` + AgentId int64 `json:"agentId,optional"` //应用列表 } -type ExchangeRequest struct { - Type string `path:"type,optional=wechat"` - Code string `json:"code"` +type CreateCustomerReply struct { + CustomerId int64 `json:"id"` } -type ExchangeReply struct { - Token string `json:"token"` - RefreshToken string `json:"refreshToken"` +type CreateCustomerRequest struct { + Customer } -type ListDictionaryTypesPageRequest struct { - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type CreateDeliveryAddressReply struct { + DeliveryAddressId int64 `json:"id"` } -type DictionaryType struct { - Id int64 `json:"id,optional"` - Type string `json:"type"` - Name string `json:"name"` - Description string `json:"description"` - Items []*DictionaryItem `json:"items,optional"` +type CreateDeliveryAddressRequest struct { + DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` } -type ListDictionaryTypesPageReply struct { - List []DictionaryType `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type CreateDepartmentReply struct { + Id int64 `json:"id"` } -type GetDictionaryTypeRequest struct { - DictionaryType string `path:"type"` +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 GetDictionaryTypeReply struct { - *DictionaryType +type CreateDictionaryItemReply struct { + Key string `json:"key"` + Type string `json:"type"` + Name string `json:"name,optional"` + Value string `json:"value,optional"` + Sort int `json:"sort,optional"` + Description string `json:"description,optional"` } -type CreateDictionaryTypeRequest struct { +type CreateDictionaryItemRequest struct { + Key string `json:"key"` Type string `json:"type"` Name string `json:"name"` + Value string `json:"value"` + Sort int `json:"sort,optional"` Description string `json:"description,optional"` } @@ -507,1461 +496,1234 @@ type CreateDictionaryTypeReply struct { Description string `json:"description,optional"` } -type UpdateDictionaryTypeRequest struct { - Type string `path:"type"` - Name string `json:"name,optional"` +type CreateDictionaryTypeRequest struct { + Type string `json:"type"` + Name string `json:"name"` Description string `json:"description,optional"` } -type UpdateDictionaryTypeReply struct { - *DictionaryType +type CreateEchoRequest struct { + Echo string `json:"echo,optional"` } -type DeleteDictionaryTypeRequest struct { - Type string `path:"type"` +type CreateEchoResponse struct { + Response string `json:"response,optional"` } -type DeleteDictionaryTypeReply struct { - Type string `json:"type"` +type CreateLeadReply struct { + LeadId int64 `json:"id"` } -type ListDictionaryItemsRequest struct { - Type string `form:"type"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type CreateLeadRequest struct { + Lead } -type DictionaryItem struct { - Id int64 `json:"id,optional"` - Key string `json:"key"` - Type string `json:"type"` - Name string `json:"name"` - Value string `json:"value"` - Sort int `json:"sort"` - Description string `json:"description"` +type CreateMGMRuleReply struct { + MGMRuleId int64 `json:"id"` } -type ListDictionaryItemsReply struct { - List []DictionaryItem `json:"list"` +type CreateMGMRuleRequest struct { + MGMRule } -type GetDictionaryItemRequest struct { - DictionaryType string `path:"type"` - DictionaryItem string `path:"key"` +type CreateMediaReply struct { + MediaId int64 `json:"id"` } -type GetDictionaryItemReply struct { - *DictionaryItem +type CreateMediaRequest struct { + Media } -type CreateDictionaryItemRequest struct { - Key string `json:"key"` - Type string `json:"type"` - Name string `json:"name"` - Value string `json:"value"` - Sort int `json:"sort,optional"` - Description string `json:"description,optional"` +type CreateMediaResourceByBase64Request struct { + MediaName string `json:"mediaName"` + BucketName string `json:"bucketName"` + Base64Data string `json:"base64Data"` } -type CreateDictionaryItemReply struct { - Key string `json:"key"` - Type string `json:"type"` - Name string `json:"name,optional"` - Value string `json:"value,optional"` - Sort int `json:"sort,optional"` - Description string `json:"description,optional"` +type CreateMediaResourceReply struct { + *MediaResource + IsOSS bool `json:"isOSS"` } -type UpdateDictionaryItemRequest struct { - Key string `path:"key"` - Type string `path:"type"` - Name string `json:"name,optional"` - Value string `json:"value,optional"` - Sort int `json:"sort,optional"` - Description string `json:"description,optional"` +type CreateMenuReply struct { + Success bool `json:"success,optional"` + Data interface{} `json:"data"` } -type UpdateDictionaryItemReply struct { - *DictionaryItem +type CreateMenuRequest struct { + OAMenu } -type DeleteDictionaryItemRequest struct { - Key string `path:"key"` - Type string `path:"type"` +type CreateOAMediaReply struct { + Success bool `json:"success,optional"` + Data interface{} `json:"data"` } -type DeleteDictionaryItemReply struct { - Key string `json:"key"` - Type string `json:"type"` +type CreateOAMediaRequest struct { + OAMedia interface{} `json:"media"` } -type GetUserInfoReply struct { - Id int64 `json:"id"` - Account string `json:"account"` - Name string `json:"name"` - Email string `json:"email"` - MobilePhone string `json:"mobilePhone"` - Gender string `json:"gender"` - NickName string `json:"nickName"` - Desc string `json:"desc"` - Avatar string `json:"avatar"` - ExternalEmail string `json:"externalEmail"` - DepName string `json:"depName"` - Position string `json:"position"` - JobTitle string `json:"jobTitle"` - IsEnabled bool `json:"isEnabled"` - CreatedAt string `json:"createdAt"` - Roles []string `json:"roles"` -} +type CreateOpportunityReply struct { + Id int64 `json:"id"` +} -type MenuRoles struct { - MenuName string `json:"menuName"` - AllowRoleCodes []string `json:"allowRoleCodes"` +type CreateOpportunityRequest struct { + Name string `json:"name"` + Requirement string `json:"requirement"` + CustomerId int64 `json:"customerId"` + Probability float32 `json:"probability,optional"` + Source string `json:"source,options=new_customer|old_customer_new_purchase|old_customer_repurchase|old_customer_upgrade"` + Type string `json:"type,options=trial_requirement|requirement_match|detailed_requirement_analysis|solution_provided|quotation|negotiation|closed_unsuccessful|closed_successful"` + UserId int64 `json:"userId"` + Stage string `json:"stage"` } -type GetMenuRolesReply struct { - MenuRoles []MenuRoles `json:"menuRoles"` +type CreateOrderByCartItemsReply struct { + OrderId int64 `json:"orderId"` + CartId int64 `json:"cartId"` + PaymentAmount float64 `json:"paymentAmount"` } -type ModifyPasswordReqeust struct { - Password string `json:"password"` +type CreateOrderByCartItemsRequest struct { + CartItemIds []int64 `json:"cartItemIds"` + ShippingAddressId int64 `json:"shippingAddressId"` + Comment string `json:"comment"` } -type Tag struct { - Id int64 `json:"id,optional"` - PId int64 `json:"pId"` - Name string `json:"name"` - Sort int `json:"sort"` - ViceName string `json:"viceName"` - Description string `json:"description"` - CreatedAt string `json:"createdAt,optional"` - CoverImageId int64 `json:"coverImageId,optional"` - CoverImage *MediaResource `json:"coverImage,optional"` - Children []*Tag `json:"children,optional"` +type CreateOrderByProductsReply struct { + OrderId int64 `json:"orderId"` + PaymentAmount float64 `json:"paymentAmount"` } -type ListTagTreeRequest struct { - TagPId int `form:"tagPId,optional"` - NeedChildren bool `form:"needChildren,optional"` - Names []string `form:"name,optional"` - OrderBy string `form:"orderBy,optional"` +type CreateOrderByProductsRequest struct { + PriceBookId int64 `json:"PriceBookId,optional,emptyomit"` + ProductIds []int64 `json:"productIds"` + SkuIds []int64 `json:"skuIds"` + Quantities []int `json:"quantities"` + ShippingAddressId int64 `json:"shippingAddressId,optional,emptyomit"` + Comment string `json:"comment"` } -type ListTagTreeReply struct { - Tags []*Tag `json:"tree"` +type CreateOrderReply struct { + OrderId int64 `json:"orderId,omitempty"` } -type CreateTagRequest struct { - Tag +type CreateOrderRequest struct { + Order } -type CreateTagReply struct { - *Tag +type CreatePaymentFromOrderRequest struct { + OrderId int64 `json:"orderId"` + PaymentType int `json:"paymentType"` + Comment string `json:"comment,optional"` } -type UpdateTagRequest struct { - Id int64 `path:"id"` - Tag +type CreatePaymentFromOrderRequestReply struct { + PaymentId int64 `json:"paymentId"` + Data interface{} `json:"data"` } -type UpdateTagReply struct { +type CreatePaymentReply struct { + PaymentKey int64 `json:"id"` +} + +type CreatePaymentRequest struct { + Payment +} + +type CreatePositionReply struct { Id int64 `json:"id"` } -type PatchTagRequest struct { - Id int64 `path:"id"` - PId int64 `json:"pId"` +type CreatePositionRequest struct { + Name string `json:"name"` + Desc string `json:"desc,optional"` + Level string `json:"level"` + RoleCodes []string `json:"roleCodes"` } -type PatchTagReply struct { - Tag +type CreateProductCategoryReply struct { + *ProductCategory } -type GetTagRequest struct { - TagId int64 `path:"id"` +type CreateProductCategoryRequest struct { + ProductCategory } -type GetTagReply struct { - *Tag +type CreateProductReply struct { + ProductKey int64 `json:"id"` } -type DeleteTagRequest struct { - Id int64 `path:"id"` +type CreateProductRequest struct { + Product } -type DeleteTagReply struct { - Id int64 `json:"id"` +type CreateProductSpecificReply struct { + ProductSpecificId int64 `json:"id"` } -type Category struct { - Id int64 `json:"id,optional"` - PId int64 `json:"pId"` - Name string `json:"name"` - Sort int `json:"sort"` - ViceName string `json:"viceName"` - Description string `json:"description"` - CreatedAt string `json:"createdAt,optional"` - ImageAbleInfo - CoverImageId int64 `json:"coverImageId,optional"` - CoverImage *MediaResource `json:"coverImage,optional"` - Children []*Category `json:"children,optional"` +type CreateProductSpecificRequest struct { + ProductSpecific } -type ListCategoryTreeRequest struct { - CategoryPId int `form:"categoryPId,optional"` - NeedChildren bool `form:"needChildren,optional"` - Names []string `form:"name,optional"` - OrderBy string `form:"orderBy,optional"` +type CreateRegisterCodeReply struct { + RegisterCodeId int64 `json:"id"` } -type ListCategoryTreeReply struct { - ProductCategories []*Category `json:"tree"` +type CreateRegisterCodeRequest struct { + RegisterCode } -type CreateCategoryRequest struct { - Category +type CreateRoleReply struct { + RoleCode string `json:"roleCode"` } -type CreateCategoryReply struct { - *Category +type CreateRoleRequest struct { + RoleCode string `json:"roleCode"` + Name string `json:"name"` + Desc string `json:"desc"` + APIIds []int64 `json:"apiIds"` + MenuNames []string `json:"menuNames"` } -type UpdateCategoryRequest struct { - Id int64 `path:"id"` - Category +type CreateSKUReply struct { + SKUId int64 `json:"id"` } -type UpdateCategoryReply struct { - Id int64 `json:"id"` +type CreateSKURequest struct { + SKU } -type PatchCategoryRequest struct { - Id int64 `path:"id"` - PId int64 `json:"pId"` +type CreateShippingAddressReply struct { + *ShippingAddress } -type PatchCategoryReply struct { - Category +type CreateShippingAddressRequest struct { + ShippingAddress } -type GetCategoryRequest struct { - CategoryId int64 `path:"id"` +type CreateStoreReply struct { + StoreId int64 `json:"id"` } -type GetCategoryReply struct { - *Category +type CreateStoreRequest struct { + Store } -type DeleteCategoryRequest struct { - Id int64 `path:"id"` +type CreateTagReply struct { + *Tag } -type DeleteCategoryReply struct { +type CreateTagRequest struct { + Tag +} + +type CreateUserReply struct { Id int64 `json:"id"` } -type LeadExternalId struct { +type CreateUserRequest struct { + Account string `json:"account"` + Name string `json:"name"` + NickName string `json:"nickName,optional"` + Desc string `json:"desc,optional"` + Email string `json:"email"` + Avatar string `json:"avatar,optional"` + ExternalEmail string `json:"externalEmail,optional"` + MobilePhone string `json:"mobilePhone,optional"` + Gender string `json:"gender,options=male|female|un_know"` + DepId int64 `json:"depId"` + PositionId int64 `json:"positionId,optional"` + JobTitle string `json:"jobTitle,optional"` + Password string `json:"password,optional"` +} + +type CreateWeWorkSourceImageReply struct { + Link string `json:"link"` +} + +type Customer struct { + Id int64 `json:"id,optional"` + AccountId string `json:"accountId,optional"` + Name string `json:"name"` + Mobile string `json:"mobile"` + Email string `json:"email,optional"` + UUID string `json:"uuid,optional"` + Inviter *CustomerInviter `json:"inviter,optional"` + InviterId int64 `json:"inviter,optional"` + Source int `json:"source,optional"` + Type int `json:"type,optional"` + IsActivated bool `json:"isActivated,optional,omitempty"` + CreatedAt string `json:"createdAt,optional"` + *CustomerExternalId +} + +type CustomerExternalId struct { OpenIdInMiniProgram string `json:"openIdInMiniProgram,optional"` OpenIdInWeChatOfficialAccount string `json:"openIdInWeChatOfficialAccount,optional"` OpenIdInWeCom string `json:"openIdInWeCom,optional"` } -type LeadInviter struct { +type CustomerInviter struct { Id int64 `json:"id"` Name string `json:"name,optional"` Mobile string `json:"mobile,optional"` Email string `json:"email,optional"` } -type Lead struct { - Id int64 `json:"id,optional"` - Name string `json:"name"` - Mobile string `json:"mobile"` - Email string `json:"email,optional"` - Inviter *LeadInviter `json:"inviter,optional"` - InviterId int64 `json:"inviter,optional"` - Source int `json:"source,optional"` - Type int `json:"type,optional"` - IsActivated bool `json:"isActivated,optional,omitempty"` - CreatedAt string `json:"createdAt,optional"` - *LeadExternalId +type CustomerLoginAuthReply struct { + OpenId string `json:"openId"` + UnionId string `json:"unionId"` + PhoneNumber string `json:"phoneNumber"` + NickName string `json:"nickName"` + AvatarURL string `json:"avatarURL"` + Gender string `json:"gender"` + Token WebToken `json:"token"` } -type GetLeadRequest struct { - Id int64 `path:"id"` +type CustomerLoginRequest struct { + Account string `json:"account"` + Password string `json:"password"` } -type GetLeadReply struct { - Lead *Lead `json:"lead"` +type CustomerRegisterByPhoneInInviteCodeRequest struct { + *CustomerRegisterByPhoneRequest + InviteCode string `path:"code,optional"` } -type ListLeadsPageRequest struct { - LikeName string `form:"likeName,optional"` - LikeMobile string `form:"likeMobile,optional"` - Sources []int `form:"sources,optional"` - Statuses []int `form:"statuses,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type CustomerRegisterByPhoneInRegisterCodeRequest struct { + *CustomerRegisterByPhoneRequest + RegisterCode string `path:"code,optional"` } -type ListLeadsPageReply struct { - List []Lead `json:"list,optional"` - PageIndex int `json:"pageIndex,optional"` - PageSize int `json:"pageSize,optional"` - Total int64 `json:"total,optional"` +type CustomerRegisterByPhoneReply struct { + CustomerId int64 `json:"customerId"` } -type CreateLeadRequest struct { - Lead +type CustomerRegisterByPhoneRequest struct { + Phone string `json:"phone"` + Password string `json:"password"` + VerifyCode string `json:"verifyCode,optional"` } -type CreateLeadReply struct { - LeadId int64 `json:"id"` +type CustomerRegisterReply struct { + CustomerId int64 `json:"customerId"` } -type PutLeadRequest struct { - LeadId int64 `path:"id"` - Lead +type CustomerRegisterRequest struct { + Account string `json:"account"` + Password string `json:"password"` + VerifyCode string `json:"verifyCode"` } -type PutLeadReply struct { - *Lead +type DeleteArtisanReply struct { + ArtisanId int64 `json:"id"` } -type PatchLeadRequest struct { - LeadId int64 `path:"id"` - Name string `json:"name,optional"` - Email string `json:"email,optional"` - InviterId int64 `json:"inviterId,optional"` - Source int `json:"source,optional"` - Type int `json:"type,optional"` - IsActivated bool `json:"isActivated,optional,omitempty"` +type DeleteArtisanRequest struct { + ArtisanId int64 `path:"id"` } -type PatchLeadReply struct { - *Lead +type DeleteBillingAddressReply struct { + BillingAddressId int64 `json:"id"` } -type DeleteLeadRequest struct { - Id int64 `path:"id"` +type DeleteBillingAddressRequest struct { + BillingAddressId int64 `path:"id"` } -type DeleteLeadReply struct { - LeadId int64 `json:"id"` +type DeleteCategoryReply struct { + Id int64 `json:"id"` } -type AssignLeadToUserRequest struct { - Id string `path:"id"` - UserId int64 `json:"userId"` +type DeleteCategoryRequest struct { + Id int64 `path:"id"` } -type AssignLeadToUserReply struct { - LeadId int64 `json:"leadId"` +type DeleteContractWayReply struct { + Id int64 `json:"id"` } -type CustomerExternalId struct { - OpenIdInMiniProgram string `json:"openIdInMiniProgram,optional"` - OpenIdInWeChatOfficialAccount string `json:"openIdInWeChatOfficialAccount,optional"` - OpenIdInWeCom string `json:"openIdInWeCom,optional"` +type DeleteContractWayRequest struct { + Id int64 `path:"id"` } -type CustomerInviter struct { - Id int64 `json:"id"` - Name string `json:"name,optional"` - Mobile string `json:"mobile,optional"` - Email string `json:"email,optional"` +type DeleteCorpTagRequest struct { + TagIds []string `json:"tagIds,optional"` + GroupIds []string `json:"groupIds,optional"` + AgentId int64 `json:"agentId,optional"` } -type Customer struct { - Id int64 `json:"id,optional"` - AccountId string `json:"accountId,optional"` - Name string `json:"name"` - Mobile string `json:"mobile"` - Email string `json:"email,optional"` - UUID string `json:"uuid,optional"` - Inviter *CustomerInviter `json:"inviter,optional"` - InviterId int64 `json:"inviter,optional"` - Source int `json:"source,optional"` - Type int `json:"type,optional"` - IsActivated bool `json:"isActivated,optional,omitempty"` - CreatedAt string `json:"createdAt,optional"` - *CustomerExternalId +type DeleteCustomerReply struct { + CustomerId int64 `json:"id"` } -type GetCustomerRequest struct { +type DeleteCustomerRequest struct { Id int64 `path:"id"` } -type GetCustomerReply struct { - Customer *Customer `json:"customer"` +type DeleteDeliveryAddressReply struct { + DeliveryAddressId int64 `json:"id"` } -type ListCustomersPageRequest struct { - LikeName string `form:"likeName,optional"` - LikeMobile string `form:"likeMobile,optional"` - Sources []int `form:"sources,optional"` - Statuses []int `form:"statuses,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type DeleteDeliveryAddressRequest struct { + DeliveryAddressId int64 `path:"id"` } -type ListCustomersPageReply struct { - List []Customer `json:"list,optional"` - PageIndex int `json:"pageIndex,optional"` - PageSize int `json:"pageSize,optional"` - Total int64 `json:"total,optional"` +type DeleteDepartmentReply struct { + Id int64 `json:"id"` } -type CreateCustomerRequest struct { - Customer +type DeleteDepartmentRequest struct { + Id int64 `path:"id"` } -type CreateCustomerReply struct { - CustomerId int64 `json:"id"` +type DeleteDictionaryItemReply struct { + Key string `json:"key"` + Type string `json:"type"` } -type PutCustomerRequest struct { - CustomerId int64 `path:"id"` - Customer +type DeleteDictionaryItemRequest struct { + Key string `path:"key"` + Type string `path:"type"` } -type PutCustomerReply struct { - *Customer +type DeleteDictionaryTypeReply struct { + Type string `json:"type"` } -type PatchCustomerRequest struct { - CustomerId int64 `path:"id"` - Name string `json:"name,optional"` - Email string `json:"email,optional"` - InviterId int64 `json:"inviterId,optional"` - Source int `json:"source,optional"` - Type int `json:"type,optional"` - IsActivated bool `json:"isActivated,optional,omitempty"` +type DeleteDictionaryTypeRequest struct { + Type string `path:"type"` } -type PatchCustomerReply struct { - *Customer +type DeleteLeadReply struct { + LeadId int64 `json:"id"` } -type DeleteCustomerRequest struct { +type DeleteLeadRequest struct { Id int64 `path:"id"` } -type DeleteCustomerReply struct { - CustomerId int64 `json:"id"` +type DeleteMGMRuleReply struct { + MGMRuleId int64 `json:"id"` } -type AssignCustomerToUserRequest struct { - Id string `path:"id"` - UserId int64 `json:"userId"` +type DeleteMGMRuleRequest struct { + MGMRuleId int64 `path:"id"` } -type AssignCustomerToUserReply struct { - CustomerId int64 `json:"customerId"` +type DeleteMediaReply struct { + MediaId int64 `json:"id"` } -type RegisterCode struct { - Id int64 `json:"id,optional"` - Code string `json:"code,optional"` - RegisterCustomerID int64 `json:"registerCustomerID,optional"` - ExpiredAt string `json:"expiredAt,optional"` - CreatedAt string `json:"createdAt,optional"` +type DeleteMediaRequest struct { + MediaId int64 `path:"id"` } -type GetRegisterCodeRequest struct { - Id int64 `path:"id"` +type DeleteMediaResourceReply struct { + MediaResourceId int64 `json:"id"` } -type GetRegisterCodeReply struct { - RegisterCode *RegisterCode `json:"customer"` +type DeleteMediaResourceRequest struct { + Id int64 `path:"id"` } -type ListRegisterCodesPageRequest struct { - LikeName string `form:"likeName,optional"` - LikeMobile string `form:"likeMobile,optional"` - Sources []int `form:"sources,optional"` - Statuses []int `form:"statuses,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type DeleteMenuReply struct { + Success bool `json:"success"` + Data interface{} `json:"data"` } -type ListRegisterCodesPageReply struct { - List []RegisterCode `json:"list,optional"` - PageIndex int `json:"pageIndex,optional"` - PageSize int `json:"pageSize,optional"` - Total int64 `json:"total,optional"` +type DeleteOAMediaReply struct { + Success bool `json:"success"` + Data interface{} `json:"data"` } -type CreateRegisterCodeRequest struct { - RegisterCode +type DeleteOAMediaRequest struct { + MediaId string `path:"mediaId"` } -type CreateRegisterCodeReply struct { - RegisterCodeId int64 `json:"id"` +type DeleteOpportunityReply struct { + Id int64 `json:"id"` } -type GenerateRegisterCodeRequest struct { - BatchCount int `json:"batchCount"` +type DeleteOpportunityRequest struct { + Id int64 `path:"id"` } -type GenerateRegisterCodeReply struct { - Result bool `json:"result"` +type DeleteOrderReply struct { + OrderId int64 `path:"id"` } -type PutRegisterCodeRequest struct { - RegisterCodeId int64 `path:"id"` - RegisterCode +type DeleteOrderRequest struct { + OrderId int64 `path:"id"` } -type PutRegisterCodeReply struct { - *RegisterCode +type DeletePaymentReply struct { + PaymentId int64 `json:"id"` } -type PatchRegisterCodeRequest struct { - RegisterCodeId int64 `path:"id"` - Name string `json:"name,optional"` - Email string `json:"email,optional"` - InviterId int64 `json:"inviterId,optional"` - Source int `json:"source,optional"` - Type int `json:"type,optional"` - IsActivated bool `json:"isActivated,optional,omitempty"` +type DeletePaymentRequest struct { + PaymentId int64 `path:"id"` } -type PatchRegisterCodeReply struct { - *RegisterCode +type DeletePositionReply struct { + Id int64 `json:"id"` } -type DeleteRegisterCodeRequest struct { +type DeletePositionRequest struct { Id int64 `path:"id"` } -type DeleteRegisterCodeReply struct { - RegisterCodeId int64 `json:"id"` +type DeletePriceBookEntryReply struct { + Id int64 `json:"id"` } -type AssignRegisterCodeToUserRequest struct { - Id string `path:"id"` - UserId int64 `json:"userId"` +type DeletePriceBookEntryRequest struct { + Id int64 `path:"id"` } -type AssignRegisterCodeToUserReply struct { - RegisterCodeId int64 `json:"customerId"` -} - -type Membership struct { - Id int64 `json:"id,optional"` - Name string `json:"name,optional"` - MainMembershipId int64 `json:"mainMembershipId,optional"` - OrderId int64 `json:"orderId,optional"` - OrderItemId int64 `json:"orderItemId,optional"` - CustomerId int64 `json:"customerId,optional"` - ProductId int64 `json:"productId,optional"` - StartDate string `json:"startDate,optional"` - EndDate string `json:"endDate,optional"` - Status int `json:"status,optional"` - Type int `json:"type,optional"` - ExtendPeriod bool `json:"extendPeriod,optional"` - Plan int `json:"plan,optional"` +type DeletePriceBookReply struct { + Id int64 `json:"id"` } -type GetMembershipRequest struct { +type DeletePriceBookRequest struct { Id int64 `path:"id"` } -type GetMembershipReply struct { - *Membership -} - -type ListMediasPageRequest struct { - MediaTypes []int8 `form:"mediaTypes,optional"` - Keys []string `form:"keys,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type DeleteProductCategoryReply struct { + Id int64 `json:"id"` } -type Media struct { - Id int64 `json:"id,optional"` - Title string `json:"title,optional"` - SubTitle string `json:"subTitle,optional"` - CoverImageId int64 `json:"coverImageId,optional"` - ResourceUrl string `json:"resourceUrl,optional"` - Description string `json:"description,optional"` - MediaType int `json:"mediaType,optional"` - ViewedCount int `json:"viewedCount,optional"` - CoverImage *MediaResource `json:"coverImage,optional"` - DetailImageIds []int64 `json:"detailImageIds,optional"` - DetailImages []*MediaResource `json:"detailImages,optional"` +type DeleteProductCategoryRequest struct { + Id int64 `path:"id"` } -type ListMediasPageReply struct { - List []*Media `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type DeleteProductReply struct { + ProductId int64 `json:"id"` } -type CreateMediaRequest struct { - Media +type DeleteProductRequest struct { + ProductId int64 `path:"id"` } -type CreateMediaReply struct { - MediaId int64 `json:"id"` +type DeleteProductSpecificReply struct { + ProductSpecificId int64 `json:"id"` } -type UpdateMediaRequest struct { - MediaId int64 `path:"id"` - Media +type DeleteProductSpecificRequest struct { + ProductSpecificId int64 `path:"id"` } -type UpdateMediaReply struct { - MediaId int64 `json:"id"` +type DeleteProductStatisticsReply struct { + ProductStatisticsId int64 `json:"id"` } -type GetMediaRequest struct { - MediaId int64 `path:"id"` +type DeleteProductStatisticsRequest struct { + ProductStatisticsId int64 `path:"id"` } -type GetMediaReply struct { - *Media +type DeleteRegisterCodeReply struct { + RegisterCodeId int64 `json:"id"` } -type DeleteMediaRequest struct { - MediaId int64 `path:"id"` +type DeleteRegisterCodeRequest struct { + Id int64 `path:"id"` } -type DeleteMediaReply struct { - MediaId int64 `json:"id"` +type DeleteSKUReply struct { + SKUId int64 `json:"id"` } -type StoreArtisanSpecific struct { - ArtisanId int64 `json:"artisanId,optional"` +type DeleteSKURequest struct { + SKUId int64 `path:"id"` } -type StoreArtisan struct { - UserId int64 `json:"userId,optional"` - Name string `json:"name,optional"` - Level int8 `json:"level,optional"` - Gender bool `json:"gender,optional"` - Birthday string `json:"birthday,optional"` - PhoneNumber string `json:"phoneNumber,optional"` - CoverURL string `json:"coverURL,optional"` - WorkNo string `json:"workNo,optional"` - Email string `json:"email,optional"` - Experience string `json:"experience,optional"` - Specialty string `json:"specialty,optional"` - Certificate string `json:"certificate,optional"` - Address string `json:"address,optional"` - ArtisanSpecific StoreArtisanSpecific `json:"artisanSpecific,optional"` +type DeleteShippingAddressReply struct { + ShippingAddressId int64 `json:"id"` } -type Store struct { - Id int64 `json:"id,optional"` - Name string `json:"name"` - StoreUserId int64 `json:"storeUserId,optional"` - ContactNumber string `json:"contactNumber"` - Email string `json:"email,optional"` - Address string `json:"address"` - Description string `json:"description,optional"` - Longitude float32 `json:"longitude,optional"` - Latitude float32 `json:"latitude,optional"` - StartWork string `json:"startWork,optional"` - EndWork string `json:"endWork,optional"` - Artisans []*StoreArtisan `json:"artisans,optional"` - CreatedAt string `json:"createdAt,optional"` - CoverImageId int64 `json:"coverImageId,optional"` - CoverImage *MediaResource `json:"coverImage,optional"` - DetailImageIds []int64 `json:"detailImageIds,optional"` - DetailImages []*MediaResource `json:"detailImages,optional"` +type DeleteShippingAddressRequest struct { + ShippingAddressId int64 `path:"id"` } -type ListStoresPageRequest struct { - Ids []int64 `form:"ids,optional"` - LikeName string `form:"likeName,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type DeleteStoreReply struct { + StoreId int64 `json:"id"` } -type ListStoresPageReply struct { - List []*Store `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type DeleteStoreRequest struct { + StoreId int64 `path:"id"` } -type CreateStoreRequest struct { - Store +type DeleteTagReply struct { + Id int64 `json:"id"` } -type CreateStoreReply struct { - StoreId int64 `json:"id"` +type DeleteTagRequest struct { + Id int64 `path:"id"` } -type GetStoreRequest struct { - StoreId int64 `path:"id"` +type DeleteUserReply struct { + Id int64 `json:"id"` } -type GetStoreReply struct { - *Store +type DeleteUserRequest struct { + Id int64 `path:"id"` } -type PutStoreRequest struct { - StoreId int64 `path:"id"` - Store +type DeliveryAddress struct { + Id int64 `json:"id,optional"` + OrderId int64 `gorm:"comment:订单Id; index" json:"orderId"` + CustomerId int64 `json:"customerId,optional"` + Recipient string `json:"recipient,optional"` + AddressLine string `json:"addressLine,optional"` + AddressLine2 string `json:"addressLine2,optional"` + Street string `json:"street,optional"` + City string `json:"city,optional"` + Province string `json:"province,optional"` + PostalCode string `json:"postalCode,optional"` + Country string `json:"country,optional"` + PhoneNumber string `json:"phoneNumber,optional"` + IsDefault bool `json:"isDefault,optional"` } -type PutStoreReply struct { - *Store +type Department 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"` } -type DeleteStoreRequest struct { - StoreId int64 `path:"id"` +type DepartmentLeader struct { + Id int64 `json:"id"` + Name string `json:"name"` + NickName string `json:"nickName"` + Avatar string `json:"avatar"` } -type DeleteStoreReply struct { - StoreId int64 `json:"id"` +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 AssignStoreManagerRequest struct { - Id int64 `path:"id"` - UserId int64 `json:"userId"` +type DepartmentOption struct { + Id int64 `json:"id"` + Name string `json:"name"` } -type AssignStoreManagerReply struct { - Store +type DictionaryItem struct { + Id int64 `json:"id,optional"` + Key string `json:"key"` + Type string `json:"type"` + Name string `json:"name"` + Value string `json:"value"` + Sort int `json:"sort"` + Description string `json:"description"` } -type ListMGMRulesPageRequest struct { - MGMRuleTypes []int8 `form:"mgmTypes,optional"` - Keys []string `form:"keys,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type DictionaryType struct { + Id int64 `json:"id,optional"` + Type string `json:"type"` + Name string `json:"name"` + Description string `json:"description"` + Items []*DictionaryItem `json:"items,optional"` } -type MGMRule struct { - Id int64 `json:"id,optional"` - Name string `json:"name,optional"` - CommissionRate1 float32 `json:"commissionRate1,optional"` - CommissionRate2 float32 `json:"commissionRate2,optional"` - Scene int `json:"scene,optional"` - Description string `json:"description,optional"` +type DisableProductReply struct { + ProductId int64 `json:"id"` } -type ListMGMRulesPageReply struct { - List []*MGMRule `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type DisableProductRequest struct { + ProductId int64 `path:"id"` } -type CreateMGMRuleRequest struct { - MGMRule +type ExchangeReply struct { + Token string `json:"token"` + RefreshToken string `json:"refreshToken"` } -type CreateMGMRuleReply struct { - MGMRuleId int64 `json:"id"` +type ExchangeRequest struct { + Type string `path:"type,optional=wechat"` + Code string `json:"code"` } -type UpdateMGMRuleRequest struct { - MGMRuleId int64 `path:"id"` - MGMRule +type ExportOrdersReply struct { + Content []byte `json:"content"` + FileName string `json:"fileName"` + FileSize int `json:"fileSize"` + FileType string `json:"fileType"` } -type UpdateMGMRuleReply struct { - MGMRuleId int64 `json:"id"` +type ExportOrdersRequest struct { + Name string `form:"name,optional"` + StartAt string `form:"startAt"` + EndAt string `form:"endAt"` + TypeIds []int `form:"typeIds,optional"` + StatusIds []int `form:"statusIds,optional"` } -type GetMGMRuleRequest struct { - MGMRuleId int64 `path:"id"` +type ExternalContactExternalProfileExternalProfileExternalAttrWithMiniprogram struct { + Appid string `json:"appid"` + Pagepath string `json:"pagepath"` + Title string `json:"title"` } -type GetMGMRuleReply struct { - *MGMRule +type ExternalContactExternalProfileExternalProfileExternalAttrWithText struct { + Value string `json:"value"` } -type DeleteMGMRuleRequest struct { - MGMRuleId int64 `path:"id"` +type ExternalContactExternalProfileExternalProfileExternalAttrWithWeb struct { + Url string `json:"url"` + Title string `json:"title"` } -type DeleteMGMRuleReply struct { - MGMRuleId int64 `json:"id"` +type ExternalContactExternalProfileExternalProfileWithExternalAttr struct { + Type int `json:"type"` + Name string `json:"name"` + Text ExternalContactExternalProfileExternalProfileExternalAttrWithText `json:"text"` + Web ExternalContactExternalProfileExternalProfileExternalAttrWithWeb `json:"web"` + Miniprogram ExternalContactExternalProfileExternalProfileExternalAttrWithMiniprogram `json:"miniprogram"` } -type GetOpportunityListRequest struct { - Name string `form:"name,optional"` - Source string `form:"source,optional"` - Type string `form:"type,optional"` - Stage string `form:"stage,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type ExternalContactExternalProfileWithExternalProfile struct { + ExternalAttr []*ExternalContactExternalProfileExternalProfileWithExternalAttr `json:"externalAttr"` } -type Opportunity struct { - Id int64 `json:"id"` - Name string `json:"name"` - Requirement string `json:"requirement"` - CustomerId int64 `json:"customerId"` - Probability float32 `json:"probability"` - Source string `json:"source"` - Type string `json:"type"` - UserId int64 `json:"userId"` - Stage string `json:"stage"` - ClosedDate string `json:"closedDate"` - CreatedAt string `json:"createdAt"` - UpdatedAt string `json:"updatedAt"` +type GenerateRegisterCodeReply struct { + Result bool `json:"result"` } -type GetOpportunityListReply struct { - List []Opportunity `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type GenerateRegisterCodeRequest struct { + BatchCount int `json:"batchCount"` } -type CreateOpportunityRequest struct { - Name string `json:"name"` - Requirement string `json:"requirement"` - CustomerId int64 `json:"customerId"` - Probability float32 `json:"probability,optional"` - Source string `json:"source,options=new_customer|old_customer_new_purchase|old_customer_repurchase|old_customer_upgrade"` - Type string `json:"type,options=trial_requirement|requirement_match|detailed_requirement_analysis|solution_provided|quotation|negotiation|closed_unsuccessful|closed_successful"` - UserId int64 `json:"userId"` - Stage string `json:"stage"` +type GetArtisanReply struct { + *Artisan } -type CreateOpportunityReply struct { - Id int64 `json:"id"` +type GetArtisanRequest struct { + ArtisanId int64 `path:"id"` } -type AssignUserToOpportunityRequest struct { - Id int64 `path:"id"` - UserId int64 `json:"userId"` +type GetBillingAddressReply struct { + BillingAddress *BillingAddress `json:"billingAddress"` } -type AssignUserToOpportunityReply struct { - Id int64 `json:"id"` +type GetBillingAddressRequest struct { + BillingAddressId int64 `path:"id"` } -type UpdateOpportunityRequest struct { - Id int64 `path:"id"` - Name string `json:"name,optional"` - Requirement string `json:"requirement,optional"` - CustomerId int64 `json:"customerId,optional"` - Probability float32 `json:"probability,optional"` - Source string `json:"source,optional,options=new_customer|old_customer_new_purchase|old_customer_repurchase|old_customer_upgrade"` - Type string `json:"type,optional,options=trial_requirement|requirement_match|detailed_requirement_analysis|solution_provided|quotation|negotiation|closed_unsuccessful|closed_successful"` - UserId int64 `json:"userId,optional"` - Stage string `json:"stage,optional"` - ClosedDate string `json:"closedDate,optional"` +type GetCartReply struct { + *Cart } -type UpdateOpportunityReply struct { - *Opportunity +type GetCartRequest struct { } -type DeleteOpportunityRequest struct { - Id int64 `path:"id"` +type GetCategoryReply struct { + *Category } -type DeleteOpportunityReply struct { - Id int64 `json:"id"` +type GetCategoryRequest struct { + CategoryId int64 `path:"id"` } -type PriceBook struct { - Id int64 `json:"id,optional"` - IsStandard bool `json:"isStandard,optional"` - Name string `json:"name"` - Description string `json:"description,optional"` - StoreId int64 `json:"storeId,optional"` - CreatedAt string `json:"createdAt,optional"` +type GetContractWayGroupListReply struct { + Groups []ContractWayGroup `json:"groups"` } -type ListPriceBooksPageRequest struct { - LikeName string `json:"likeName,optional"` - StoreId int64 `json:"storeId,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type GetContractWayGroupListRequest struct { + GroupName string `form:"groupName,optional"` } -type ListPriceBooksPageReply struct { - List []PriceBook `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type GetContractWayGroupTreeReply struct { + GroupTree ContractWayGroupNode `json:"tree"` } -type GetPriceBookRequest struct { - PriceBook int64 `path:"id"` +type GetContractWayGroupTreeRequest struct { } -type GetPriceBookReply struct { - *PriceBook +type GetContractWaysReply struct { + List []ContractWay `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type UpsertPriceBookRequest struct { - PriceBook +type GetContractWaysRequest struct { + UserId int64 `form:"userId,optional"` + Name string `form:"name,optional"` + StartDate string `form:"startDate,optional"` + EndDate string `form:"endDate,optional"` + PageIndex int `form:"pageIndex"` + PageSize int `form:"pageSize"` } -type UpsertPriceBookReply struct { - *PriceBook +type GetCustomerBalanceReply struct { + *TokenBalance } -type DeletePriceBookRequest struct { - Id int64 `path:"id"` +type GetCustomerMembershipByTypeReply struct { + *Membership } -type DeletePriceBookReply struct { - Id int64 `json:"id"` +type GetCustomerMembershipByTypeRequest struct { + TypeId int64 `form:"typeId"` } -type PivotDataDictionaryToObject struct { - DataDictionaryType string `json:"dataDictionaryType,optional"` - DataDictionaryKey string `json:"dataDictionaryKey,optional"` +type GetCustomerReply struct { + Customer *Customer `json:"customer"` } -type ActivePriceEntry struct { - Id int64 `json:"id,optional"` - UnitPrice float64 `json:"unitPrice,optional"` - ListPrice float64 `json:"listPrice,optional"` - Discount float32 `json:"discount,optional"` +type GetCustomerRequest struct { + Id int64 `path:"id"` } -type ProductAttribute struct { - Id int64 `json:"id,optional"` - Inventory int16 `json:"inventory,optional"` - SoldAmount int16 `json:"soldAmount,optional"` - Weight float32 `json:"weight,optional"` - Volume float32 `json:"volume,optional"` - Encode string `json:"encode,optional"` - BarCode string `json:"barCode,optional"` - Extra string `json:"extra,optional"` +type GetDeliveryAddressReply struct { + DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` } -type Product struct { - Id int64 `json:"id,optional"` - Name string `json:"name"` - SPU string `json:"spu"` - Type int `json:"type"` - Plan int `json:"plan"` - AccountingCategory string `json:"accountingCategory"` - CanSellOnline bool `json:"canSellOnline,optional"` - CanUseForDeduct bool `json:"canUseForDeduct,optional"` - Description string `json:"description,optional"` - AllowedSellQuantity int `json:"allowedSellQuantity,optional"` - ValidityPeriodDays int `json:"validityPeriodDays,optional"` - SaleStartDate string `json:"saleStartDate,optional"` - SaleEndDate string `json:"saleEndDate,optional"` - ApprovalStatus int `json:"approvalStatus,optional"` - IsActivated bool `json:"isActivated,optional,omitempty"` - Sort int `json:"sort,optional,omitempty"` - CreatedAt string `json:"createdAt,optional"` - ProductSpecifics []*ProductSpecific `json:"productSpecifics,optional"` - PivotSalesChannels []*PivotDataDictionaryToObject `json:"pivotSalesChannels,optional"` - PivotPromoteChannels []*PivotDataDictionaryToObject `json:"pivotPromoteChannels,optional"` - ProductCategories []*ProductCategory `json:"productCategories,optional"` - SalesChannelsItemIds []int64 `json:"salesChannelsItemIds,optional"` - PromoteChannelsItemIds []int64 `json:"promoteChannelsItemIds,optional"` - CategoryIds []int64 `json:"categoryIds,optional"` - CoverImageIds []int64 `json:"coverImageIds,optional"` - CoverImages []*MediaResource `json:"coverImages,optional"` - CoverImageIdSortIndexs []*SortIdItem `json:"coverImageIdSortIndexes,optional"` - DetailImageIds []int64 `json:"detailImageIds,optional"` - DetailImages []*MediaResource `json:"detailImages,optional"` - DetailImageIdSortIndexs []*SortIdItem `json:"detailImageIdSortIndexes,optional"` - ActivePriceEntry *ActivePriceEntry `json:"activePriceBookEntry,optional"` - PriceBookEntries []*PriceBookEntry `json:"priceBookEntries,optional"` - SKUs []*SKU `json:"skus,optional"` - *ProductAttribute - ViewedCount int `json:"viewedCount,optional"` +type GetDeliveryAddressRequest struct { + DeliveryAddressId int64 `path:"id"` } -type ListProductsPageRequest struct { - LikeName string `form:"likeName,optional"` - ProductTypeIds []int `form:"typeIds,optional"` - ProductStatusIds []int `form:"productStatusIds,optional"` - SalesStartAt string `form:"salesStartAt,optional,omitempty"` - SalesEndAt string `form:"salesEndAt,optional,omitempty"` - Keys []string `form:"keys,optional"` - ProductCategoryId int `form:"productCategoryId,optional"` - ProductCategoryIds []int `form:"productCategoryIds,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type GetDepartmentOptionsReply struct { + List []DepartmentOption `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type ListProductsPageReply struct { - List []Product `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type GetDepartmentOptionsRequest struct { + Ids []int64 `form:"ids,optional"` + LikeName string `form:"likeName,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type CreateProductRequest struct { - Product +type GetDepartmentReply struct { + *Department } -type CreateProductReply struct { - ProductKey int64 `json:"id"` +type GetDepartmentRequest struct { + Id int64 `path:"id"` } -type GetProductRequest struct { - ProductId int64 `path:"id"` +type GetDepartmentTreeReply struct { + DepTree DepartmentNode `json:"depTree"` } -type GetProductReply struct { - *Product +type GetDepartmentTreeRequest struct { + DepId int64 `path:"depId"` } -type PutProductRequest struct { - ProductId int64 `path:"id"` - Product +type GetDictionaryItemReply struct { + *DictionaryItem } -type PutProductReply struct { - *Product +type GetDictionaryItemRequest struct { + DictionaryType string `path:"type"` + DictionaryItem string `path:"key"` } -type PatchProductRequest struct { - ProductId int64 `path:"id"` - Product +type GetDictionaryTypeReply struct { + *DictionaryType } -type PatchProductReply struct { - *Product +type GetDictionaryTypeRequest struct { + DictionaryType string `path:"type"` } -type DisableProductRequest struct { - ProductId int64 `path:"id"` +type GetHomeReply struct { + Greet string `json:"greet,optional"` + Description string `json:"description,optional"` + Version string `json:"version,optional"` } -type DisableProductReply struct { - ProductId int64 `json:"id"` +type GetLeadReply struct { + Lead *Lead `json:"lead"` } -type DeleteProductRequest struct { - ProductId int64 `path:"id"` +type GetLeadRequest struct { + Id int64 `path:"id"` } -type DeleteProductReply struct { - ProductId int64 `json:"id"` +type GetMGMRuleReply struct { + *MGMRule } -type AssignProductToProductCategoryRequest struct { - Id int64 `json:"id"` - ProductCategoryId int64 `json:"productCategoryId"` +type GetMGMRuleRequest struct { + MGMRuleId int64 `path:"id"` } -type AssignProductToProductCategoryReply struct { - Product +type GetMediaReply struct { + *Media } -type SortIdItem struct { - Id int64 `json:"id,optional"` - SortIndex int `json:"sortIndex,optional"` +type GetMediaRequest struct { + MediaId int64 `path:"id"` } -type MediaResource struct { - Id int64 `json:"id,optional"` - CustomerId int64 `json:"customerId,optional"` - Filename string `json:"filename,optional"` - Size int64 `json:"size,optional"` - Url string `json:"url,optional"` - BucketName string `json:"bucketName,optional"` - IsLocalStored bool `json:"isLocalStored,optional"` - ContentType string `json:"contentType,optional"` - ResourceType string `json:"resourceType,optional"` - SortIndex int `json:"sortIndex,optional"` +type GetMediaResourceReply struct { + MediaResource *MediaResource `json:"mediaResource"` } -type CreateMediaResourceByBase64Request struct { - MediaName string `json:"mediaName"` - BucketName string `json:"bucketName"` - Base64Data string `json:"base64Data"` +type GetMediaResourceRequest struct { + Id int64 `path:"id"` } -type CreateMediaResourceReply struct { - *MediaResource - IsOSS bool `json:"isOSS"` +type GetMembershipReply struct { + *Membership } -type GetMediaResourceRequest struct { +type GetMembershipRequest struct { Id int64 `path:"id"` } -type GetMediaResourceReply struct { - MediaResource *MediaResource `json:"mediaResource"` -} - -type ListMediaResourcesPageRequest struct { - LikeName string `form:"likeName,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type GetMenuRolesReply struct { + MenuRoles []MenuRoles `json:"menuRoles"` } -type ListMediaResourcesPageReply struct { - List []MediaResource `json:"list,optional"` - PageIndex int `json:"pageIndex,optional"` - PageSize int `json:"pageSize,optional"` - Total int64 `json:"total,optional"` +type GetOAMediaByVideoReply struct { + Title string `json:"title"` + Description string `json:"description"` + DownUrl string `json:"down_url"` } -type DeleteMediaResourceRequest struct { - Id int64 `path:"id"` +type GetOAMediaListReply struct { + TotalCount interface{} `json:"total_count"` + ItemCount interface{} `json:"item_count"` + Item interface{} `json:"item"` } -type DeleteMediaResourceReply struct { - MediaResourceId int64 `json:"id"` +type GetOAMediaListRequest struct { + Offset int64 `json:"offset,optional"` + Count int64 `json:"count,optional"` + MediaType string `json:"type"` } -type ImageAbleInfo struct { - Icon string `json:"icon"` - BackgroundColor string `json:"backgroundColor"` +type GetOAMediaNewsListReply struct { + NewsItem interface{} `json:"news_item"` } -type ProductCategory struct { - Id int64 `json:"id,optional"` - PId int64 `json:"pId"` - Name string `json:"name"` - Sort int `json:"sort"` - ViceName string `json:"viceName"` - Description string `json:"description"` - CreatedAt string `json:"createdAt,optional"` - ImageAbleInfo - CoverImageId int64 `json:"coverImageId,optional"` - CoverImage *MediaResource `json:"coverImage,optional"` - Children []*ProductCategory `json:"children,optional"` +type GetOAMediaReply struct { + OAMedia interface{} `json:"media"` } -type ListProductCategoryTreeRequest struct { - CategoryPId int `form:"categoryPId,optional"` - NeedChildren bool `form:"needChildren,optional"` - Names []string `form:"name,optional"` - OrderBy string `form:"orderBy,optional"` +type GetOAMediaRequest struct { + MediaId string `path:"mediaId"` } -type ListProductCategoryTreeReply struct { - ProductCategories []*ProductCategory `json:"tree"` +type GetOpportunityListReply struct { + List []Opportunity `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type CreateProductCategoryRequest struct { - ProductCategory +type GetOpportunityListRequest struct { + Name string `form:"name,optional"` + Source string `form:"source,optional"` + Type string `form:"type,optional"` + Stage string `form:"stage,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type CreateProductCategoryReply struct { - *ProductCategory +type GetOptionsReply struct { + Options []map[string]interface{} `json:"options"` } -type UpdateProductCategoryRequest struct { - Id int64 `path:"id"` - ProductCategory +type GetOptionsRequest struct { + Type string `form:"type,optional"` + Search string `form:"search,optional"` } -type UpdateProductCategoryReply struct { - Id int64 `json:"id"` +type GetOrderReply struct { + *Order } -type PatchProductCategoryRequest struct { - Id int64 `path:"id"` - PId int64 `json:"pId"` +type GetOrderRequest struct { + OrderId int64 `path:"id"` } -type PatchProductCategoryReply struct { - ProductCategory +type GetPaymentReply struct { + *Payment } -type GetProductCategoryRequest struct { - ProductCategoryId int64 `path:"id"` +type GetPaymentRequest struct { + PaymentId int64 `path:"id"` } -type GetProductCategoryReply struct { - *ProductCategory +type GetPositionReply struct { + *Position } -type DeleteProductCategoryRequest struct { +type GetPositionRequest struct { Id int64 `path:"id"` } -type DeleteProductCategoryReply struct { - Id int64 `json:"id"` +type GetPriceBookEntryReply struct { + *PriceBookEntry } -type ProductSpecific struct { - Id int64 `json:"id,optional"` - ProductId int64 `json:"productId"` - Name string `json:"name"` - SpecificOptions []*SpecificOption `json:"specificOptions,optional"` +type GetPriceBookEntryRequest struct { + PriceBookEntry int64 `path:"id"` } -type SpecificOption struct { - Id int64 `json:"id,optional"` - ProductSpecificId int64 `json:"ProductSpecificId,optional"` - Name string `json:"name,optional"` - IsActivated bool `json:"isActivated,optional"` +type GetPriceBookReply struct { + *PriceBook } -type ListProductSpecificPageRequest struct { - LikeName string `form:"likeName,optional"` - ProductId int64 `form:"productId"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type GetPriceBookRequest struct { + PriceBook int64 `path:"id"` } -type ListProductSpecificPageReply struct { - List []*ProductSpecific `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type GetProductCategoryReply struct { + *ProductCategory } -type CreateProductSpecificRequest struct { - ProductSpecific +type GetProductCategoryRequest struct { + ProductCategoryId int64 `path:"id"` } -type CreateProductSpecificReply struct { - ProductSpecificId int64 `json:"id"` +type GetProductReply struct { + *Product } -type ConfigProductSpecificRequest struct { - ProductSpecifics []ProductSpecific `json:"productSpecifics"` +type GetProductRequest struct { + ProductId int64 `path:"id"` } -type ConfigProductSpecificReply struct { - Result bool `json:"result"` +type GetProductSpecificReply struct { + *ProductSpecific } type GetProductSpecificRequest struct { ProductSpecificId int64 `path:"id"` } -type GetProductSpecificReply struct { - *ProductSpecific +type GetProductStatisticsReply struct { + *ProductStatistics } -type PutProductSpecificRequest struct { - ProductSpecificId int64 `path:"id"` - ProductSpecific +type GetProductStatisticsRequest struct { + ProductId int64 `path:"id"` } -type PutProductSpecificReply struct { - *ProductSpecific +type GetRegisterCodeReply struct { + RegisterCode *RegisterCode `json:"customer"` } -type PatchProductSpecificRequest struct { - ProductSpecificId int64 `path:"id"` - ProductSpecific +type GetRegisterCodeRequest struct { + Id int64 `path:"id"` } -type PatchProductSpecificReply struct { - *ProductSpecific +type GetRoleReply struct { + *AdminRole } -type DeleteProductSpecificRequest struct { - ProductSpecificId int64 `path:"id"` +type GetRoleRequest struct { + RoleCode string `path:"roleCode"` } -type DeleteProductSpecificReply struct { - ProductSpecificId int64 `json:"id"` +type GetRoleUsersReply struct { + List []RoleUser `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type SKU struct { - Id int64 `json:"id,optional"` - UniqueId string `json:"uniqueId,optional"` - SkuNo string `json:"skuNo,optional"` - ProductId int64 `json:"productId,optional"` - Inventory int `json:"inventory,optional"` - UnitPrice float64 `json:"unitPrice,optional"` - ListPrice float64 `json:"listPrice,optional"` - IsActive bool `json:"isActive,optional"` - OptionsIds []int64 `json:"optionsIds,optional"` +type GetRoleUsersReqeust struct { + RoleCode string `path:"roleCode"` + PageIndex int `form:"pageIndex"` + PageSize int `form:"pageSize"` } -type ListSKUPageRequest struct { - LikeName string `form:"likeName,optional"` - ProductId int64 `form:"productId"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type GetSKUReply struct { + *SKU } -type ListSKUPageReply struct { - List []*SKU `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type GetSKURequest struct { + SKUId int64 `path:"id"` } -type CreateSKURequest struct { - SKU +type GetShippingAddressReply struct { + *ShippingAddress } -type CreateSKUReply struct { - SKUId int64 `json:"id"` +type GetShippingAddressRequest struct { + ShippingAddressId int64 `path:"id"` } -type ConfigSKURequest struct { - SKUs []SKU `json:"skus"` +type GetStoreReply struct { + *Store } -type ConfigSKUReply struct { - Result bool `json:"result"` +type GetStoreRequest struct { + StoreId int64 `path:"id"` } -type GetSKURequest struct { - SKUId int64 `path:"id"` +type GetTagReply struct { + *Tag } -type GetSKUReply struct { - *SKU +type GetTagRequest struct { + TagId int64 `path:"id"` } -type PutSKURequest struct { - SKUId int64 `path:"id"` - SKU +type GetUserInfoReply struct { + Id int64 `json:"id"` + Account string `json:"account"` + Name string `json:"name"` + Email string `json:"email"` + MobilePhone string `json:"mobilePhone"` + Gender string `json:"gender"` + NickName string `json:"nickName"` + Desc string `json:"desc"` + Avatar string `json:"avatar"` + ExternalEmail string `json:"externalEmail"` + DepName string `json:"depName"` + Position string `json:"position"` + JobTitle string `json:"jobTitle"` + IsEnabled bool `json:"isEnabled"` + CreatedAt string `json:"createdAt"` + Roles []string `json:"roles"` } -type PutSKUReply struct { - *SKU +type GetUserInfoReplyForMP struct { + *Customer } -type PatchSKURequest struct { - SKUId int64 `path:"id"` - SKU +type GetUserInfoReplyForWeb struct { + *Customer } -type PatchSKUReply struct { - *SKU +type GetUserOptionsReply struct { + List []UserOption `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type DeleteSKURequest struct { - SKUId int64 `path:"id"` +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 DeleteSKUReply struct { - SKUId int64 `json:"id"` +type GetUserQueryOptionsReply struct { + Roles []UserQueryRoleOption `json:"roles"` + Departments []UserQueryDepartmentOption `json:"departments"` } -type PriceConfig struct { - Discount float32 `json:"discount,optional"` - Price float64 `json:"price,optional"` - Days int8 `json:"days,optional"` - Type int8 `json:"type,optional"` - PriceBookEntryId int64 `json:"priceBookEntryId,optional"` - StartDate string `json:"startDate,optional"` - EndDate string `json:"endDate,optional"` +type GetUserReply struct { + *User } -type PriceBookEntrySpecific struct { - Inventory int16 `json:"inventory,optional"` - Weight float32 `json:"weight,optional"` - Volume float32 `json:"volume,optional"` - Encode string `json:"encode,optional"` - BarCode string `json:"barCode,optional"` - Extra string `json:"extra,optional"` +type GetUserRequest struct { + Id int64 `path:"id"` } -type PriceBookEntry struct { - Id int64 `json:"id,optional"` - UniqueID string `json:"uniqueID,optional"` - PriceBookId int64 `json:"priceBookId"` - ProductId int64 `json:"productId"` - SkuId int64 `json:"skuId,optional"` - UnitPrice float64 `json:"unitPrice"` - ListPrice float64 `json:"listPrice,optional"` - IsActive bool `json:"isActive, optional"` - PriceConfigs []*PriceConfig `json:"priceConfigs, optional"` - SKUEntries []*PriceBookEntry `json:"skuEntries, optional"` - PriceBookName string `json:"priceBookName,optional"` - ProductName string `json:"productName,optional"` - SPU string `json:"spu,optional"` - Discount float32 `json:"discount,optional"` +type GetVersionResponse struct { + Version string `json:"version,optional"` } -type ListPriceBookEntriesPageRequest struct { - LikeName string `form:"likeName,optional"` - PriceBookId int64 `form:"priceBookId,optional"` - ProductId int64 `form:"productId,optional"` - SkuId int64 `form:"skuId,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type GroupRobotMsgNewsArticlesReply struct { + Messaage string `json:"messaage"` } -type ListPriceBookEntriesPageReply struct { - List []*PriceBookEntry `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type GroupRobotMsgNewsArticlesRequest struct { + Key string `json:"key"` // 机器人key + Title string `json:"title"` + Description string `json:"description,omitempty"` + Url string `json:"url"` + PicUrl string `json:"picurl,omitempty"` } -type GetPriceBookEntryRequest struct { - PriceBookEntry int64 `path:"id"` +type GroupWithTag struct { + GroupId string `json:"groupId"` + GroupName string `json:"groupName"` + Tags []*WeWorkTag `json:"tags"` } -type GetPriceBookEntryReply struct { - *PriceBookEntry +type HealthCheckReply struct { } -type ConfigPriceBookEntryRequest struct { - PriceBookEntries []PriceBookEntry `json:"priceBookEntries"` +type HealthCheckRequest struct { } -type ConfigPriceBookEntryReply struct { - PriceBookEntries []*PriceBookEntry `json:"list"` +type Image struct { + MediaId string `json:"mediaId,optional"` // 不填 + PicUrl string `json:"picUrl,optional"` // 图片地址 } -type UpdatePriceBookEntryRequest struct { - Id int64 `path:"id"` - PriceBookEntry +type ImageAbleInfo struct { + Icon string `json:"icon"` + BackgroundColor string `json:"backgroundColor"` } -type UpdatePriceBookEntryReply struct { - Id int64 `json:"id"` +type ImportOrdersReply struct { + Total int `json:"total"` + Failed int `json:"failed"` + Ignored int `json:"ignored"` + Success int `json:"success"` } -type DeletePriceBookEntryRequest struct { - Id int64 `path:"id"` +type ImportOrdersRequest struct { + Content []byte `json:"content"` } -type DeletePriceBookEntryReply struct { - Id int64 `json:"id"` +type Lead struct { + Id int64 `json:"id,optional"` + Name string `json:"name"` + Mobile string `json:"mobile"` + Email string `json:"email,optional"` + Inviter *LeadInviter `json:"inviter,optional"` + InviterId int64 `json:"inviter,optional"` + Source int `json:"source,optional"` + Type int `json:"type,optional"` + IsActivated bool `json:"isActivated,optional,omitempty"` + CreatedAt string `json:"createdAt,optional"` + *LeadExternalId } -type Artisan struct { - Id int64 `json:"id,optional"` - UserId int64 `json:"userId,optional"` - Name string `json:"name,optional"` - Level int8 `json:"level"` - Gender bool `json:"gender,optional"` - Birthday string `json:"birthday,optional"` - PhoneNumber string `json:"phoneNumber,optional"` - WorkNo string `json:"workNo"` - Email string `json:"email,optional"` - Experience string `json:"experience,optional"` - Specialty string `json:"specialty,optional"` - Certificate string `json:"certificate,optional"` - Address string `json:"address,optional"` - CreatedAt string `json:"createdAt,optional"` - CoverImageId int64 `json:"coverImageId,optional"` - CoverImage *MediaResource `json:"coverImage,optional"` - DetailImageIds []int64 `json:"detailImageIds,optional"` - DetailImages []*MediaResource `json:"detailIOmages,optional"` - StoreIds []int64 `json:"storeIds,optional"` +type LeadExternalId struct { + OpenIdInMiniProgram string `json:"openIdInMiniProgram,optional"` + OpenIdInWeChatOfficialAccount string `json:"openIdInWeChatOfficialAccount,optional"` + OpenIdInWeCom string `json:"openIdInWeCom,optional"` } -type ListArtisansPageRequest struct { - Ids []int64 `form:"ids,optional"` - StoreIds []int64 `form:"storeIds,optional"` - LikeName string `form:"likeName,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type LeadInviter struct { + Id int64 `json:"id"` + Name string `json:"name,optional"` + Mobile string `json:"mobile,optional"` + Email string `json:"email,optional"` +} + +type Link struct { + MsgType string `json:"msgType,optional"` // 默认:link + Title string `json:"title"` // "消息标题", + PicURL string `json:"picUrl"` // "https://example.pic.com/path", + Desc string `json:"desc"` // "消息描述", + URL string `json:"url"` // "https://example.link.com/path" +} + +type ListAPIReply struct { + List []AdminAPI `json:"list"` +} + +type ListAPIRequest struct { + GroupId int64 `form:"groupId,optional"` } type ListArtisansPageReply struct { @@ -1971,445 +1733,506 @@ type ListArtisansPageReply struct { Total int64 `json:"total"` } -type CreateArtisanRequest struct { - Artisan -} - -type CreateArtisanReply struct { - ArtisanId int64 `json:"id"` +type ListArtisansPageRequest struct { + Ids []int64 `form:"ids,optional"` + StoreIds []int64 `form:"storeIds,optional"` + LikeName string `form:"likeName,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type GetArtisanRequest struct { - ArtisanId int64 `path:"id"` +type ListBillingAddressesPageReply struct { + List []*BillingAddress `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type GetArtisanReply struct { - *Artisan +type ListBillingAddressesPageRequest struct { + NameLike []string `form:"nameLike,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type PutArtisanRequest struct { - ArtisanId int64 `path:"id"` - Artisan +type ListCartItemsPageReply struct { + List []*CartItem `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type PutArtisanReply struct { - *Artisan +type ListCartItemsPageRequest struct { + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type DeleteArtisanRequest struct { - ArtisanId int64 `path:"id"` +type ListCategoryTreeReply struct { + ProductCategories []*Category `json:"tree"` } -type DeleteArtisanReply struct { - ArtisanId int64 `json:"id"` +type ListCategoryTreeRequest struct { + CategoryPId int `form:"categoryPId,optional"` + NeedChildren bool `form:"needChildren,optional"` + Names []string `form:"name,optional"` + OrderBy string `form:"orderBy,optional"` } -type BindArtisansToStoresRequest struct { - ArtisanIds []int64 `json:"artisanIds"` - StoreId []int64 `json:"storeIds"` +type ListCustomersPageReply struct { + List []Customer `json:"list,optional"` + PageIndex int `json:"pageIndex,optional"` + PageSize int `json:"pageSize,optional"` + Total int64 `json:"total,optional"` } -type BindArtisansToStoresReply struct { - PivotIds []int64 `json:"pivotIds"` +type ListCustomersPageRequest struct { + LikeName string `form:"likeName,optional"` + LikeMobile string `form:"likeMobile,optional"` + Sources []int `form:"sources,optional"` + Statuses []int `form:"statuses,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type ShippingAddress struct { - Id int64 `json:"id,optional"` - CustomerId int64 `json:"customerId,optional"` - Name string `json:"name,optional"` - Recipient string `json:"recipient,optional"` - AddressLine string `json:"addressLine,optional"` - AddressLine2 string `json:"addressLine2,optional"` - Street string `json:"street,optional"` - City string `json:"city,optional"` - Province string `json:"province,optional"` - PostalCode string `json:"postalCode,optional"` - Country string `json:"country,optional"` - PhoneNumber string `json:"phoneNumber,optional"` - IsDefault bool `json:"isDefault,optional"` +type ListDeliveryAddressesPageReply struct { + List []*DeliveryAddress `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type ListShippingAddressesPageRequest struct { +type ListDeliveryAddressesPageRequest struct { NameLike []string `form:"nameLike,optional"` OrderBy string `form:"orderBy,optional"` PageIndex int `form:"pageIndex,optional"` PageSize int `form:"pageSize,optional"` } -type ListShippingAddressesPageReply struct { - List []*ShippingAddress `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type ListDictionaryItemsReply struct { + List []DictionaryItem `json:"list"` } -type CreateShippingAddressRequest struct { - ShippingAddress +type ListDictionaryItemsRequest struct { + Type string `form:"type"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type CreateShippingAddressReply struct { - *ShippingAddress +type ListDictionaryTypesPageReply struct { + List []DictionaryType `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type GetShippingAddressRequest struct { - ShippingAddressId int64 `path:"id"` +type ListDictionaryTypesPageRequest struct { + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type GetShippingAddressReply struct { - *ShippingAddress +type ListLeadsPageReply struct { + List []Lead `json:"list,optional"` + PageIndex int `json:"pageIndex,optional"` + PageSize int `json:"pageSize,optional"` + Total int64 `json:"total,optional"` } -type PutShippingAddressRequest struct { - ShippingAddressId int64 `path:"id"` - ShippingAddress +type ListLeadsPageRequest struct { + LikeName string `form:"likeName,optional"` + LikeMobile string `form:"likeMobile,optional"` + Sources []int `form:"sources,optional"` + Statuses []int `form:"statuses,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type PutShippingAddressReply struct { - *ShippingAddress +type ListMGMRulesPageReply struct { + List []*MGMRule `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type PatchShippingAddressRequest struct { - ShippingAddressId int64 `path:"id"` - ShippingAddress +type ListMGMRulesPageRequest struct { + MGMRuleTypes []int8 `form:"mgmTypes,optional"` + Keys []string `form:"keys,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type PatchShippingAddressReply struct { - *ShippingAddress +type ListMediaResourcesPageReply struct { + List []MediaResource `json:"list,optional"` + PageIndex int `json:"pageIndex,optional"` + PageSize int `json:"pageSize,optional"` + Total int64 `json:"total,optional"` } -type DeleteShippingAddressRequest struct { - ShippingAddressId int64 `path:"id"` +type ListMediaResourcesPageRequest struct { + LikeName string `form:"likeName,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type DeleteShippingAddressReply struct { - ShippingAddressId int64 `json:"id"` +type ListMediasPageReply struct { + List []*Media `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type BillingAddress struct { - Id int64 `json:"id,optional"` - OrderId int64 `gorm:"comment:订单Id; index" json:"orderId"` - CustomerId int64 `json:"customerId,optional"` - Recipient string `json:"recipient,optional"` - AddressLine string `json:"addressLine,optional"` - AddressLine2 string `json:"addressLine2,optional"` - Street string `json:"street,optional"` - City string `json:"city,optional"` - Province string `json:"province,optional"` - PostalCode string `json:"postalCode,optional"` - Country string `json:"country,optional"` - PhoneNumber string `json:"phoneNumber,optional"` - IsDefault bool `json:"isDefault,optional"` +type ListMediasPageRequest struct { + MediaTypes []int8 `form:"mediaTypes,optional"` + Keys []string `form:"keys,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type ListBillingAddressesPageRequest struct { - NameLike []string `form:"nameLike,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type ListOrdersPageReply struct { + List []*Order `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type ListBillingAddressesPageReply struct { - List []*BillingAddress `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type ListOrdersPageRequest struct { + TypeIds []int `form:"typeIds,optional,omitempty"` + StatusIds []int `form:"statusIds,optional,omitempty"` + Name string `form:"name,optional,omitempty"` + StartAt string `form:"startAt,optional,omitempty"` + EndAt string `form:"endAt,optional,omitempty"` + OrderBy string `form:"orderBy,optional,omitempty"` + PageIndex int `form:"pageIndex,optional,omitempty"` + PageSize int `form:"pageSize,optional,omitempty"` } -type CreateBillingAddressRequest struct { - BillingAddress *BillingAddress `json:"billingAddress"` +type ListPaymentsPageReply struct { + List []*Payment `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type CreateBillingAddressReply struct { - BillingAddressId int64 `json:"id"` -} +type ListPaymentsPageRequest struct { + PaymentType string `form:"paymentType,optional"` + Keys []string `form:"keys,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` +} -type GetBillingAddressRequest struct { - BillingAddressId int64 `path:"id"` +type ListPluginFrontendRoutesReply struct { + Routes []PluginWebRoutes `json:"routes"` } -type GetBillingAddressReply struct { - BillingAddress *BillingAddress `json:"billingAddress"` +type ListPluginReply struct { + Plugins []PluginWebInfo `json:"plugins"` } -type PutBillingAddressRequest struct { - BillingAddressId int64 `path:"id"` - BillingAddress *BillingAddress `json:"billingAddress"` +type ListPluginRequest struct { + Socpe []string `form:"scope"` } -type PutBillingAddressReply struct { - BillingAddress *BillingAddress `json:"billingAddress"` +type ListPositionsReply struct { + List []Position `json:"list"` } -type PatchBillingAddressRequest struct { - BillingAddressId int64 `path:"id"` - BillingAddress *BillingAddress `json:"billingAddress"` +type ListPositionsRequest struct { + LikeName string `query:"likeName,optional"` } -type PatchBillingAddressReply struct { - BillingAddress *BillingAddress `json:"billingAddress"` +type ListPriceBookEntriesPageReply struct { + List []*PriceBookEntry `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type DeleteBillingAddressRequest struct { - BillingAddressId int64 `path:"id"` +type ListPriceBookEntriesPageRequest struct { + LikeName string `form:"likeName,optional"` + PriceBookId int64 `form:"priceBookId,optional"` + ProductId int64 `form:"productId,optional"` + SkuId int64 `form:"skuId,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type DeleteBillingAddressReply struct { - BillingAddressId int64 `json:"id"` +type ListPriceBooksPageReply struct { + List []PriceBook `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type DeliveryAddress struct { - Id int64 `json:"id,optional"` - OrderId int64 `gorm:"comment:订单Id; index" json:"orderId"` - CustomerId int64 `json:"customerId,optional"` - Recipient string `json:"recipient,optional"` - AddressLine string `json:"addressLine,optional"` - AddressLine2 string `json:"addressLine2,optional"` - Street string `json:"street,optional"` - City string `json:"city,optional"` - Province string `json:"province,optional"` - PostalCode string `json:"postalCode,optional"` - Country string `json:"country,optional"` - PhoneNumber string `json:"phoneNumber,optional"` - IsDefault bool `json:"isDefault,optional"` +type ListPriceBooksPageRequest struct { + LikeName string `json:"likeName,optional"` + StoreId int64 `json:"storeId,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type ListDeliveryAddressesPageRequest struct { - NameLike []string `form:"nameLike,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type ListProductCategoriesReply struct { + ProductCategories []*ProductCategory `json:"list"` } -type ListDeliveryAddressesPageReply struct { - List []*DeliveryAddress `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type ListProductCategoriesRequest struct { + CategoryPId int `form:"categoryPId,optional"` + NeedChildren bool `form:"needChildren,optional"` + Limit int `form:"limit,optional"` } -type CreateDeliveryAddressRequest struct { - DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` +type ListProductCategoryTreeReply struct { + ProductCategories []*ProductCategory `json:"tree"` } -type CreateDeliveryAddressReply struct { - DeliveryAddressId int64 `json:"id"` +type ListProductCategoryTreeRequest struct { + CategoryPId int `form:"categoryPId,optional"` + NeedChildren bool `form:"needChildren,optional"` + Names []string `form:"name,optional"` + OrderBy string `form:"orderBy,optional"` } -type GetDeliveryAddressRequest struct { - DeliveryAddressId int64 `path:"id"` +type ListProductSpecificPageReply struct { + List []*ProductSpecific `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type GetDeliveryAddressReply struct { - DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` +type ListProductSpecificPageRequest struct { + LikeName string `form:"likeName,optional"` + ProductId int64 `form:"productId"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type PutDeliveryAddressRequest struct { - DeliveryAddressId int64 `path:"id"` - DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` +type ListProductStatisticsPageReply struct { + List []*ProductStatistics `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type PutDeliveryAddressReply struct { - DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` +type ListProductStatisticsPageRequest struct { + LikeName string `form:"likeName,optional"` + ProductId int64 `form:"productId"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type PatchDeliveryAddressRequest struct { - DeliveryAddressId int64 `path:"id"` - DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` +type ListProductsPageReply struct { + List []Product `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type PatchDeliveryAddressReply struct { - DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` +type ListProductsPageRequest struct { + LikeName string `form:"likeName,optional"` + ProductTypeIds []int `form:"typeIds,optional"` + ProductStatusIds []int `form:"productStatusIds,optional"` + SalesStartAt string `form:"salesStartAt,optional,omitempty"` + SalesEndAt string `form:"salesEndAt,optional,omitempty"` + Keys []string `form:"keys,optional"` + ProductCategoryId int `form:"productCategoryId,optional"` + ProductCategoryIds []int `form:"productCategoryIds,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type DeleteDeliveryAddressRequest struct { - DeliveryAddressId int64 `path:"id"` +type ListRegisterCodesPageReply struct { + List []RegisterCode `json:"list,optional"` + PageIndex int `json:"pageIndex,optional"` + PageSize int `json:"pageSize,optional"` + Total int64 `json:"total,optional"` } -type DeleteDeliveryAddressReply struct { - DeliveryAddressId int64 `json:"id"` +type ListRegisterCodesPageRequest struct { + LikeName string `form:"likeName,optional"` + LikeMobile string `form:"likeMobile,optional"` + Sources []int `form:"sources,optional"` + Statuses []int `form:"statuses,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type Warehouse struct { - Id int64 `json:"id"` - Name string `json:"name"` - Address string `json:"address"` - City string `json:"city"` - Region string `json:"region"` - Type string `json:"type"` - Capacity int64 `json:"capacity"` - ContactPerson string `json:"contactPerson"` - ContactPhone string `json:"contactPhone"` - IsActive bool `json:"isActive, omitempty"` -} - -type ListWarehousesRequest struct { - NameLike string `json:"nameLike"` +type ListRolesReply struct { + List []AdminRole `json:"list"` +} + +type ListSKUPageReply struct { + List []*SKU `json:"list"` PageIndex int `json:"pageIndex"` PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type ListWarehousesResponse struct { - List []*Warehouse `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type ListSKUPageRequest struct { + LikeName string `form:"likeName,optional"` + ProductId int64 `form:"productId"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type GetWarehouseRequest struct { - Id int64 `json:"id"` +type ListShippingAddressesPageReply struct { + List []*ShippingAddress `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type GetWarehouseResponse struct { - Warehouse *Warehouse `json:"warehouse"` +type ListShippingAddressesPageRequest struct { + NameLike []string `form:"nameLike,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type CreateWarehouseRequest struct { - Warehouse *Warehouse `json:"warehouse"` +type ListStoresPageReply struct { + List []*Store `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type CreateWarehouseResponse struct { - WarehouseId int64 `json:"warehouseId"` +type ListStoresPageRequest struct { + Ids []int64 `form:"ids,optional"` + LikeName string `form:"likeName,optional"` + OrderBy string `form:"orderBy,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type UpdateWarehouseRequest struct { - Id int64 `json:"id"` - Warehouse *Warehouse `json:"warehouse"` +type ListTagTreeReply struct { + Tags []*Tag `json:"tree"` } -type UpdateWarehouseResponse struct { - Warehouse *Warehouse `json:"warehouse"` +type ListTagTreeRequest struct { + TagPId int `form:"tagPId,optional"` + NeedChildren bool `form:"needChildren,optional"` + Names []string `form:"name,optional"` + OrderBy string `form:"orderBy,optional"` } -type PatchWarehouseRequest struct { - Id int64 `json:"id"` - Warehouse *Warehouse `json:"warehouse"` +type ListUsersReply struct { + List []User `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type PatchWarehouseResponse struct { - Warehouse *Warehouse `json:"warehouse"` +type ListUsersRequest struct { + Ids []int64 `form:"ids,optional"` + LikeName string `form:"likeName,optional"` + LikeEmail string `form:"likeEmail,optional"` + DepIds []int64 `form:"depIds,optional"` + PositionIds []int64 `form:"positionIds,optional"` + LikePhoneNumber string `form:"likePhoneNumber,optional"` + RoleCodes []string `form:"roleCodes,optional"` + IsEnabled *bool `form:"isEnable,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type DeleteWarehouseRequest struct { - Id int64 `json:"id"` +type ListWeWorkDepartmentReply struct { + List []*WeWorkDepartment `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type DeleteWarehouseResponse struct { - WarehouseId int64 `json:"warehouseId"` +type ListWeWorkDepartmentReqeust struct { + WeWorkDepId int `json:"weWorkDepId,optional"` + Name string `json:"name,optional"` + NameEn string `json:"nameEn,optional"` + WeWorkParentId int `json:"weWorkParentId,optional"` + Order int `json:"order,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type ContractWayGroupNode struct { - Id int64 `json:"id"` - GroupName string `json:"groupName"` - Children []ContractWayGroupNode `json:"children"` +type ListWeWorkGroupQrcodeActiveReqeust struct { + UserId string `json:"userId,optional"` // 所属人 + Name string `json:"name,optional"` // 活码名称 + Qid string `json:"qid,optional"` // 唯一标识 + State int `json:"state,optional"` // 状态1:启用 2:禁用 3:删除 + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type GetContractWayGroupTreeRequest struct { -} - -type GetContractWayGroupTreeReply struct { - GroupTree ContractWayGroupNode `json:"tree"` -} - -type ContractWayGroup struct { - Id int64 `json:"id"` - GroupName string `json:"groupName"` -} - -type GetContractWayGroupListRequest struct { - GroupName string `form:"groupName,optional"` -} - -type GetContractWayGroupListReply struct { - Groups []ContractWayGroup `json:"groups"` -} - -type GetContractWaysRequest struct { - UserId int64 `form:"userId,optional"` - Name string `form:"name,optional"` - StartDate string `form:"startDate,optional"` - EndDate string `form:"endDate,optional"` - PageIndex int `form:"pageIndex"` - PageSize int `form:"pageSize"` +type ListWeWorkQrcodeActiveReply struct { + List []*WeWorkQrcodeActive `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type GetContractWaysReply struct { - List []ContractWay `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type ListWeWorkResourceImageReply struct { + List []*Resource `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type ContractWay struct { - Id int64 `json:"id"` - Type int `json:"type"` - Scene int `json:"scene"` - Style string `json:"style,optional"` - Remark string `json:"remark,optional"` - SkipVerify bool `json:"skipVerify,optional"` - State string `json:"state,optional"` - Users []string `json:"users,optional"` - Parties []int64 `json:"parties,optional"` - IsTemp bool `json:"isTemp,optional"` - ExpiresIn int `json:"expiresIn,optional"` - ChatExpiresIn int `json:"chatExpiresIn,optional"` - UnionId string `json:"unionId,optional"` - IsExclusive bool `json:"isExclusive,optional"` - Conclusions string `json:"conclusions,optional"` +type ListWeWorkResourceImageRequest struct { + ResourceType string `json:"resourceType,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type CreateContractWayRequest struct { - Type int `json:"type"` - Scene int `json:"scene"` - Style string `json:"style,optional"` - Remark string `json:"remark,optional"` - SkipVerify bool `json:"skipVerify,optional"` - State string `json:"state,optional"` - Users []string `json:"users,optional"` - Parties []int64 `json:"parties,optional"` - IsTemp bool `json:"isTemp,optional"` - ExpiresIn int `json:"expiresIn,optional"` - ChatExpiresIn int `json:"chatExpiresIn,optional"` - UnionId string `json:"unionId,optional"` - IsExclusive bool `json:"isExclusive,optional"` - Conclusions string `json:"conclusions,optional"` +type ListWeWorkTagGroupPageReply struct { + List []*GroupWithTag `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type CreateContractWayReply struct { - Id int64 `json:"id"` +type ListWeWorkTagGroupPageRequest struct { + GroupId string `json:"groupId,optional"` + GroupName string `json:"groupName,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type UpdateContractWayRequest struct { - Id int64 `path:"id"` - Type int `json:"type,optional"` - Scene int `json:"scene,optional"` - Style string `json:"style,optional"` - Remark string `json:"remark,optional"` - SkipVerify bool `json:"skipVerify,optional"` - State string `json:"state,optional"` - Users []string `json:"users,optional"` - Parties []int64 `json:"parties,optional"` - IsTemp bool `json:"isTemp,optional"` - ExpiresIn int `json:"expiresIn,optional"` - ChatExpiresIn int `json:"chatExpiresIn,optional"` - UnionId string `json:"unionId,optional"` - IsExclusive bool `json:"isExclusive,optional"` - Conclusions string `json:"conclusions,optional"` +type ListWeWorkTagGroupReply struct { + List []*WeWorkTagGroup `json:"list"` } -type UpdateContractWayReply struct { - ContractWayUpdated ContractWay `json:"contractWayUpdated"` +type ListWeWorkTagOptionReply struct { + List interface{} `json:"list"` } -type DeleteContractWayRequest struct { - Id int64 `path:"id"` +type ListWeWorkTagReply struct { + List []*WeWorkTag `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } -type DeleteContractWayReply struct { - Id int64 `json:"id"` +type ListWeWorkTagReqeust struct { + TagIds []string `json:"tagIds,optional"` + GroupIds []string `json:"groupIds,optional"` + Name string `json:"name,optional"` + Sync int `from:"sync,optional"` + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type SyncWeWorkOrganizationReply struct { - Status string `json:"status"` +type ListWeWorkUserReply struct { + List []*WechatUser `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` } type ListWeWorkUserReqeust struct { @@ -2425,1109 +2248,1133 @@ type ListWeWorkUserReqeust struct { PageSize int `form:"pageSize,optional"` } -type ListWeWorkUserReply struct { - List []*WechatUser `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` -} - -type WechatUser struct { - WeWorkUserId string `json:"weWorkUserId"` - Name string `json:"name"` - Position string `json:"position"` - Mobile string `gorm:"unique"` - Gender string `json:"gender"` - Email string `gorm:"unique"` - BizMail string `json:"bizMail"` - Avatar string `json:"avatar"` - ThumbAvatar string `json:"thumbAvatar"` - Telephone string `json:"telephone"` - Alias string `json:"alias"` - Address string `json:"address"` - OpenUserId string `json:"openUserId"` - WeWorkMainDepartmentId int `json:"weWorkMainDepartmentId"` - Status int `json:"status"` - QrCode string `json:"qrCode"` +type LoginReply struct { + Token string `json:"token"` + RefreshToken string `json:"refreshToken"` } -type ListWeWorkDepartmentReqeust struct { - WeWorkDepId int `json:"weWorkDepId,optional"` - Name string `json:"name,optional"` - NameEn string `json:"nameEn,optional"` - WeWorkParentId int `json:"weWorkParentId,optional"` - Order int `json:"order,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type LoginRequest struct { + UserName string `json:"userName,optional"` + PhoneNumber string `json:"phoneNumber,optional"` + Email string `json:"email,optional"` + Password string `json:"password"` } -type ListWeWorkDepartmentReply struct { - List []*WeWorkDepartment `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type Logistics struct { + OrderId int64 `json:"orderId,optional"` + Status string `json:"status,optional"` + TrackingCode string `json:"trackingCode,optional"` + Carrier string `json:"carrier,optional"` + EstimatedDeliveryDate string `json:"estimatedDeliveryDate,optional"` + ActualDeliveryDate string `json:"actualDeliveryDate,optional"` } -type WeWorkDepartment struct { - WeWorkDepId int `json:"weWorkDepId"` - Name string `json:"name"` - NameEn string `json:"nameEn"` - WeWorkParentId int `json:"weWorkParentId"` - Order int `json:"order"` - DepartmentLeader []string `json:"departmentLeader"` - RefDepartmentId int64 `json:"refDepartmentId"` +type MGMRule struct { + Id int64 `json:"id,optional"` + Name string `json:"name,optional"` + CommissionRate1 float32 `json:"commissionRate1,optional"` + CommissionRate2 float32 `json:"commissionRate2,optional"` + Scene int `json:"scene,optional"` + Description string `json:"description,optional"` } -type AppGroupListRequest struct { - ChatId string `form:"chatId,optional"` +type MPCustomerAuthRequest struct { + Code string `json:"code"` + IV string `json:"iv"` + EncryptedData string `json:"encryptedData"` } -type AppGroupListReply struct { - List interface{} `json:"list"` +type MPCustomerLoginAuthReply struct { + OpenId string `json:"openId"` + UnionId string `json:"unionId"` + PhoneNumber string `json:"phoneNumber"` + NickName string `json:"nickName"` + AvatarURL string `json:"avatarURL"` + Gender string `json:"gender"` + Token MPToken `json:"token"` } -type AppGroupCreateRequest struct { - Name string `json:"name"` // 名称 - Owner string `json:"owner"` // owner - UserList []string `json:"userList"` // 用户列表 - ChatId string `json:"chatId,optional"` +type MPCustomerLoginRequest struct { + Code string `json:"code"` } -type AppGroupCreateReply struct { - ChatId string `json:"chatId"` +type MPToken struct { + TokenType string `json:"tokenType"` + ExpiresIn string `json:"expiresIn"` + AccessToken string `json:"accessToken"` + RefreshToken string `json:"refreshToken"` } -type AppGroupMessageArticleRequest struct { - ChatIds []string `json:"chatIds"` - Title string `json:"title"` // "领奖通知", - Description string `json:"description"` // "
2016年9月26日
恭喜你抽中iPhone 7一台,领奖码:xxxx
请于2016年10月10日前联系行政同事领取
", - URL string `json:"url"` // "URL", - PicURL string `json:"picUrl"` // 多" - AppID string `json:"appId,optional"` - PagePath string `json:"pagePath,optional"` - SendTime int64 `json:"sendTime,optional"` // 定时发送,不填默认立刻发送 +type MPValidTokenReply struct { + Valid bool `json:"valid"` + Reason string `json:"reason"` } -type AppGroupMessageReply struct { - ChatIds []string `json:"chatIds"` +type MPValidTokenRequest struct { + Token string `form:"token"` } -type ApplicationRequest struct { - AgentId int `form:"agentId"` +type MatchRule struct { + TagId string `json:"tag_id,optional"` + Sex string `json:"sex,optional"` + Country string `json:"country,optional"` + Province string `json:"province,optional"` + City string `json:"city,optional"` + Language string `json:"language,optional"` } -type ApplicationReply struct { - Agentid int `json:"agentId"` - Name string `json:"name"` - SquareLogoUrl string `json:"squareLogoUrl"` - Description string `json:"description"` - AllowUserinfos AllowUserinfos `json:"allowUserInfos"` - AllowPartys AllowPartys `json:"allowPartys"` - AllowTags AllowTags `json:"allowTags"` - Close int `json:"close"` - RedirectDomain string `json:"redirectDomain"` - ReportLocationFlag int `json:"reportLocationFlag"` - Isreportenter int `json:"isreportenter"` - HomeUrl string `json:"homeUrl"` - CustomizedPublishStatus int `json:"customizedPublishStatus"` -} - -type AllowUserinfos struct { - User []User `json:"user"` -} - -//type User struct { -// Userid string `json:"userId"` -//} - -type AllowPartys struct { - Partyid []int `json:"partyId"` -} - -type AllowTags struct { - Tagid []int `json:"tagId"` -} - -type AppWeWorkListReply struct { - List []*AppWechat `json:"list"` -} - -type AppWechat struct { - Agentid int `json:"agentId"` - Name string `json:"name"` - SquareLogoUrl string `json:"squareLogoUrl"` -} - -type AppMessageBaseReply struct { - Message string `json:"message"` -} - -type AppMessageArticlesRequest struct { - ToUser string `json:"toUser,optional"` // "UserID1|UserID2|UserID3", - ToParty string `json:"toParty,optional"` // "PartyID1|PartyID2", - ToTag string `json:"toTag,optional"` // "TagID1 | TagID2", - MsgType string `json:"msgType"` // "text", - AgentID int `json:"agentId"` // 1, - News *AppMessageRequestNews `json:"news"` // 内容 - SendTime int64 `json:"sendTime,optional"` // 定时发送,不填默认立刻发送 -} - -type AppMessageRequestNews struct { - Article []*Article `json:"articles"` -} - -type Article struct { - Title string `json:"title"` // "领奖通知", - Description string `json:"description"` // "
2016年9月26日
恭喜你抽中iPhone 7一台,领奖码:xxxx
请于2016年10月10日前联系行政同事领取
", - URL string `json:"url"` // "URL", - PicURL string `json:"picUrl"` // - AppID string `json:"appId"` - PagePath string `json:"pagePath"` +type Media struct { + Id int64 `json:"id,optional"` + Title string `json:"title,optional"` + SubTitle string `json:"subTitle,optional"` + CoverImageId int64 `json:"coverImageId,optional"` + ResourceUrl string `json:"resourceUrl,optional"` + Description string `json:"description,optional"` + MediaType int `json:"mediaType,optional"` + ViewedCount int `json:"viewedCount,optional"` + CoverImage *MediaResource `json:"coverImage,optional"` + DetailImageIds []int64 `json:"detailImageIds,optional"` + DetailImages []*MediaResource `json:"detailImages,optional"` } -type WeWorkCustomersRequest struct { - UserId string `json:"userId,optional"` //https://developer.work.weixin.qq.com/document/path/92113 - Name string `json:"name,optional"` - UnionId string `json:"unionId,optional"` - TagId string `json:"tagId,optional"` - Sync int `form:"sync,optional"` // 是否同步(所有客户列表生效,场景:前端复选框勾选后,请求数据都会自动同步) - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type MediaResource struct { + Id int64 `json:"id,optional"` + CustomerId int64 `json:"customerId,optional"` + Filename string `json:"filename,optional"` + Size int64 `json:"size,optional"` + Url string `json:"url,optional"` + BucketName string `json:"bucketName,optional"` + IsLocalStored bool `json:"isLocalStored,optional"` + ContentType string `json:"contentType,optional"` + ResourceType string `json:"resourceType,optional"` + SortIndex int `json:"sortIndex,optional"` } -type WechatListCustomersReply struct { - List []*WechatCustomer `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type Membership struct { + Id int64 `json:"id,optional"` + Name string `json:"name,optional"` + MainMembershipId int64 `json:"mainMembershipId,optional"` + OrderId int64 `json:"orderId,optional"` + OrderItemId int64 `json:"orderItemId,optional"` + CustomerId int64 `json:"customerId,optional"` + ProductId int64 `json:"productId,optional"` + StartDate string `json:"startDate,optional"` + EndDate string `json:"endDate,optional"` + Status int `json:"status,optional"` + Type int `json:"type,optional"` + ExtendPeriod bool `json:"extendPeriod,optional"` + Plan int `json:"plan,optional"` } -type WechatSyncCustomerReply struct { - Status string `json:"status"` +type MenuRoles struct { + MenuName string `json:"menuName"` + AllowRoleCodes []string `json:"allowRoleCodes"` } -type WechatCustomer struct { - ExternalContact WechatCustomersWithExternalContactExternalProfile `json:"externalContact"` - FollowUser *WechatCustomersWithFollowUser `json:"followUser,omitempty"` - NextCursor string `json:"nextCursor,omitempty"` +type ModifyPasswordReqeust struct { + Password string `json:"password"` } -type WechatCustomersWithExternalContactExternalProfile struct { - ExternalUserId string `json:"externalUserId"` - Name string `json:"name"` - Position string `json:"position"` - Avatar string `json:"avatar"` - CorpName string `json:"corpName"` - CorpFullName string `json:"corpFullName"` - Type int `json:"type"` - Gender int `json:"gender"` - UnionId string `json:"unionId"` - UserId string `json:"userId"` - ExternalProfile ExternalContactExternalProfileWithExternalProfile `json:"externalProfile"` +type OAButton struct { + Name string `json:"name,optional"` + Type string `json:"type,optional"` + Key string `json:"key,omitempty,optional"` + Url string `json:"url,omitempty,optional"` + AppID string `json:"appid,omitempty,optional"` + PagePath string `json:"pagepath,omitempty,optional"` + OASubButton []*OASubButton `json:"sub_button,optional"` + Id int `json:"id,optional"` } -type ExternalContactExternalProfileWithExternalProfile struct { - ExternalAttr []*ExternalContactExternalProfileExternalProfileWithExternalAttr `json:"externalAttr"` +type OACustomerAuthRequest struct { + Code string `json:"code"` + IV string `json:"iv"` + EncryptedData string `json:"encryptedData"` } -type ExternalContactExternalProfileExternalProfileWithExternalAttr struct { - Type int `json:"type"` - Name string `json:"name"` - Text ExternalContactExternalProfileExternalProfileExternalAttrWithText `json:"text"` - Web ExternalContactExternalProfileExternalProfileExternalAttrWithWeb `json:"web"` - Miniprogram ExternalContactExternalProfileExternalProfileExternalAttrWithMiniprogram `json:"miniprogram"` +type OACustomerLoginAuthReply struct { + OpenId string `json:"openId"` + UnionId string `json:"unionId"` + PhoneNumber string `json:"phoneNumber"` + NickName string `json:"nickName"` + AvatarURL string `json:"avatarURL"` + Gender string `json:"gender"` + Token OAToken `json:"token"` } -type ExternalContactExternalProfileExternalProfileExternalAttrWithText struct { - Value string `json:"value"` +type OACustomerLoginRequest struct { + Code string `json:"code"` } -type ExternalContactExternalProfileExternalProfileExternalAttrWithWeb struct { - Url string `json:"url"` - Title string `json:"title"` +type OAMenu struct { + Id int64 `json:"id,optional"` + OAButton []*OAButton `json:"button,optional"` + MatchRule *MatchRule `json:"matchrule,optional"` } -type ExternalContactExternalProfileExternalProfileExternalAttrWithMiniprogram struct { - Appid string `json:"appid"` - Pagepath string `json:"pagepath"` - Title string `json:"title"` +type OASubButton struct { + Name string `json:"name,optional"` + Id int `json:"id,optional"` + Type string `json:"type,optional"` + Key string `json:"key,omitempty,optional"` + Url string `json:"url,omitempty,optional"` + AppID string `json:"appid,omitempty,optional"` + PagePath string `json:"pagepath,omitempty,optional"` } -type WechatCustomersWithFollowUser struct { - UserId string `json:"userId"` - Remark string `json:"remark"` - Description string `json:"description"` - Createtime int `json:"createtime"` - Tags []WechatCustomersFollowUserWithTags `json:"tags"` - TagIds []string `json:"tagIds"` - WechatChannels WechatCustomersFollowUserWithWechatChannels `json:"wechatChannels"` - RemarkCorpName string `json:"remarkCorpName,omitempty"` - RemarkMobiles []string `json:"remarkMobiles,omitempty"` - OpenUserId string `json:"openUserId"` - AddWay int `json:"addWay"` - State string `json:"state,omitempty"` +type OAToken struct { + TokenType string `json:"tokenType"` + ExpiresIn string `json:"expiresIn"` + AccessToken string `json:"accessToken"` + RefreshToken string `json:"refreshToken"` } -type WechatCustomersFollowUserWithTags struct { - GroupName string `json:"groupName"` - TagName string `json:"tagName"` - TagId string `json:"tagId,omitempty"` - Type int `json:"type"` +type Opportunity struct { + Id int64 `json:"id"` + Name string `json:"name"` + Requirement string `json:"requirement"` + CustomerId int64 `json:"customerId"` + Probability float32 `json:"probability"` + Source string `json:"source"` + Type string `json:"type"` + UserId int64 `json:"userId"` + Stage string `json:"stage"` + ClosedDate string `json:"closedDate"` + CreatedAt string `json:"createdAt"` + UpdatedAt string `json:"updatedAt"` } -type WechatCustomersFollowUserWithWechatChannels struct { - Nickname string `json:"nickname"` - Source int `json:"source"` +type Order struct { + Id int64 `json:"id,optional"` + CustomerId int64 `json:"customerId,optional"` + CartId int64 `json:"cartId,optional"` + PaymentType int `json:"paymentType,optional"` + Type int `json:"type,optional"` + Status int `json:"status,optional"` + OrderNumber string `json:"orderNumber,optional"` + Discount float64 `json:"discount,optional"` + ListPrice float64 `json:"listPrice,optional"` + UnitPrice float64 `json:"unitPrice,optional"` + Comment string `json:"comment,optional"` + CompletedAt string `json:"completedAt,optional,omitempty"` + CancelledAt string `json:"cancelledAt,optional,omitempty"` + ShippingMethod string `json:"shippingMethod,optional,omitempty"` + CreatedAt string `json:"createdAt,optional,omitempty"` + OrderItems []*OrderItem `json:"orderItems,optional"` + Payments []*Payment `json:"payments,optional"` + Logistics *Logistics `json:"logistics,optional"` } -type WeWorkCustomerGroupRequest struct { - StatusFilter int `json:"statusFilter,optional"` // https://developer.work.weixin.qq.com/document/path/92120 - OwnerFilter OwnerFilter `json:"ownerFilter,optional"` - Cursor string `json:"cursor,optional"` - Limit int `json:"limit,optional"` +type OrderItem struct { + Id int64 `json:"id,optional"` + OrderId int64 `json:"orderId,optional"` + PriceBookEntryId int64 `json:"priceBookEntryId,optional"` + CustomerId int64 `json:"customerId,optional"` + Type int `json:"type,optional"` + Status int `json:"status,optional"` + Quantity int `json:"quantity,optional"` + UnitPrice float64 `json:"unitPrice,optional"` + ListPrice float64 `json:"listPrice,optional"` + SellingPrice float64 `json:"sellingPrice,optional"` + CoverImage *MediaResource `json:"coverImage,optional"` + ProductName string `json:"productName,optional"` + SkuNo string `json:"skuNo,optional"` } type OwnerFilter struct { UseridList []string `json:"useridList,optional"` } -type WeWorkListCustomerGroupReply struct { - List []WechatCustomerGroup `json:"list"` //https://developer.work.weixin.qq.com/document/path/92122 +type PatchBillingAddressReply struct { + BillingAddress *BillingAddress `json:"billingAddress"` } -type WechatCustomerGroup struct { - ChatId string `json:"chatId"` - Name string `json:"name"` - Owner string `json:"owner"` - CreateTime int `json:"createTime"` - Notice string `json:"notice"` - MemberList []*WechatCustomerGroupMemberList `json:"memberList"` - AdminList []*WechatCustomerGroupAdminList `json:"adminList"` +type PatchBillingAddressRequest struct { + BillingAddressId int64 `path:"id"` + BillingAddress *BillingAddress `json:"billingAddress"` } -type WechatCustomerGroupAdminList struct { - UserId string `json:"userId"` +type PatchCategoryReply struct { + Category } -type WechatCustomerGroupMemberList struct { - UserId string `json:"userId"` - Type int `json:"type"` - JoinTime int `json:"joinTime"` - JoinScene int `json:"joinScene"` - Invitor WechatCustomerGroupMemberListInvitor `json:"invitor"` - GroupNickname string `json:"groupNickname"` - Name string `json:"name"` - UnionId string `json:"unionId,omitempty"` +type PatchCategoryRequest struct { + Id int64 `path:"id"` + PId int64 `json:"pId"` } -type WechatCustomerGroupMemberListInvitor struct { - UserId string `json:"userId"` +type PatchCustomerReply struct { + *Customer } -type WeWorkAddMsgTemplateRequest struct { - ChatType string `json:"chatType,optional,options=single|group"` // 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群 - ExternalUserId []string `json:"externalUserId,optional"` // chat_type为single时有效,不可与sender同时为空 - Sender string `json:"sender,optional"` // 发送企业群发消息的成员userid,当类型为发送给客户群时必填 - Text *WeWorkTextOfMessage `json:"text"` - Attachments []Content `json:"attachments,optional"` - SendTime int64 `json:"sendTime,optional"` // 定时发送,不填默认立刻发送// 附件, 当前仅支持图片 +type PatchCustomerRequest struct { + CustomerId int64 `path:"id"` + Name string `json:"name,optional"` + Email string `json:"email,optional"` + InviterId int64 `json:"inviterId,optional"` + Source int `json:"source,optional"` + Type int `json:"type,optional"` + IsActivated bool `json:"isActivated,optional,omitempty"` } -type WeWorkTextOfMessage struct { - Content string `json:"content"` // "内容" +type PatchDeliveryAddressReply struct { + DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` } -type Content struct { - Link Link `json:"link,optional"` +type PatchDeliveryAddressRequest struct { + DeliveryAddressId int64 `path:"id"` + DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` } -type Link struct { - MsgType string `json:"msgType,optional"` // 默认:link - Title string `json:"title"` // "消息标题", - PicURL string `json:"picUrl"` // "https://example.pic.com/path", - Desc string `json:"desc"` // "消息描述", - URL string `json:"url"` // "https://example.link.com/path" +type PatchDepartmentReply struct { + *Department } -type Image struct { - MediaId string `json:"mediaId,optional"` // 不填 - PicUrl string `json:"picUrl,optional"` // 图片地址 +type PatchDepartmentRequest struct { + Id int64 `path:"id"` + DepName string `json:"depName,optional"` + LeaderId int64 `json:"leaderId,optional"` + PId int64 `json:"pId,optional"` + Desc string `json:"desc,optional"` + PhoneNumber string `json:"phoneNumber,optional"` + Email string `json:"email,optional"` + Remark string `json:"remark,optional"` } -type WeWorkAddMsgTemplateResponse struct { - FailList []string `json:"failList"` - MsgId string `json:"msgId"` +type PatchLeadReply struct { + *Lead } -type GroupRobotMsgNewsArticlesRequest struct { - Key string `json:"key"` // 机器人key - Title string `json:"title"` - Description string `json:"description,omitempty"` - Url string `json:"url"` - PicUrl string `json:"picurl,omitempty"` +type PatchLeadRequest struct { + LeadId int64 `path:"id"` + Name string `json:"name,optional"` + Email string `json:"email,optional"` + InviterId int64 `json:"inviterId,optional"` + Source int `json:"source,optional"` + Type int `json:"type,optional"` + IsActivated bool `json:"isActivated,optional,omitempty"` } -type GroupRobotMsgNewsArticlesReply struct { - Messaage string `json:"messaage"` +type PatchOrderReply struct { + *Order } -type CreateWeWorkSourceImageReply struct { - Link string `json:"link"` +type PatchOrderRequest struct { + OrderId int64 `path:"id"` + Order } -type ListWeWorkResourceImageRequest struct { - ResourceType string `json:"resourceType,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type PatchPaymentReply struct { + *Payment } -type ListWeWorkResourceImageReply struct { - List []*Resource `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type PatchPaymentRequest struct { + PaymentId int64 `path:"id"` + Payment } -type Resource struct { - Link string `json:"link"` - ResourceType string `json:"resourceType"` - CreateTime string `json:"createTime"` +type PatchPositionReply struct { + *Position } -type ActionWeWorkGroupQrcodeActiveReply struct { - Status string `json:"status"` +type PatchPositionRequest struct { + Id int64 `path:"id"` + Name string `json:"name,optional"` + Desc string `json:"desc,optional"` + Level string `json:"level,optional"` + RoleCodes []string `json:"roleCodes,optional"` } -type ListWeWorkGroupQrcodeActiveReqeust struct { - UserId string `json:"userId,optional"` // 所属人 - Name string `json:"name,optional"` // 活码名称 - Qid string `json:"qid,optional"` // 唯一标识 - State int `json:"state,optional"` // 状态1:启用 2:禁用 3:删除 - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type PatchProductCategoryReply struct { + ProductCategory } -type ListWeWorkQrcodeActiveReply struct { - List []*WeWorkQrcodeActive `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type PatchProductCategoryRequest struct { + Id int64 `path:"id"` + PId int64 `json:"pId"` } -type WeWorkQrcodeActive struct { - QId string `json:"qid"` // 唯一码 - Name string `json:"name"` // 活码名称 - Desc string `json:"desc"` // 描述 - Owner []string `json:"owner"` // 所属人 - RealQrcodeLink string `json:"RealQrcodeLink"` // 真实二维码地址 - Platform int `json:"platform"` // 平台 - Classify int `json:"classify"` // 类型 1: 群 2:客户 3:渠道 - SceneLink string `json:"sceneLink"` // 场景落地页 - SafeThresholdValue int `json:"safeThresholdValue"` // 安全阈值(默认:0) - ExpiryDate int64 `json:"expiryDate"` // 有效期截止日 - ExpiryState int `json:"expiryState"` // 是否过期 - State int `json:"state"` // 状态1:启用 2:禁用 3:删除 - ActiveQrcodeLink string `json:"activeQrcodeLink"` // 群活码图片地址(可以载入任意媒资文章) - CPA int `json:"cpa"` // 活码打开次数 +type PatchProductReply struct { + *Product } -type QrcodeActiveRequest struct { - Qid string `path:"qid,optional"` // 更新操作使用 - Name string `json:"name"` // 活码名称 - Desc string `json:"desc"` // 描述 - Owner []string `json:"owner"` // 所属人 - RealQrcodeLink string `json:"RealQrcodeLink"` // 真实二维码地址 - SceneLink string `json:"sceneLink"` // 场景落地页 - SafeThresholdValue int `json:"safeThresholdValue,optional"` // 安全阈值(默认:0) - ExpiryDate int64 `json:"expiryDate"` // 有效期截止日(时间戳) +type PatchProductRequest struct { + ProductId int64 `path:"id"` + Product } -type ActionRequest struct { - Qid string `path:"qid"` // 唯一标识 - SceneQrcodeLink string `json:"sceneQrcodeLink,optional"` +type PatchProductSpecificReply struct { + *ProductSpecific } -type ListWeWorkTagGroupPageRequest struct { - GroupId string `json:"groupId,optional"` - GroupName string `json:"groupName,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type PatchProductSpecificRequest struct { + ProductSpecificId int64 `path:"id"` + ProductSpecific } -type ListWeWorkTagGroupPageReply struct { - List []*GroupWithTag `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type PatchProductStatisticsReply struct { + *ProductStatistics } -type GroupWithTag struct { - GroupId string `json:"groupId"` - GroupName string `json:"groupName"` - Tags []*WeWorkTag `json:"tags"` +type PatchProductStatisticsRequest struct { + ProductStatisticsId int64 `path:"id"` + ProductStatistics } -type ListWeWorkTagReqeust struct { - TagIds []string `json:"tagIds,optional"` - GroupIds []string `json:"groupIds,optional"` - Name string `json:"name,optional"` - Sync int `from:"sync,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type PatchRegisterCodeReply struct { + *RegisterCode } -type StatusWeWorkReply struct { - Status string `json:"status"` +type PatchRegisterCodeRequest struct { + RegisterCodeId int64 `path:"id"` + Name string `json:"name,optional"` + Email string `json:"email,optional"` + InviterId int64 `json:"inviterId,optional"` + Source int `json:"source,optional"` + Type int `json:"type,optional"` + IsActivated bool `json:"isActivated,optional,omitempty"` } -type ListWeWorkTagReply struct { - List []*WeWorkTag `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type PatchRoleReply struct { + *AdminRole } -type ListWeWorkTagOptionReply struct { - List interface{} `json:"list"` +type PatchRoleReqeust struct { + RoleCode string `path:"roleCode"` + Name string `json:"name"` + Desc string `json:"desc,optional"` + APIIds []int64 `json:"apiIds,optional"` + MenuNames []string `json:"menuNames,optional"` } -type WeWorkTag struct { - Type int `json:"type,omitempty"` - IsSelf int `json:"isSelf"` //1:自建 - TagId string `json:"tagId"` - GroupId string `json:"groupId,omitempty"` - GroupName string `json:"groupName,omitempty"` - Name string `json:"name"` - Sort int `json:"sort"` +type PatchSKUReply struct { + *SKU } -type ListWeWorkTagGroupReply struct { - List []*WeWorkTagGroup `json:"list"` +type PatchSKURequest struct { + SKUId int64 `path:"id"` + SKU } -type WeWorkTagGroup struct { - GroupId string `json:"groupId"` - GroupName string `json:"groupName"` +type PatchShippingAddressReply struct { + *ShippingAddress } -type CreateCorpTagRequest struct { - GroupId string `json:"groupId,optional"` //et2lz4UgAArZWi6ZKx1X8jo3uxfbC_sA 下拉标签组 - GroupName string `json:"groupName"` - Sort int `json:"Sort,optional"` - Tag []*TagFieldTag `json:"tag,optional"` - AgentId int64 `json:"agentId,optional"` //应用列表 +type PatchShippingAddressRequest struct { + ShippingAddressId int64 `path:"id"` + ShippingAddress } -type TagFieldTag struct { - Name string `json:"name"` - Sort int `json:"sort,optional"` +type PatchTagReply struct { + Tag } -type ActionCorpTagGroupRequest struct { - AgentId *int64 `json:"agentId,optional"` - GroupId *string `json:"groupId,optional"` - GroupName string `json:"groupName,optional"` - Tags []ActionTagGroup `json:"tags"` +type PatchTagRequest struct { + Id int64 `path:"id"` + PId int64 `json:"pId"` } -type ActionTagGroup struct { - TagId string `json:"tagId,optional"` - TagName string `json:"tagName,optional"` +type Payment struct { + Id int64 `json:"id,optional"` + OrderId int64 `json:"orderId,optional"` + PaymentDate string `json:"paymentDate,optional"` + PaymentType int `json:"paymentType,optional"` + PaidAmount float64 `json:"paidAmount,optional"` + PaymentNumber string `json:"paymentNumber,optional"` + ReferenceNumber string `json:"referenceNumber,optional"` + Status int `json:"status,optional"` + PaymentItems []*PaymentItem `json:"paymentItems,optional"` } -type UpdateCorpTagRequest struct { - TagId string `json:"tagId"` - Name string `json:"name"` - Sort int `json:"sort,optional"` - AgentId int64 `json:"agentId,optional"` +type PaymentItem struct { + Id int64 `json:"id,optional"` + PaymentID int64 `json:"paymentID,optional"` + Quantity int `json:"quantity,optional"` + UnitPrice float64 `json:"unitPrice,optional"` + PaymentCustomerName string `json:"paymentCustomerName,optional"` + BankInformation string `json:"bankInformation,optional"` + BankResponseCode string `json:"bankResponseCode,optional"` + CarrierType string `json:"carrierType,optional"` + CreditCardNumber string `json:"creditCardNumber,optional"` + DeductMembershipId string `json:"deductMembershipId,optional"` + DeductionPoint int32 `json:"deductionPoint,optional"` + InvoiceCreateTime string `json:"invoiceCreateTime,optional"` + InvoiceNumber string `json:"invoiceNumber,optional"` + InvoiceTotalAmount float64 `json:"invoiceTotalAmount,optional"` + TaxIdNumber string `json:"taxIdNumber,optional"` } -type DeleteCorpTagRequest struct { - TagIds []string `json:"tagIds,optional"` - GroupIds []string `json:"groupIds,optional"` - AgentId int64 `json:"agentId,optional"` +type PivotDataDictionaryToObject struct { + DataDictionaryType string `json:"dataDictionaryType,optional"` + DataDictionaryKey string `json:"dataDictionaryKey,optional"` } -type ActionCustomerTagRequest struct { - UserId string `json:"userId"` - ExternalUserId string `json:"externalUserId"` - AddTag []string `json:"addTag,optional"` - RemoveTag []string `json:"removeTag,optional"` +type PlatformAuthRequest struct { + AccessKey string `json:"accessKey"` + SecretKey string `json:"secretKey"` } -type OASubButton struct { - Name string `json:"name,optional"` - Id int `json:"id,optional"` - Type string `json:"type,optional"` - Key string `json:"key,omitempty,optional"` - Url string `json:"url,omitempty,optional"` - AppID string `json:"appid,omitempty,optional"` - PagePath string `json:"pagepath,omitempty,optional"` +type PlatformAuthResponse struct { + TokenType string `json:"tokenType"` + ExpiresIn string `json:"expiresIn"` + AccessToken string `json:"accessToken"` + RefreshToken string `json:"refreshToken"` } -type OAButton struct { - Name string `json:"name,optional"` - Type string `json:"type,optional"` - Key string `json:"key,omitempty,optional"` - Url string `json:"url,omitempty,optional"` - AppID string `json:"appid,omitempty,optional"` - PagePath string `json:"pagepath,omitempty,optional"` - OASubButton []*OASubButton `json:"sub_button,optional"` - Id int `json:"id,optional"` +type PluginWebInfo struct { + Name string `json:"name"` + Desc string `json:"desc"` + Verison string `json:"version"` + IsEnabled bool `json:"isEnabled"` + Routes []Route `json:"routes"` } -type MatchRule struct { - TagId string `json:"tag_id,optional"` - Sex string `json:"sex,optional"` - Country string `json:"country,optional"` - Province string `json:"province,optional"` - City string `json:"city,optional"` - Language string `json:"language,optional"` +type PluginWebRouteMeta struct { + Locale string `json:"locale"` + Icon string `json:"icon"` + RequestAuth bool `json:"requestAuth"` } -type OAMenu struct { - Id int64 `json:"id,optional"` - OAButton []*OAButton `json:"button,optional"` - MatchRule *MatchRule `json:"matchrule,optional"` +type PluginWebRoutes struct { + Name string `json:"name"` + Path string `json:"path"` + Meta PluginWebRouteMeta `json:"meta"` + Children []PluginWebRoutes `json:"children"` } -type SyncMenusRequest struct { - OAMenu +type Position struct { + Id int64 `json:"id"` + Name string `json:"name"` + Desc string `json:"desc"` + Level string `json:"level"` + RoleCodes []string `json:"roleCodes"` } -type SyncMenusReply struct { - Success bool `json:"success,optional"` - Data interface{} `json:"data"` +type PriceBook struct { + Id int64 `json:"id,optional"` + IsStandard bool `json:"isStandard,optional"` + Name string `json:"name"` + Description string `json:"description,optional"` + StoreId int64 `json:"storeId,optional"` + CreatedAt string `json:"createdAt,optional"` } -type CreateMenuRequest struct { - OAMenu +type PriceBookEntry struct { + Id int64 `json:"id,optional"` + UniqueID string `json:"uniqueID,optional"` + PriceBookId int64 `json:"priceBookId"` + ProductId int64 `json:"productId"` + SkuId int64 `json:"skuId,optional"` + UnitPrice float64 `json:"unitPrice"` + ListPrice float64 `json:"listPrice,optional"` + IsActive bool `json:"isActive, optional"` + PriceConfigs []*PriceConfig `json:"priceConfigs, optional"` + SKUEntries []*PriceBookEntry `json:"skuEntries, optional"` + PriceBookName string `json:"priceBookName,optional"` + ProductName string `json:"productName,optional"` + SPU string `json:"spu,optional"` + Discount float32 `json:"discount,optional"` } -type CreateMenuReply struct { - Success bool `json:"success,optional"` - Data interface{} `json:"data"` +type PriceBookEntrySpecific struct { + Inventory int16 `json:"inventory,optional"` + Weight float32 `json:"weight,optional"` + Volume float32 `json:"volume,optional"` + Encode string `json:"encode,optional"` + BarCode string `json:"barCode,optional"` + Extra string `json:"extra,optional"` } -type QueryMenusReply struct { - Button interface{} `json:"button"` - MatchRule interface{} `json:"matchrule"` +type PriceConfig struct { + Discount float32 `json:"discount,optional"` + Price float64 `json:"price,optional"` + Days int8 `json:"days,optional"` + Type int8 `json:"type,optional"` + PriceBookEntryId int64 `json:"priceBookEntryId,optional"` + StartDate string `json:"startDate,optional"` + EndDate string `json:"endDate,optional"` } -type DeleteMenuReply struct { - Success bool `json:"success"` - Data interface{} `json:"data"` +type Product struct { + Id int64 `json:"id,optional"` + Name string `json:"name"` + SPU string `json:"spu"` + Type int `json:"type"` + Plan int `json:"plan"` + AccountingCategory string `json:"accountingCategory"` + CanSellOnline bool `json:"canSellOnline,optional"` + CanUseForDeduct bool `json:"canUseForDeduct,optional"` + Description string `json:"description,optional"` + AllowedSellQuantity int `json:"allowedSellQuantity,optional"` + ValidityPeriodDays int `json:"validityPeriodDays,optional"` + SaleStartDate string `json:"saleStartDate,optional"` + SaleEndDate string `json:"saleEndDate,optional"` + ApprovalStatus int `json:"approvalStatus,optional"` + IsActivated bool `json:"isActivated,optional,omitempty"` + Sort int `json:"sort,optional,omitempty"` + CreatedAt string `json:"createdAt,optional"` + ProductSpecifics []*ProductSpecific `json:"productSpecifics,optional"` + PivotSalesChannels []*PivotDataDictionaryToObject `json:"pivotSalesChannels,optional"` + PivotPromoteChannels []*PivotDataDictionaryToObject `json:"pivotPromoteChannels,optional"` + ProductCategories []*ProductCategory `json:"productCategories,optional"` + SalesChannelsItemIds []int64 `json:"salesChannelsItemIds,optional"` + PromoteChannelsItemIds []int64 `json:"promoteChannelsItemIds,optional"` + CategoryIds []int64 `json:"categoryIds,optional"` + CoverImageIds []int64 `json:"coverImageIds,optional"` + CoverImages []*MediaResource `json:"coverImages,optional"` + CoverImageIdSortIndexs []*SortIdItem `json:"coverImageIdSortIndexes,optional"` + DetailImageIds []int64 `json:"detailImageIds,optional"` + DetailImages []*MediaResource `json:"detailImages,optional"` + DetailImageIdSortIndexs []*SortIdItem `json:"detailImageIdSortIndexes,optional"` + ActivePriceEntry *ActivePriceEntry `json:"activePriceBookEntry,optional"` + PriceBookEntries []*PriceBookEntry `json:"priceBookEntries,optional"` + SKUs []*SKU `json:"skus,optional"` + *ProductAttribute + ViewedCount int `json:"viewedCount,optional"` } -type GetOAMediaListRequest struct { - Offset int64 `json:"offset,optional"` - Count int64 `json:"count,optional"` - MediaType string `json:"type"` +type ProductAttribute struct { + Id int64 `json:"id,optional"` + Inventory int16 `json:"inventory,optional"` + SoldAmount int16 `json:"soldAmount,optional"` + Weight float32 `json:"weight,optional"` + Volume float32 `json:"volume,optional"` + Encode string `json:"encode,optional"` + BarCode string `json:"barCode,optional"` + Extra string `json:"extra,optional"` } -type GetOAMediaListReply struct { - TotalCount interface{} `json:"total_count"` - ItemCount interface{} `json:"item_count"` - Item interface{} `json:"item"` +type ProductCategory struct { + Id int64 `json:"id,optional"` + PId int64 `json:"pId"` + Name string `json:"name"` + Sort int `json:"sort"` + ViceName string `json:"viceName"` + Description string `json:"description"` + CreatedAt string `json:"createdAt,optional"` + ImageAbleInfo + CoverImageId int64 `json:"coverImageId,optional"` + CoverImage *MediaResource `json:"coverImage,optional"` + Children []*ProductCategory `json:"children,optional"` } -type GetOAMediaNewsListReply struct { - NewsItem interface{} `json:"news_item"` +type ProductSpecific struct { + Id int64 `json:"id,optional"` + ProductId int64 `json:"productId"` + Name string `json:"name"` + SpecificOptions []*SpecificOption `json:"specificOptions,optional"` } -type CreateOAMediaRequest struct { - OAMedia interface{} `json:"media"` +type ProductStatistics struct { + Id int64 `json:"id,optional"` + ProductId int64 `json:"productId"` + SoldAmount int64 `json:"soldAmount,optional"` + InventoryQuantity int64 `json:"inventoryQuantity,optional"` + ViewCount int64 `json:"viewCount,optional"` + BaseSoldAmount int64 `json:"baseSoldAmount,optional"` + BaseInventoryQuantity int64 `json:"baseInventoryQuantity,optional"` + BaseViewCount int64 `json:"baseViewCount,optional"` } -type CreateOAMediaReply struct { - Success bool `json:"success,optional"` - Data interface{} `json:"data"` +type PutArtisanReply struct { + *Artisan } -type GetOAMediaRequest struct { - MediaId string `path:"mediaId"` +type PutArtisanRequest struct { + ArtisanId int64 `path:"id"` + Artisan } -type GetOAMediaReply struct { - OAMedia interface{} `json:"media"` +type PutBillingAddressReply struct { + BillingAddress *BillingAddress `json:"billingAddress"` } -type GetOAMediaByVideoReply struct { - Title string `json:"title"` - Description string `json:"description"` - DownUrl string `json:"down_url"` +type PutBillingAddressRequest struct { + BillingAddressId int64 `path:"id"` + BillingAddress *BillingAddress `json:"billingAddress"` } -type DeleteOAMediaRequest struct { - MediaId string `path:"mediaId"` +type PutCustomerReply struct { + *Customer } -type DeleteOAMediaReply struct { - Success bool `json:"success"` - Data interface{} `json:"data"` +type PutCustomerRequest struct { + CustomerId int64 `path:"id"` + Customer } -type MPValidTokenRequest struct { - Token string `form:"token"` +type PutDeliveryAddressReply struct { + DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` } -type MPValidTokenReply struct { - Valid bool `json:"valid"` - Reason string `json:"reason"` +type PutDeliveryAddressRequest struct { + DeliveryAddressId int64 `path:"id"` + DeliveryAddress *DeliveryAddress `json:"deliveryAddress"` } -type MPCustomerLoginRequest struct { - Code string `json:"code"` +type PutLeadReply struct { + *Lead } -type MPCustomerAuthRequest struct { - Code string `json:"code"` - IV string `json:"iv"` - EncryptedData string `json:"encryptedData"` +type PutLeadRequest struct { + LeadId int64 `path:"id"` + Lead } -type MPCustomerLoginAuthReply struct { - OpenId string `json:"openId"` - UnionId string `json:"unionId"` - PhoneNumber string `json:"phoneNumber"` - NickName string `json:"nickName"` - AvatarURL string `json:"avatarURL"` - Gender string `json:"gender"` - Token MPToken `json:"token"` +type PutOrderReply struct { + *Order } -type MPToken struct { - TokenType string `json:"tokenType"` - ExpiresIn string `json:"expiresIn"` - AccessToken string `json:"accessToken"` - RefreshToken string `json:"refreshToken"` +type PutOrderRequest struct { + OrderId int64 `path:"id"` + Order } -type GetUserInfoReplyForMP struct { - *Customer +type PutPaymentReply struct { + *Payment } -type GetCustomerMembershipByTypeRequest struct { - TypeId int64 `form:"typeId"` +type PutPaymentRequest struct { + PaymentId int64 `path:"id"` + Payment } -type GetCustomerMembershipByTypeReply struct { - *Membership +type PutProductReply struct { + *Product } -type ListProductCategoriesRequest struct { - CategoryPId int `form:"categoryPId,optional"` - NeedChildren bool `form:"needChildren,optional"` - Limit int `form:"limit,optional"` +type PutProductRequest struct { + ProductId int64 `path:"id"` + Product } -type ListProductCategoriesReply struct { - ProductCategories []*ProductCategory `json:"list"` +type PutProductSpecificReply struct { + *ProductSpecific } -type ProductStatistics struct { - Id int64 `json:"id,optional"` - ProductId int64 `json:"productId"` - SoldAmount int64 `json:"soldAmount,optional"` - InventoryQuantity int64 `json:"inventoryQuantity,optional"` - ViewCount int64 `json:"viewCount,optional"` - BaseSoldAmount int64 `json:"baseSoldAmount,optional"` - BaseInventoryQuantity int64 `json:"baseInventoryQuantity,optional"` - BaseViewCount int64 `json:"baseViewCount,optional"` +type PutProductSpecificRequest struct { + ProductSpecificId int64 `path:"id"` + ProductSpecific } -type ListProductStatisticsPageRequest struct { - LikeName string `form:"likeName,optional"` - ProductId int64 `form:"productId"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type PutProductStatisticsReply struct { + *ProductStatistics } -type ListProductStatisticsPageReply struct { - List []*ProductStatistics `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type PutProductStatisticsRequest struct { + ProductStatisticsId int64 `path:"id"` + ProductStatistics } -type ConfigProductStatisticsRequest struct { - *ProductStatistics +type PutRegisterCodeReply struct { + *RegisterCode } -type ConfigProductStatisticsReply struct { - Result bool `json:"result"` +type PutRegisterCodeRequest struct { + RegisterCodeId int64 `path:"id"` + RegisterCode } -type GetProductStatisticsRequest struct { - ProductId int64 `path:"id"` +type PutSKUReply struct { + *SKU } -type GetProductStatisticsReply struct { - *ProductStatistics +type PutSKURequest struct { + SKUId int64 `path:"id"` + SKU } -type PutProductStatisticsRequest struct { - ProductStatisticsId int64 `path:"id"` - ProductStatistics +type PutShippingAddressReply struct { + *ShippingAddress } -type PutProductStatisticsReply struct { - *ProductStatistics +type PutShippingAddressRequest struct { + ShippingAddressId int64 `path:"id"` + ShippingAddress } -type PatchProductStatisticsRequest struct { - ProductStatisticsId int64 `path:"id"` - ProductStatistics +type PutStoreReply struct { + *Store } -type PatchProductStatisticsReply struct { - *ProductStatistics +type PutStoreRequest struct { + StoreId int64 `path:"id"` + Store } -type DeleteProductStatisticsRequest struct { - ProductStatisticsId int64 `path:"id"` +type QrcodeActiveRequest struct { + Qid string `path:"qid,optional"` // 更新操作使用 + Name string `json:"name"` // 活码名称 + Desc string `json:"desc"` // 描述 + Owner []string `json:"owner"` // 所属人 + RealQrcodeLink string `json:"RealQrcodeLink"` // 真实二维码地址 + SceneLink string `json:"sceneLink"` // 场景落地页 + SafeThresholdValue int `json:"safeThresholdValue,optional"` // 安全阈值(默认:0) + ExpiryDate int64 `json:"expiryDate"` // 有效期截止日(时间戳) } -type DeleteProductStatisticsReply struct { - ProductStatisticsId int64 `json:"id"` +type QueryMenusReply struct { + Button interface{} `json:"button"` + MatchRule interface{} `json:"matchrule"` } -type Cart struct { - Id int64 `json:"id", optional"` - CustomerId int64 `json:"customerId", optional"` - Status int `json:"status", optional"` - Items []*CartItem `json:"items", optional"` +type RegisterCode struct { + Id int64 `json:"id,optional"` + Code string `json:"code,optional"` + RegisterCustomerID int64 `json:"registerCustomerID,optional"` + ExpiredAt string `json:"expiredAt,optional"` + CreatedAt string `json:"createdAt,optional"` } -type CartItem struct { - Id int64 `json:"id, optional"` - CustomerId int64 `json:"customerId,omitempty,optional"` - CartId int64 `json:"cartId,omitempty,optional"` - ProductId int64 `json:"productId,omitempty,optional"` - SkuId int64 `json:"skuId,omitempty,optional"` - ProductName string `json:"productName,omitempty,optional"` - ListPrice float64 `json:"listPrice,omitempty,optional"` - UnitPrice float64 `json:"unitPrice,omitempty,optional"` - Discount float64 `json:"discount,omitempty,optional"` - Quantity int `json:"quantity,omitempty,optional"` - Specifications string `json:"specifications,omitempty,optional"` - ImageURL string `json:"imageUrl,omitempty,optional"` +type RegisterPluginReply struct { + Name string `json:"name"` + Etc map[string]interface{} `json:"etc"` } -type ListCartItemsPageRequest struct { - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type RegisterPluginRequest struct { + Name string `json:"name"` + Routes []Route `json:"routes"` + Addr string `json:"addr"` } -type ListCartItemsPageReply struct { - List []*CartItem `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type RemoveCartItemReply struct { + ItemId int64 `json:"itemId"` } -type GetCartRequest struct { +type RemoveCartItemRequest struct { + ItemId int64 `path:"itemId"` } -type GetCartReply struct { - *Cart +type ResetPasswordReply struct { + Status string `json:"status"` } -type AddToCartRequest struct { - CartItem +type ResetPasswordRequest struct { + UserId int64 `json:"userId"` } -type AddToCartReply struct { - *CartItem +type Resource struct { + Link string `json:"link"` + ResourceType string `json:"resourceType"` + CreateTime string `json:"createTime"` } -type UpdateCartItemQuantityRequest struct { - ItemId int64 `path:"itemId"` - Quantity int `json:"quantity"` +type RoleUser struct { + Id int64 `json:"id"` + Name string `json:"name"` + Nickname string `json:"nickname"` + Account string `json:"account"` + PhoneNumber string `json:"phoneNumber"` + Department *RoleUserDepartment `json:"department"` + Email string `json:"email"` } -type UpdateCartItemQuantityReply struct { - *CartItem +type RoleUserDepartment struct { + Id int64 `json:"id"` + Name string `json:"name"` } -type RemoveCartItemRequest struct { - ItemId int64 `path:"itemId"` +type Route struct { + Method string `json:"method"` + Path string `json:"path"` } -type RemoveCartItemReply struct { - ItemId int64 `json:"itemId"` +type SKU struct { + Id int64 `json:"id,optional"` + UniqueId string `json:"uniqueId,optional"` + SkuNo string `json:"skuNo,optional"` + ProductId int64 `json:"productId,optional"` + Inventory int `json:"inventory,optional"` + UnitPrice float64 `json:"unitPrice,optional"` + ListPrice float64 `json:"listPrice,optional"` + IsActive bool `json:"isActive,optional"` + OptionsIds []int64 `json:"optionsIds,optional"` } -type ClearCartItemsRequest struct { +type SceneQrcodeActiveReply struct { + QId string `json:"qid"` // 唯一码 + Name string `json:"name"` // 活码名称 + Desc string `json:"desc"` // 描述 + Owner []string `json:"owner"` // 所属人 + RealQrcodeLink string `json:"RealQrcodeLink"` // 真实二维码地址 + Platform int `json:"platform"` // 平台 + Classify int `json:"classify"` // 类型 1: 群 2:客户 3:渠道 + SceneLink string `json:"sceneLink"` // 场景落地页 + SafeThresholdValue int `json:"safeThresholdValue"` // 安全阈值(默认:0) + ExpiryDate int64 `json:"expiryDate"` // 有效期截止日 + State int `json:"state"` // 状态1:启用 2:禁用 3:删除 + ActiveQrcodeLink string `json:"activeQrcodeLink"` // 群活码图片地址(可以载入任意媒资文章) + CPA int `json:"cpa"` // 活码打开次数 } -type ClearCartItemsReply struct { - Message string `json:"message"` +type SceneRequest struct { + Qid string `path:"qid"` // 唯一标识 } -type CreateOrderByProductsRequest struct { - PriceBookId int64 `json:"PriceBookId,optional,emptyomit"` - ProductIds []int64 `json:"productIds"` - SkuIds []int64 `json:"skuIds"` - Quantities []int `json:"quantities"` - ShippingAddressId int64 `json:"shippingAddressId,optional,emptyomit"` - Comment string `json:"comment"` +type SetRolePermissionsReply struct { + Status string `json:"status"` } -type CreateOrderByProductsReply struct { - OrderId int64 `json:"orderId"` - PaymentAmount float64 `json:"paymentAmount"` +type SetRolePermissionsRequest struct { + RoleCode string `path:"roleCode"` + APIIds []int64 `json:"apiIds"` } -type CreateOrderByCartItemsRequest struct { - CartItemIds []int64 `json:"cartItemIds"` - ShippingAddressId int64 `json:"shippingAddressId"` - Comment string `json:"comment"` +type SetRoleUsersReply struct { + Status string `json:"status"` } -type CreateOrderByCartItemsReply struct { - OrderId int64 `json:"orderId"` - CartId int64 `json:"cartId"` - PaymentAmount float64 `json:"paymentAmount"` +type SetRoleUsersRequest struct { + RoleCode string `path:"roleCode"` + UserIds []int64 `json:"userIds"` } -type CancelOrderRequest struct { - OrderId int64 `path:"id"` +type SetUserRolesReply struct { + Status string `json:"status"` } -type CancelOrderReply struct { - OrderId int64 `json:"orderId,optional"` +type SetUserRolesRequest struct { + UserId int64 `path:"userId"` + RoleCodes []string `json:"roleCodes"` } -type OrderItem struct { - Id int64 `json:"id,optional"` - OrderId int64 `json:"orderId,optional"` - PriceBookEntryId int64 `json:"priceBookEntryId,optional"` - CustomerId int64 `json:"customerId,optional"` - Type int `json:"type,optional"` - Status int `json:"status,optional"` - Quantity int `json:"quantity,optional"` - UnitPrice float64 `json:"unitPrice,optional"` - ListPrice float64 `json:"listPrice,optional"` - SellingPrice float64 `json:"sellingPrice,optional"` - CoverImage *MediaResource `json:"coverImage,optional"` - ProductName string `json:"productName,optional"` - SkuNo string `json:"skuNo,optional"` +type ShippingAddress struct { + Id int64 `json:"id,optional"` + CustomerId int64 `json:"customerId,optional"` + Name string `json:"name,optional"` + Recipient string `json:"recipient,optional"` + AddressLine string `json:"addressLine,optional"` + AddressLine2 string `json:"addressLine2,optional"` + Street string `json:"street,optional"` + City string `json:"city,optional"` + Province string `json:"province,optional"` + PostalCode string `json:"postalCode,optional"` + Country string `json:"country,optional"` + PhoneNumber string `json:"phoneNumber,optional"` + IsDefault bool `json:"isDefault,optional"` } -type Order struct { - Id int64 `json:"id,optional"` - CustomerId int64 `json:"customerId,optional"` - CartId int64 `json:"cartId,optional"` - PaymentType int `json:"paymentType,optional"` - Type int `json:"type,optional"` - Status int `json:"status,optional"` - OrderNumber string `json:"orderNumber,optional"` - Discount float64 `json:"discount,optional"` - ListPrice float64 `json:"listPrice,optional"` - UnitPrice float64 `json:"unitPrice,optional"` - Comment string `json:"comment,optional"` - CompletedAt string `json:"completedAt,optional,omitempty"` - CancelledAt string `json:"cancelledAt,optional,omitempty"` - ShippingMethod string `json:"shippingMethod,optional,omitempty"` - CreatedAt string `json:"createdAt,optional,omitempty"` - OrderItems []*OrderItem `json:"orderItems,optional"` - Payments []*Payment `json:"payments,optional"` - Logistics *Logistics `json:"logistics,optional"` +type SortIdItem struct { + Id int64 `json:"id,optional"` + SortIndex int `json:"sortIndex,optional"` } -type ListOrdersPageRequest struct { - TypeIds []int `form:"typeIds,optional,omitempty"` - StatusIds []int `form:"statusIds,optional,omitempty"` - Name string `form:"name,optional,omitempty"` - StartAt string `form:"startAt,optional,omitempty"` - EndAt string `form:"endAt,optional,omitempty"` - OrderBy string `form:"orderBy,optional,omitempty"` - PageIndex int `form:"pageIndex,optional,omitempty"` - PageSize int `form:"pageSize,optional,omitempty"` +type SpecificOption struct { + Id int64 `json:"id,optional"` + ProductSpecificId int64 `json:"ProductSpecificId,optional"` + Name string `json:"name,optional"` + IsActivated bool `json:"isActivated,optional"` } -type ListOrdersPageReply struct { - List []*Order `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type StatusWeWorkReply struct { + Status string `json:"status"` } -type ExportOrdersRequest struct { - Name string `form:"name,optional"` - StartAt string `form:"startAt"` - EndAt string `form:"endAt"` - TypeIds []int `form:"typeIds,optional"` - StatusIds []int `form:"statusIds,optional"` +type Store struct { + Id int64 `json:"id,optional"` + Name string `json:"name"` + StoreUserId int64 `json:"storeUserId,optional"` + ContactNumber string `json:"contactNumber"` + Email string `json:"email,optional"` + Address string `json:"address"` + Description string `json:"description,optional"` + Longitude float32 `json:"longitude,optional"` + Latitude float32 `json:"latitude,optional"` + StartWork string `json:"startWork,optional"` + EndWork string `json:"endWork,optional"` + Artisans []*StoreArtisan `json:"artisans,optional"` + CreatedAt string `json:"createdAt,optional"` + CoverImageId int64 `json:"coverImageId,optional"` + CoverImage *MediaResource `json:"coverImage,optional"` + DetailImageIds []int64 `json:"detailImageIds,optional"` + DetailImages []*MediaResource `json:"detailImages,optional"` } -type ExportOrdersReply struct { - Content []byte `json:"content"` - FileName string `json:"fileName"` - FileSize int `json:"fileSize"` - FileType string `json:"fileType"` +type StoreArtisan struct { + UserId int64 `json:"userId,optional"` + Name string `json:"name,optional"` + Level int8 `json:"level,optional"` + Gender bool `json:"gender,optional"` + Birthday string `json:"birthday,optional"` + PhoneNumber string `json:"phoneNumber,optional"` + CoverURL string `json:"coverURL,optional"` + WorkNo string `json:"workNo,optional"` + Email string `json:"email,optional"` + Experience string `json:"experience,optional"` + Specialty string `json:"specialty,optional"` + Certificate string `json:"certificate,optional"` + Address string `json:"address,optional"` + ArtisanSpecific StoreArtisanSpecific `json:"artisanSpecific,optional"` } -type ImportOrdersRequest struct { - Content []byte `json:"content"` +type StoreArtisanSpecific struct { + ArtisanId int64 `json:"artisanId,optional"` } -type ImportOrdersReply struct { - Total int `json:"total"` - Failed int `json:"failed"` - Ignored int `json:"ignored"` - Success int `json:"success"` +type SyncMenusReply struct { + Success bool `json:"success,optional"` + Data interface{} `json:"data"` } -type CreateOrderRequest struct { - Order +type SyncMenusRequest struct { + OAMenu } -type CreateOrderReply struct { - OrderId int64 `json:"orderId,omitempty"` +type SyncUsersReply struct { + Status bool `json:"status"` } -type GetOrderRequest struct { - OrderId int64 `path:"id"` +type SyncUsersRequest struct { + Source string `json:"source"` + Target string `json:"target"` } -type GetOrderReply struct { - *Order +type SyncWeWorkOrganizationReply struct { + Status string `json:"status"` } -type PutOrderRequest struct { - OrderId int64 `path:"id"` - Order +type Tag struct { + Id int64 `json:"id,optional"` + PId int64 `json:"pId"` + Name string `json:"name"` + Sort int `json:"sort"` + ViceName string `json:"viceName"` + Description string `json:"description"` + CreatedAt string `json:"createdAt,optional"` + CoverImageId int64 `json:"coverImageId,optional"` + CoverImage *MediaResource `json:"coverImage,optional"` + Children []*Tag `json:"children,optional"` } -type PutOrderReply struct { - *Order +type TagFieldTag struct { + Name string `json:"name"` + Sort int `json:"sort,optional"` } -type PatchOrderRequest struct { - OrderId int64 `path:"id"` - Order +type TokenBalance struct { + Id int64 `json:"id,optional" desc:"代币ID"` + Balance float64 `json:"balance" desc:"代币余额"` + Usage float64 `json:"usage" desc:"使用代币"` + UnusedTicketsCount int64 `json:"unusedTicketsCount" desc:"可继续使用的ticket"` + ReservedToken float64 `json:"reservedToken" desc:"预扣代币"` } -type PatchOrderReply struct { - *Order +type UpdateCartItemQuantityReply struct { + *CartItem } -type DeleteOrderRequest struct { - OrderId int64 `path:"id"` +type UpdateCartItemQuantityRequest struct { + ItemId int64 `path:"itemId"` + Quantity int `json:"quantity"` } -type DeleteOrderReply struct { - OrderId int64 `path:"id"` +type UpdateCategoryReply struct { + Id int64 `json:"id"` } -type Logistics struct { - OrderId int64 `json:"orderId,optional"` - Status string `json:"status,optional"` - TrackingCode string `json:"trackingCode,optional"` - Carrier string `json:"carrier,optional"` - EstimatedDeliveryDate string `json:"estimatedDeliveryDate,optional"` - ActualDeliveryDate string `json:"actualDeliveryDate,optional"` +type UpdateCategoryRequest struct { + Id int64 `path:"id"` + Category } -type PaymentItem struct { - Id int64 `json:"id,optional"` - PaymentID int64 `json:"paymentID,optional"` - Quantity int `json:"quantity,optional"` - UnitPrice float64 `json:"unitPrice,optional"` - PaymentCustomerName string `json:"paymentCustomerName,optional"` - BankInformation string `json:"bankInformation,optional"` - BankResponseCode string `json:"bankResponseCode,optional"` - CarrierType string `json:"carrierType,optional"` - CreditCardNumber string `json:"creditCardNumber,optional"` - DeductMembershipId string `json:"deductMembershipId,optional"` - DeductionPoint int32 `json:"deductionPoint,optional"` - InvoiceCreateTime string `json:"invoiceCreateTime,optional"` - InvoiceNumber string `json:"invoiceNumber,optional"` - InvoiceTotalAmount float64 `json:"invoiceTotalAmount,optional"` - TaxIdNumber string `json:"taxIdNumber,optional"` +type UpdateContractWayReply struct { + ContractWayUpdated ContractWay `json:"contractWayUpdated"` } -type Payment struct { - Id int64 `json:"id,optional"` - OrderId int64 `json:"orderId,optional"` - PaymentDate string `json:"paymentDate,optional"` - PaymentType int `json:"paymentType,optional"` - PaidAmount float64 `json:"paidAmount,optional"` - PaymentNumber string `json:"paymentNumber,optional"` - ReferenceNumber string `json:"referenceNumber,optional"` - Status int `json:"status,optional"` - PaymentItems []*PaymentItem `json:"paymentItems,optional"` +type UpdateContractWayRequest struct { + Id int64 `path:"id"` + Type int `json:"type,optional"` + Scene int `json:"scene,optional"` + Style string `json:"style,optional"` + Remark string `json:"remark,optional"` + SkipVerify bool `json:"skipVerify,optional"` + State string `json:"state,optional"` + Users []string `json:"users,optional"` + Parties []int64 `json:"parties,optional"` + IsTemp bool `json:"isTemp,optional"` + ExpiresIn int `json:"expiresIn,optional"` + ChatExpiresIn int `json:"chatExpiresIn,optional"` + UnionId string `json:"unionId,optional"` + IsExclusive bool `json:"isExclusive,optional"` + Conclusions string `json:"conclusions,optional"` } -type ListPaymentsPageRequest struct { - PaymentType string `form:"paymentType,optional"` - Keys []string `form:"keys,optional"` - OrderBy string `form:"orderBy,optional"` - PageIndex int `form:"pageIndex,optional"` - PageSize int `form:"pageSize,optional"` +type UpdateCorpTagRequest struct { + TagId string `json:"tagId"` + Name string `json:"name"` + Sort int `json:"sort,optional"` + AgentId int64 `json:"agentId,optional"` } -type ListPaymentsPageReply struct { - List []*Payment `json:"list"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Total int64 `json:"total"` +type UpdateCustomerProfileReply struct { + *Customer } -type CreatePaymentRequest struct { - Payment +type UpdateCustomerProfileRequest struct { + CustomerId int64 `path:"id"` + Customer } -type CreatePaymentReply struct { - PaymentKey int64 `json:"id"` +type UpdateDictionaryItemReply struct { + *DictionaryItem } -type GetPaymentRequest struct { - PaymentId int64 `path:"id"` +type UpdateDictionaryItemRequest struct { + Key string `path:"key"` + Type string `path:"type"` + Name string `json:"name,optional"` + Value string `json:"value,optional"` + Sort int `json:"sort,optional"` + Description string `json:"description,optional"` } -type GetPaymentReply struct { - *Payment +type UpdateDictionaryTypeReply struct { + *DictionaryType } -type PutPaymentRequest struct { - PaymentId int64 `path:"id"` - Payment +type UpdateDictionaryTypeRequest struct { + Type string `path:"type"` + Name string `json:"name,optional"` + Description string `json:"description,optional"` } -type PutPaymentReply struct { - *Payment +type UpdateMGMRuleReply struct { + MGMRuleId int64 `json:"id"` } -type PatchPaymentRequest struct { - PaymentId int64 `path:"id"` - Payment +type UpdateMGMRuleRequest struct { + MGMRuleId int64 `path:"id"` + MGMRule } -type PatchPaymentReply struct { - *Payment +type UpdateMediaReply struct { + MediaId int64 `json:"id"` } -type DeletePaymentRequest struct { - PaymentId int64 `path:"id"` +type UpdateMediaRequest struct { + MediaId int64 `path:"id"` + Media } -type DeletePaymentReply struct { - PaymentId int64 `json:"id"` +type UpdateOpportunityReply struct { + *Opportunity } -type CreatePaymentFromOrderRequest struct { - OrderId int64 `json:"orderId"` - PaymentType int `json:"paymentType"` - Comment string `json:"comment,optional"` +type UpdateOpportunityRequest struct { + Id int64 `path:"id"` + Name string `json:"name,optional"` + Requirement string `json:"requirement,optional"` + CustomerId int64 `json:"customerId,optional"` + Probability float32 `json:"probability,optional"` + Source string `json:"source,optional,options=new_customer|old_customer_new_purchase|old_customer_repurchase|old_customer_upgrade"` + Type string `json:"type,optional,options=trial_requirement|requirement_match|detailed_requirement_analysis|solution_provided|quotation|negotiation|closed_unsuccessful|closed_successful"` + UserId int64 `json:"userId,optional"` + Stage string `json:"stage,optional"` + ClosedDate string `json:"closedDate,optional"` } -type CreatePaymentFromOrderRequestReply struct { - PaymentId int64 `json:"paymentId"` - Data interface{} `json:"data"` +type UpdatePaymentReply struct { + *Payment } type UpdatePaymentRequest struct { @@ -3535,119 +3382,152 @@ type UpdatePaymentRequest struct { Payment } -type UpdatePaymentReply struct { - *Payment +type UpdatePriceBookEntryReply struct { + Id int64 `json:"id"` } -type TokenBalance struct { - Id int64 `json:"id,optional" desc:"代币ID"` - Balance float64 `json:"balance" desc:"代币余额"` - Usage float64 `json:"usage" desc:"使用代币"` - UnusedTicketsCount int64 `json:"unusedTicketsCount" desc:"可继续使用的ticket"` - ReservedToken float64 `json:"reservedToken" desc:"预扣代币"` +type UpdatePriceBookEntryRequest struct { + Id int64 `path:"id"` + PriceBookEntry } -type GetCustomerBalanceReply struct { - *TokenBalance +type UpdateProductCategoryReply struct { + Id int64 `json:"id"` } -type CustomerLoginRequest struct { - Account string `json:"account"` - Password string `json:"password"` +type UpdateProductCategoryRequest struct { + Id int64 `path:"id"` + ProductCategory } -type CustomerRegisterRequest struct { - Account string `json:"account"` - Password string `json:"password"` - VerifyCode string `json:"verifyCode"` +type UpdateTagReply struct { + Id int64 `json:"id"` } -type CustomerRegisterReply struct { - CustomerId int64 `json:"customerId"` +type UpdateTagRequest struct { + Id int64 `path:"id"` + Tag } -type CustomerRegisterByPhoneRequest struct { - Phone string `json:"phone"` - Password string `json:"password"` - VerifyCode string `json:"verifyCode,optional"` +type UpdateUserReply struct { + *User } -type CustomerRegisterByPhoneInInviteCodeRequest struct { - *CustomerRegisterByPhoneRequest - InviteCode string `path:"code,optional"` +type UpdateUserRequest struct { + Id int64 `path:"id"` + Name string `json:"name,optional"` + NickName string `json:"nickName,optional"` + Desc string `json:"desc,optional"` + Email string `json:"email,optional"` + Avatar string `json:"avatar,optional"` + ExternalEmail string `json:"externalEmail,optional"` + MobilePhone string `json:"mobilePhone,optional"` + Gender string `json:"gender,optional,options=male|female|un_know"` + DepId int64 `json:"depId,optional"` + PositionId int64 `json:"positionId,optional"` + JobTitle string `json:"jobTitle,optional"` + Password string `json:"password,optional"` + Status string `json:"status,optional,options=enabled|disabled"` } -type CustomerRegisterByPhoneInRegisterCodeRequest struct { - *CustomerRegisterByPhoneRequest - RegisterCode string `path:"code,optional"` +type UpsertPriceBookReply struct { + *PriceBook } -type CustomerRegisterByPhoneReply struct { - CustomerId int64 `json:"customerId"` +type UpsertPriceBookRequest struct { + PriceBook +} + +type User struct { + Id int64 `json:"id"` + Account string `json:"account"` + Name string `json:"name"` + Email string `json:"email"` + MobilePhone string `json:"mobilePhone"` + Gender string `json:"gender"` + NickName string `json:"nickName,optional"` + Desc string `json:"desc,optional"` + Avatar string `json:"avatar,optional"` + ExternalEmail string `json:"externalEmail,optional"` + Roles []string `json:"roles"` + Department *UserDepartment `json:"department"` + Position *Position `json:"position"` + PositionId int64 `json:"positionId"` + JobTitle string `json:"jobTitle"` + IsEnabled bool `json:"isEnabled"` + CreatedAt string `json:"createdAt"` } -type UpdateCustomerProfileRequest struct { - CustomerId int64 `path:"id"` - Customer +type UserDepartment struct { + DepId int64 `json:"depId"` + DepName string `json:"depName"` } -type UpdateCustomerProfileReply struct { - *Customer +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 CustomerLoginAuthReply struct { - OpenId string `json:"openId"` - UnionId string `json:"unionId"` - PhoneNumber string `json:"phoneNumber"` - NickName string `json:"nickName"` - AvatarURL string `json:"avatarURL"` - Gender string `json:"gender"` - Token WebToken `json:"token"` +type UserQueryDepartmentOption struct { + DepartmentId int64 `json:"departmentId"` + DepartmentName string `json:"departmentName"` } -type WebToken struct { - TokenType string `json:"tokenType"` - ExpiresIn string `json:"expiresIn"` - AccessToken string `json:"accessToken"` - RefreshToken string `json:"refreshToken"` +type UserQueryRoleOption struct { + RoleCode string `json:"roleCode"` + RoleName string `json:"roleName"` } -type GetUserInfoReplyForWeb struct { - *Customer +type WeWorkAddMsgTemplateRequest struct { + ChatType string `json:"chatType,optional,options=single|group"` // 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群 + ExternalUserId []string `json:"externalUserId,optional"` // chat_type为single时有效,不可与sender同时为空 + Sender string `json:"sender,optional"` // 发送企业群发消息的成员userid,当类型为发送给客户群时必填 + Text *WeWorkTextOfMessage `json:"text"` + Attachments []Content `json:"attachments,optional"` + SendTime int64 `json:"sendTime,optional"` // 定时发送,不填默认立刻发送// 附件, 当前仅支持图片 } -type OACustomerLoginRequest struct { - Code string `json:"code"` +type WeWorkAddMsgTemplateResponse struct { + FailList []string `json:"failList"` + MsgId string `json:"msgId"` } -type OACustomerAuthRequest struct { - Code string `json:"code"` - IV string `json:"iv"` - EncryptedData string `json:"encryptedData"` +type WeWorkCustomerGroupRequest struct { + StatusFilter int `json:"statusFilter,optional"` // https://developer.work.weixin.qq.com/document/path/92120 + OwnerFilter OwnerFilter `json:"ownerFilter,optional"` + Cursor string `json:"cursor,optional"` + Limit int `json:"limit,optional"` } -type OACustomerLoginAuthReply struct { - OpenId string `json:"openId"` - UnionId string `json:"unionId"` - PhoneNumber string `json:"phoneNumber"` - NickName string `json:"nickName"` - AvatarURL string `json:"avatarURL"` - Gender string `json:"gender"` - Token OAToken `json:"token"` +type WeWorkCustomersRequest struct { + UserId string `json:"userId,optional"` //https://developer.work.weixin.qq.com/document/path/92113 + Name string `json:"name,optional"` + UnionId string `json:"unionId,optional"` + TagId string `json:"tagId,optional"` + Sync int `form:"sync,optional"` // 是否同步(所有客户列表生效,场景:前端复选框勾选后,请求数据都会自动同步) + PageIndex int `form:"pageIndex,optional"` + PageSize int `form:"pageSize,optional"` } -type OAToken struct { - TokenType string `json:"tokenType"` - ExpiresIn string `json:"expiresIn"` - AccessToken string `json:"accessToken"` - RefreshToken string `json:"refreshToken"` +type WeWorkDepartment struct { + WeWorkDepId int `json:"weWorkDepId"` + Name string `json:"name"` + NameEn string `json:"nameEn"` + WeWorkParentId int `json:"weWorkParentId"` + Order int `json:"order"` + DepartmentLeader []string `json:"departmentLeader"` + RefDepartmentId int64 `json:"refDepartmentId"` } -type ActionQrcodeActiveReply struct { - Status string `json:"status"` +type WeWorkListCustomerGroupReply struct { + List []WechatCustomerGroup `json:"list"` //https://developer.work.weixin.qq.com/document/path/92122 } -type SceneQrcodeActiveReply struct { +type WeWorkQrcodeActive struct { QId string `json:"qid"` // 唯一码 Name string `json:"name"` // 活码名称 Desc string `json:"desc"` // 描述 @@ -3658,66 +3538,144 @@ type SceneQrcodeActiveReply struct { SceneLink string `json:"sceneLink"` // 场景落地页 SafeThresholdValue int `json:"safeThresholdValue"` // 安全阈值(默认:0) ExpiryDate int64 `json:"expiryDate"` // 有效期截止日 + ExpiryState int `json:"expiryState"` // 是否过期 State int `json:"state"` // 状态1:启用 2:禁用 3:删除 ActiveQrcodeLink string `json:"activeQrcodeLink"` // 群活码图片地址(可以载入任意媒资文章) CPA int `json:"cpa"` // 活码打开次数 } -type SceneRequest struct { - Qid string `path:"qid"` // 唯一标识 +type WeWorkTag struct { + Type int `json:"type,omitempty"` + IsSelf int `json:"isSelf"` //1:自建 + TagId string `json:"tagId"` + GroupId string `json:"groupId,omitempty"` + GroupName string `json:"groupName,omitempty"` + Name string `json:"name"` + Sort int `json:"sort"` } -type Route struct { - Method string `json:"method"` - Path string `json:"path"` +type WeWorkTagGroup struct { + GroupId string `json:"groupId"` + GroupName string `json:"groupName"` } -type RegisterPluginRequest struct { - Name string `json:"name"` - Routes []Route `json:"routes"` - Addr string `json:"addr"` +type WeWorkTextOfMessage struct { + Content string `json:"content"` // "内容" } -type RegisterPluginReply struct { - Name string `json:"name"` - Etc map[string]interface{} `json:"etc"` +type WebToken struct { + TokenType string `json:"tokenType"` + ExpiresIn string `json:"expiresIn"` + AccessToken string `json:"accessToken"` + RefreshToken string `json:"refreshToken"` } -type PluginWebRouteMeta struct { - Locale string `json:"locale"` - Icon string `json:"icon"` - RequestAuth bool `json:"requestAuth"` +type WechatCustomer struct { + ExternalContact WechatCustomersWithExternalContactExternalProfile `json:"externalContact"` + FollowUser *WechatCustomersWithFollowUser `json:"followUser,omitempty"` + NextCursor string `json:"nextCursor,omitempty"` } -type PluginWebRoutes struct { - Name string `json:"name"` - Path string `json:"path"` - Meta PluginWebRouteMeta `json:"meta"` - Children []PluginWebRoutes `json:"children"` +type WechatCustomerGroup struct { + ChatId string `json:"chatId"` + Name string `json:"name"` + Owner string `json:"owner"` + CreateTime int `json:"createTime"` + Notice string `json:"notice"` + MemberList []*WechatCustomerGroupMemberList `json:"memberList"` + AdminList []*WechatCustomerGroupAdminList `json:"adminList"` } -type ListPluginRequest struct { - Socpe []string `form:"scope"` +type WechatCustomerGroupAdminList struct { + UserId string `json:"userId"` } -type PluginWebInfo struct { - Name string `json:"name"` - Desc string `json:"desc"` - Verison string `json:"version"` - IsEnabled bool `json:"isEnabled"` - Routes []Route `json:"routes"` +type WechatCustomerGroupMemberList struct { + UserId string `json:"userId"` + Type int `json:"type"` + JoinTime int `json:"joinTime"` + JoinScene int `json:"joinScene"` + Invitor WechatCustomerGroupMemberListInvitor `json:"invitor"` + GroupNickname string `json:"groupNickname"` + Name string `json:"name"` + UnionId string `json:"unionId,omitempty"` } -type ListPluginReply struct { - Plugins []PluginWebInfo `json:"plugins"` +type WechatCustomerGroupMemberListInvitor struct { + UserId string `json:"userId"` } -type ListPluginFrontendRoutesReply struct { - Routes []PluginWebRoutes `json:"routes"` +type WechatCustomersFollowUserWithTags struct { + GroupName string `json:"groupName"` + TagName string `json:"tagName"` + TagId string `json:"tagId,omitempty"` + Type int `json:"type"` } -type HealthCheckRequest struct { +type WechatCustomersFollowUserWithWechatChannels struct { + Nickname string `json:"nickname"` + Source int `json:"source"` } -type HealthCheckReply struct { +type WechatCustomersWithExternalContactExternalProfile struct { + ExternalUserId string `json:"externalUserId"` + Name string `json:"name"` + Position string `json:"position"` + Avatar string `json:"avatar"` + CorpName string `json:"corpName"` + CorpFullName string `json:"corpFullName"` + Type int `json:"type"` + Gender int `json:"gender"` + UnionId string `json:"unionId"` + UserId string `json:"userId"` + ExternalProfile ExternalContactExternalProfileWithExternalProfile `json:"externalProfile"` +} + +type WechatCustomersWithFollowUser struct { + UserId string `json:"userId"` + Remark string `json:"remark"` + Description string `json:"description"` + Createtime int `json:"createtime"` + Tags []WechatCustomersFollowUserWithTags `json:"tags"` + TagIds []string `json:"tagIds"` + WechatChannels WechatCustomersFollowUserWithWechatChannels `json:"wechatChannels"` + RemarkCorpName string `json:"remarkCorpName,omitempty"` + RemarkMobiles []string `json:"remarkMobiles,omitempty"` + OpenUserId string `json:"openUserId"` + AddWay int `json:"addWay"` + State string `json:"state,omitempty"` +} + +type WechatListCustomersReply struct { + List []*WechatCustomer `json:"list"` + PageIndex int `json:"pageIndex"` + PageSize int `json:"pageSize"` + Total int64 `json:"total"` +} + +type WechatSyncCustomerReply struct { + Status string `json:"status"` +} + +type WechatUser struct { + WeWorkUserId string `json:"weWorkUserId"` + Name string `json:"name"` + Position string `json:"position"` + Mobile string `gorm:"unique"` + Gender string `json:"gender"` + Email string `gorm:"unique"` + BizMail string `json:"bizMail"` + Avatar string `json:"avatar"` + ThumbAvatar string `json:"thumbAvatar"` + Telephone string `json:"telephone"` + Alias string `json:"alias"` + Address string `json:"address"` + OpenUserId string `json:"openUserId"` + WeWorkMainDepartmentId int `json:"weWorkMainDepartmentId"` + Status int `json:"status"` + QrCode string `json:"qrCode"` +} + +type WeworkUser struct { + Userid string `json:"userId"` } diff --git a/internal/uc/openapi.go b/internal/uc/openapi.go new file mode 100644 index 00000000..da2644ba --- /dev/null +++ b/internal/uc/openapi.go @@ -0,0 +1,47 @@ +package uc + +import ( + "PowerX/internal/config" + "PowerX/internal/uc/openapi" + "github.com/pkg/errors" + "github.com/zeromicro/go-zero/core/stores/redis" + "gorm.io/driver/postgres" + "gorm.io/gorm" +) + +type OpenAPIUseCase struct { + db *gorm.DB + redis *redis.Redis + + Auth openapi.AuthorizationOpenAPIPlatformUseCase +} + +func NewOpenAPIUseCase(conf *config.Config, pxUseCase *PowerXUseCase) (uc *OpenAPIUseCase, clean func()) { + + db, err := gorm.Open(postgres.Open(conf.PowerXDatabase.DSN), &gorm.Config{ + //Logger: logger.Default.LogMode(logger.Info), + DisableForeignKeyConstraintWhenMigrating: true, + }) + if err != nil { + panic(errors.Wrap(err, "connect database failed")) + } + sqlDB, err := db.DB() + if err != nil { + panic(errors.Wrap(err, "get sql db failed")) + } + err = sqlDB.Ping() + if err != nil { + panic(errors.Wrap(err, "ping database failed")) + } + + uc = &OpenAPIUseCase{ + db: db, + redis: redis.New(conf.RedisBase.Host, func(r *redis.Redis) { + r.Pass = conf.RedisBase.Password + }), + } + + return uc, func() { + _ = sqlDB.Close() + } +} diff --git a/internal/uc/openapi/auth.go b/internal/uc/openapi/auth.go new file mode 100644 index 00000000..2ae1de80 --- /dev/null +++ b/internal/uc/openapi/auth.go @@ -0,0 +1,68 @@ +package openapi + +import ( + "github.com/golang-jwt/jwt/v4" + "github.com/pkg/errors" + "golang.org/x/oauth2" + "gorm.io/gorm" + "time" +) + +const OpenAPITokenExpiredDuration = 60 * 60 * 24 * 3 * time.Second +const OpenAPIAccessTokenType = "Bearer" + +const AuthPlatformKey = "AuthPlatform" +const AuthPlatformIdKey = "PlatformId" + +type OpenAPIJWTToken struct { + AccessToken string `json:"AccessToken"` + PlatformId string `json:"PlatformId"` + Name string `json:"Name,omitempty"` + Exp int64 `json:"exp"` + jwt.RegisteredClaims +} + +type AuthorizationOpenAPIPlatformUseCase struct { + db *gorm.DB +} + +func NewAuthorizationOpenAPIPlatformUseCase(db *gorm.DB) *AuthorizationOpenAPIPlatformUseCase { + return &AuthorizationOpenAPIPlatformUseCase{ + db: db, + } +} + +func (uc *AuthorizationOpenAPIPlatformUseCase) SignPlatformToken(platformKey string, jwtSecret string) oauth2.Token { + now := time.Now() + expiresAt := now.Add(OpenAPITokenExpiredDuration) + + token := jwt.NewWithClaims(jwt.SigningMethodHS256, OpenAPIJWTToken{ + AccessToken: "bar", + PlatformId: platformKey, + Name: platformKey, + Exp: expiresAt.Unix(), + RegisteredClaims: jwt.RegisteredClaims{ + Issuer: "powerx", + Subject: platformKey, + ExpiresAt: jwt.NewNumericDate(expiresAt), + IssuedAt: jwt.NewNumericDate(now), + }, + }) + + return uc.SignToken(token, jwtSecret, expiresAt) +} + +func (uc *AuthorizationOpenAPIPlatformUseCase) SignToken(token *jwt.Token, jwtSecret string, expiresAt time.Time) oauth2.Token { + + signedToken, err := token.SignedString([]byte(jwtSecret)) + if err != nil { + panic(errors.Wrap(err, "sign token failed")) + } + + return oauth2.Token{ + AccessToken: signedToken, + TokenType: OpenAPIAccessTokenType, + RefreshToken: "", + Expiry: expiresAt, + } +} diff --git a/internal/uc/powerx.go b/internal/uc/powerx.go index 8cc4576f..f67a385f 100644 --- a/internal/uc/powerx.go +++ b/internal/uc/powerx.go @@ -162,7 +162,8 @@ func NewPowerXUseCase(conf *config.Config) (uc *PowerXUseCase, clean func()) { // 加载SCRM UseCase c := cron.New() uc.SCRM = scrm.NewSCRMUseCase(db, conf, c, uc.redis) - uc.SCRM.Schedule() + // 定时检查 + //uc.SCRM.Schedule() // 加载Scene uc.Scene = scrm.NewSceneUseCase(db, uc.redis) diff --git a/internal/uc/powerx/crm/customerdomain/authorizationcustomer.go b/internal/uc/powerx/crm/customerdomain/authorizationcustomer.go index 797f1b57..718f924e 100644 --- a/internal/uc/powerx/crm/customerdomain/authorizationcustomer.go +++ b/internal/uc/powerx/crm/customerdomain/authorizationcustomer.go @@ -14,7 +14,7 @@ import ( const CustomerTokenExpiredDuration = 60 * 60 * 24 * 3 * time.Second const CustomerAccessTokenType = "Bearer" -const AuthCustomerCustomerId = "CustomerId" +const AuthCustomerIdKey = "CustomerId" const AuthCustomerOpenIdKey = "OpenId" const AuthCustomerKey = "AuthCustomer"