diff --git a/.github/workflows/go-build.yml b/.github/workflows/go-build.yml
index 39aca08f..30276f65 100644
--- a/.github/workflows/go-build.yml
+++ b/.github/workflows/go-build.yml
@@ -5,12 +5,12 @@ jobs:
build-go:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v4
- name: Set up Go
- uses: actions/setup-go@v1
+ uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Build
- run: cd cmd/server && go build
+ run: go build cmd/server/powerx.go
diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml
index e5d52551..f1b316a7 100644
--- a/.github/workflows/go-test.yml
+++ b/.github/workflows/go-test.yml
@@ -7,10 +7,10 @@ jobs:
env:
API_V3_KEY: ${{ secrets.API_V3_KEY }}
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v4
- name: Set up Go
- uses: actions/setup-go@v1
+ uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Test
- run: cd cmd/server && go test
+ run: go test cmd/server/powerx.go
diff --git a/.gitignore b/.gitignore
index 18a78762..c78c264e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,4 +22,4 @@ powerx
!internal/uc/powerx
!cmd/server/powerx.go
/plugins
-wechat
\ No newline at end of file
+./wechat
\ No newline at end of file
diff --git a/api.csv b/api.csv
new file mode 100644
index 00000000..19bf74c6
--- /dev/null
+++ b/api.csv
@@ -0,0 +1,1640 @@
+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/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/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/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/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/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/token,/api/v1/mp/trade/token/balance,get,查询代币
+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,获取场景落地页详情
+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/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/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/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/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/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/token,/api/v1/mp/trade/token/balance,get,查询代币
+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,获取场景落地页详情
+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/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/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/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/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/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/token,/api/v1/mp/trade/token/balance,get,查询代币
+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,获取场景落地页详情
+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/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/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/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/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/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/token,/api/v1/mp/trade/token/balance,get,查询代币
+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,获取场景落地页详情
+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/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/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/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/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/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/token,/api/v1/mp/trade/token/balance,get,查询代币
+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.api b/api/admin.api
index 1595ad16..e2f719e1 100644
--- a/api/admin.api
+++ b/api/admin.api
@@ -1,7 +1,7 @@
import "admin/common.api"
import "admin/department.api"
import "admin/position.api"
-import "admin/employee.api"
+import "admin/user.api"
import "admin/permission.api"
import "admin/auth.api"
import "admin/dictionary.api"
diff --git a/api/admin.scrm.api b/api/admin.scrm.api
index a27f05f8..6d471ae1 100644
--- a/api/admin.scrm.api
+++ b/api/admin.scrm.api
@@ -2,7 +2,7 @@ import "admin/scrm/contactway.api"
//import "admin/scrm/customer.api"
//import "admin/scrm/contact.api"
// organzation
-import "admin/scrm/organization/weworkemployee.api"
+import "admin/scrm/organization/weworkuser.api"
import "admin/scrm/organization/weworkdepartment.api"
// app
import "admin/scrm/app/weworkgroup.api"
diff --git a/api/admin/common.api b/api/admin/common.api
index 8bdf6db4..bc1bb382 100644
--- a/api/admin/common.api
+++ b/api/admin/common.api
@@ -11,17 +11,17 @@ info(
@server(
group: admin/common
prefix: /api/v1/admin/common
- middleware: EmployeeNoPermJWTAuth
+ middleware: UserNoPermJWTAuth
)
service PowerX {
@doc "员工Options远程搜索"
- @handler GetEmployeeOptions
- get /options/employees (GetEmployeeOptionsRequest) returns (GetEmployeeOptionsReply)
+ @handler GetUserOptions
+ get /options/users (GetUserOptionsRequest) returns (GetUserOptionsReply)
@doc "查询员工过滤条件"
- @handler GetEmployeeQueryOptions
- get /options/employee-query returns (GetEmployeeQueryOptionsReply)
+ @handler GetUserQueryOptions
+ get /options/user-query returns (GetUserQueryOptionsReply)
@doc "部门Options远程搜索"
@handler GetDepartmentOptions
@@ -33,7 +33,7 @@ service PowerX {
}
type (
- GetEmployeeOptionsRequest struct {
+ GetUserOptionsRequest {
LikeName string `form:"likeName,optional"`
LikeEmail string `form:"likeEmail,optional"`
LikePhoneNumber string `form:"likePhoneNumber,optional"`
@@ -41,7 +41,7 @@ type (
PageSize int `form:"pageSize,optional"`
}
- EmployeeOption struct {
+ UserOption {
Id int64 `json:"id"`
Avatar string `json:"avatar"`
Account string `json:"account"`
@@ -50,8 +50,8 @@ type (
PhoneNumber string `json:"phoneNumber"`
}
- GetEmployeeOptionsReply struct {
- List []EmployeeOption `json:"list"`
+ GetUserOptionsReply {
+ List []UserOption `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Total int64 `json:"total"`
@@ -59,36 +59,36 @@ type (
)
type (
- EmployeeQueryRoleOption {
+ UserQueryRoleOption {
RoleCode string `json:"roleCode"`
RoleName string `json:"roleName"`
}
- EmployeeQueryDepartmentOption {
+ UserQueryDepartmentOption {
DepartmentId int64 `json:"departmentId"`
DepartmentName string `json:"departmentName"`
}
- GetEmployeeQueryOptionsReply {
- Roles []EmployeeQueryRoleOption `json:"roles"`
- Departments []EmployeeQueryDepartmentOption `json:"departments"`
+ GetUserQueryOptionsReply {
+ Roles []UserQueryRoleOption `json:"roles"`
+ Departments []UserQueryDepartmentOption `json:"departments"`
}
)
type (
- GetDepartmentOptionsRequest struct {
+ GetDepartmentOptionsRequest {
Ids []int64 `form:"ids,optional"`
LikeName string `form:"likeName,optional"`
PageIndex int `form:"pageIndex,optional"`
PageSize int `form:"pageSize,optional"`
}
- DepartmentOption struct {
+ DepartmentOption {
Id int64 `json:"id"`
Name string `json:"name"`
}
- GetDepartmentOptionsReply struct {
+ GetDepartmentOptionsReply {
List []DepartmentOption `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -97,12 +97,12 @@ type (
)
type (
- GetOptionsRequest struct {
+ GetOptionsRequest {
Type string `form:"type,optional"`
Search string `form:"search,optional"`
}
- GetOptionsReply struct {
+ GetOptionsReply {
Options []map[string]interface{} `json:"options"`
}
)
diff --git a/api/admin/crm/business/opportunity.api b/api/admin/crm/business/opportunity.api
index 2ebd79f8..3fc35449 100644
--- a/api/admin/crm/business/opportunity.api
+++ b/api/admin/crm/business/opportunity.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/crm/business/opportunity
prefix: /api/v1/admin/business
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -24,8 +24,8 @@ service PowerX {
post /opportunities (CreateOpportunityRequest) returns (CreateOpportunityReply)
@doc "为商机分配员工"
- @handler AssignEmployeeToOpportunity
- put /opportunities/:id/assign-employee (AssignEmployeeToOpportunityRequest) returns (AssignEmployeeToOpportunityReply)
+ @handler AssignUserToOpportunity
+ put /opportunities/:id/assign-user (AssignUserToOpportunityRequest) returns (AssignUserToOpportunityReply)
@doc "修改商机信息"
@handler UpdateOpportunity
@@ -37,7 +37,7 @@ service PowerX {
}
type (
- GetOpportunityListRequest struct {
+ GetOpportunityListRequest {
Name string `form:"name,optional"`
Source string `form:"source,optional"`
Type string `form:"type,optional"`
@@ -47,7 +47,7 @@ type (
PageSize int `form:"pageSize,optional"`
}
- Opportunity struct {
+ Opportunity {
Id int64 `json:"id"`
Name string `json:"name"`
Requirement string `json:"requirement"`
@@ -55,14 +55,14 @@ type (
Probability float32 `json:"probability"`
Source string `json:"source"`
Type string `json:"type"`
- EmployeeId int64 `json:"employeeId"`
+ UserId int64 `json:"userId"`
Stage string `json:"stage"`
ClosedDate string `json:"closedDate"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
- GetOpportunityListReply struct {
+ GetOpportunityListReply {
List []Opportunity `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -71,35 +71,35 @@ type (
)
type (
- CreateOpportunityRequest struct {
+ CreateOpportunityRequest {
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"`
- EmployeeId int64 `json:"employeeId"`
+ UserId int64 `json:"userId"`
Stage string `json:"stage"`
}
- CreateOpportunityReply struct {
+ CreateOpportunityReply {
Id int64 `json:"id"`
}
)
type (
- AssignEmployeeToOpportunityRequest struct {
+ AssignUserToOpportunityRequest {
Id int64 `path:"id"`
- EmployeeId int64 `json:"employeeId"`
+ UserId int64 `json:"userId"`
}
- AssignEmployeeToOpportunityReply struct {
+ AssignUserToOpportunityReply {
Id int64 `json:"id"`
}
)
type (
- UpdateOpportunityRequest struct {
+ UpdateOpportunityRequest {
Id int64 `path:"id"`
Name string `json:"name,optional"`
Requirement string `json:"requirement,optional"`
@@ -107,22 +107,22 @@ type (
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"`
- EmployeeId int64 `json:"employeeId,optional"`
+ UserId int64 `json:"userId,optional"`
Stage string `json:"stage,optional"`
ClosedDate string `json:"closedDate,optional"`
}
- UpdateOpportunityReply struct {
+ UpdateOpportunityReply {
*Opportunity
}
)
type (
- DeleteOpportunityRequest struct {
+ DeleteOpportunityRequest {
Id int64 `path:"id"`
}
- DeleteOpportunityReply struct {
+ DeleteOpportunityReply {
Id int64 `json:"id"`
}
)
\ No newline at end of file
diff --git a/api/admin/crm/customerdomain/customer.api b/api/admin/crm/customerdomain/customer.api
index 208bb986..7c940645 100644
--- a/api/admin/crm/customerdomain/customer.api
+++ b/api/admin/crm/customerdomain/customer.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/crm/customerdomain/customer
prefix: /api/v1/admin/customerdomain
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -40,8 +40,8 @@ service PowerX {
delete /customers/:id (DeleteCustomerRequest) returns (DeleteCustomerReply)
@doc "为客户分配员工"
- @handler AssignCustomerToEmployee
- post /customers/:id/actions/employees (AssignCustomerToEmployeeRequest) returns (AssignCustomerToEmployeeReply)
+ @handler AssignCustomerToUser
+ post /customers/:id/actions/users (AssignCustomerToUserRequest) returns (AssignCustomerToUserReply)
}
type (
@@ -153,12 +153,12 @@ type (
)
type (
- AssignCustomerToEmployeeRequest {
+ AssignCustomerToUserRequest {
Id string `path:"id"`
- EmployeeId int64 `json:"employeeId"`
+ UserId int64 `json:"userId"`
}
- AssignCustomerToEmployeeReply {
+ AssignCustomerToUserReply {
CustomerId int64 `json:"customerId"`
}
)
\ No newline at end of file
diff --git a/api/admin/crm/customerdomain/lead.api b/api/admin/crm/customerdomain/lead.api
index c786c8d6..9f3f6b97 100644
--- a/api/admin/crm/customerdomain/lead.api
+++ b/api/admin/crm/customerdomain/lead.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/crm/customerdomain/leader
prefix: /api/v1/admin/customerdomain
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -40,8 +40,8 @@ service PowerX {
delete /leads/:id (DeleteLeadRequest) returns (DeleteLeadReply)
@doc "为线索分配员工"
- @handler AssignLeadToEmployee
- post /leads/:id/actions/employees (AssignLeadToEmployeeRequest) returns (AssignLeadToEmployeeReply)
+ @handler AssignLeadToUser
+ post /leads/:id/actions/users (AssignLeadToUserRequest) returns (AssignLeadToUserReply)
}
type (
@@ -151,12 +151,12 @@ type (
)
type (
- AssignLeadToEmployeeRequest {
+ AssignLeadToUserRequest {
Id string `path:"id"`
- EmployeeId int64 `json:"employeeId"`
+ UserId int64 `json:"userId"`
}
- AssignLeadToEmployeeReply {
+ AssignLeadToUserReply {
LeadId int64 `json:"leadId"`
}
)
\ No newline at end of file
diff --git a/api/admin/crm/customerdomain/registercode.api b/api/admin/crm/customerdomain/registercode.api
index abde10ff..7c307310 100644
--- a/api/admin/crm/customerdomain/registercode.api
+++ b/api/admin/crm/customerdomain/registercode.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/crm/customerdomain/registercode
prefix: /api/v1/admin/customerdomain
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -142,12 +142,12 @@ type (
)
type (
- AssignRegisterCodeToEmployeeRequest {
+ AssignRegisterCodeToUserRequest {
Id string `path:"id"`
- EmployeeId int64 `json:"employeeId"`
+ UserId int64 `json:"userId"`
}
- AssignRegisterCodeToEmployeeReply {
+ AssignRegisterCodeToUserReply {
RegisterCodeId int64 `json:"customerId"`
}
)
\ No newline at end of file
diff --git a/api/admin/crm/market/brandstory.api b/api/admin/crm/market/brandstory.api
index 3b0fbd8c..a1ea937a 100644
--- a/api/admin/crm/market/brandstory.api
+++ b/api/admin/crm/market/brandstory.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/crm/market/brandstory
prefix: /api/v1/admin/market
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -50,7 +50,7 @@ type (
StoreArtisan {
- EmployeeId int64 `json:"employeeId,optional"`
+ UserId int64 `json:"userId,optional"`
Name string `json:"name,optional"`
Level int8 `json:"level,optional"`
Gender bool `json:"gender,optional"`
@@ -69,7 +69,7 @@ type (
Store {
Id int64 `json:"id,optional"`
Name string `json:"name"`
- StoreEmployeeId int64 `json:"storeEmployeeId,optional"`
+ StoreUserId int64 `json:"storeUserId,optional"`
ContactNumber string `json:"contactNumber"`
Email string `json:"email,optional"`
Address string `json:"address"`
@@ -88,7 +88,7 @@ type (
}
)
type (
- ListStoresPageRequest struct {
+ ListStoresPageRequest {
Ids []int64 `form:"ids,optional"`
LikeName string `form:"likeName,optional"`
OrderBy string `form:"orderBy,optional"`
@@ -97,7 +97,7 @@ type (
}
- ListStoresPageReply struct {
+ ListStoresPageReply {
List []*Store `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -106,44 +106,44 @@ type (
)
type (
- CreateStoreRequest struct {
+ CreateStoreRequest {
Store
}
- CreateStoreReply struct {
+ CreateStoreReply {
StoreId int64 `json:"id"`
}
)
type (
- GetStoreRequest struct {
+ GetStoreRequest {
StoreId int64 `path:"id"`
}
- GetStoreReply struct {
+ GetStoreReply {
*Store
}
)
type (
- PutStoreRequest struct {
+ PutStoreRequest {
StoreId int64 `path:"id"`
Store
}
- PutStoreReply struct {
+ PutStoreReply {
*Store
}
)
type (
- DeleteStoreRequest struct {
+ DeleteStoreRequest {
StoreId int64 `path:"id"`
}
- DeleteStoreReply struct {
+ DeleteStoreReply {
StoreId int64 `json:"id"`
}
)
@@ -152,7 +152,7 @@ type (
type (
AssignStoreManagerRequest {
Id int64 `path:"id"`
- EmployeeId int64 `json:"employeeId"`
+ UserId int64 `json:"userId"`
}
AssignStoreManagerReply {
diff --git a/api/admin/crm/market/media.api b/api/admin/crm/market/media.api
index 459130ca..1f6c4736 100644
--- a/api/admin/crm/market/media.api
+++ b/api/admin/crm/market/media.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/crm/market/media
prefix: /api/v1/admin/market
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -36,7 +36,7 @@ service PowerX {
}
type (
- ListMediasPageRequest struct {
+ ListMediasPageRequest {
MediaTypes []int8 `form:"mediaTypes,optional"`
Keys []string `form:"keys,optional"`
OrderBy string `form:"orderBy,optional"`
@@ -44,7 +44,7 @@ type (
PageSize int `form:"pageSize,optional"`
}
- Media struct {
+ Media {
Id int64 `json:"id,optional"`
Title string `json:"title,optional"`
@@ -60,7 +60,7 @@ type (
DetailImages []*MediaResource `json:"detailImages,optional"`
}
- ListMediasPageReply struct {
+ ListMediasPageReply {
List []*Media `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -69,42 +69,42 @@ type (
)
type (
- CreateMediaRequest struct {
+ CreateMediaRequest {
Media
}
- CreateMediaReply struct {
+ CreateMediaReply {
MediaId int64 `json:"id"`
}
)
type (
- UpdateMediaRequest struct {
+ UpdateMediaRequest {
MediaId int64 `path:"id"`
Media
}
- UpdateMediaReply struct {
+ UpdateMediaReply {
MediaId int64 `json:"id"`
}
)
type (
- GetMediaRequest struct {
+ GetMediaRequest {
MediaId int64 `path:"id"`
}
- GetMediaReply struct {
+ GetMediaReply {
*Media
}
)
type (
- DeleteMediaRequest struct {
+ DeleteMediaRequest {
MediaId int64 `path:"id"`
}
- DeleteMediaReply struct {
+ DeleteMediaReply {
MediaId int64 `json:"id"`
}
)
diff --git a/api/admin/crm/market/mgm.api b/api/admin/crm/market/mgm.api
index ed6de03e..b5dd82ec 100644
--- a/api/admin/crm/market/mgm.api
+++ b/api/admin/crm/market/mgm.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/crm/market/mgm
prefix: /api/v1/admin/market
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -36,7 +36,7 @@ service PowerX {
}
type (
- ListMGMRulesPageRequest struct {
+ ListMGMRulesPageRequest {
MGMRuleTypes []int8 `form:"mgmTypes,optional"`
Keys []string `form:"keys,optional"`
OrderBy string `form:"orderBy,optional"`
@@ -44,7 +44,7 @@ type (
PageSize int `form:"pageSize,optional"`
}
- MGMRule struct {
+ MGMRule {
Id int64 `json:"id,optional"`
Name string `json:"name,optional"`
@@ -54,7 +54,7 @@ type (
Description string `json:"description,optional"`
}
- ListMGMRulesPageReply struct {
+ ListMGMRulesPageReply {
List []*MGMRule `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -63,42 +63,42 @@ type (
)
type (
- CreateMGMRuleRequest struct {
+ CreateMGMRuleRequest {
MGMRule
}
- CreateMGMRuleReply struct {
+ CreateMGMRuleReply {
MGMRuleId int64 `json:"id"`
}
)
type (
- UpdateMGMRuleRequest struct {
+ UpdateMGMRuleRequest {
MGMRuleId int64 `path:"id"`
MGMRule
}
- UpdateMGMRuleReply struct {
+ UpdateMGMRuleReply {
MGMRuleId int64 `json:"id"`
}
)
type (
- GetMGMRuleRequest struct {
+ GetMGMRuleRequest {
MGMRuleId int64 `path:"id"`
}
- GetMGMRuleReply struct {
+ GetMGMRuleReply {
*MGMRule
}
)
type (
- DeleteMGMRuleRequest struct {
+ DeleteMGMRuleRequest {
MGMRuleId int64 `path:"id"`
}
- DeleteMGMRuleReply struct {
+ DeleteMGMRuleReply {
MGMRuleId int64 `json:"id"`
}
)
diff --git a/api/admin/crm/market/store.api b/api/admin/crm/market/store.api
index dc94db7d..fd937d57 100644
--- a/api/admin/crm/market/store.api
+++ b/api/admin/crm/market/store.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/crm/market/store
prefix: /api/v1/admin/market
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -50,7 +50,7 @@ type (
}
StoreArtisan {
- EmployeeId int64 `json:"employeeId,optional"`
+ UserId int64 `json:"userId,optional"`
Name string `json:"name,optional"`
Level int8 `json:"level,optional"`
Gender bool `json:"gender,optional"`
@@ -69,7 +69,7 @@ type (
Store {
Id int64 `json:"id,optional"`
Name string `json:"name"`
- StoreEmployeeId int64 `json:"storeEmployeeId,optional"`
+ StoreUserId int64 `json:"storeUserId,optional"`
ContactNumber string `json:"contactNumber"`
Email string `json:"email,optional"`
Address string `json:"address"`
@@ -88,7 +88,7 @@ type (
}
)
type (
- ListStoresPageRequest struct {
+ ListStoresPageRequest {
Ids []int64 `form:"ids,optional"`
LikeName string `form:"likeName,optional"`
OrderBy string `form:"orderBy,optional"`
@@ -97,7 +97,7 @@ type (
}
- ListStoresPageReply struct {
+ ListStoresPageReply {
List []*Store `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -106,44 +106,44 @@ type (
)
type (
- CreateStoreRequest struct {
+ CreateStoreRequest {
Store
}
- CreateStoreReply struct {
+ CreateStoreReply {
StoreId int64 `json:"id"`
}
)
type (
- GetStoreRequest struct {
+ GetStoreRequest {
StoreId int64 `path:"id"`
}
- GetStoreReply struct {
+ GetStoreReply {
*Store
}
)
type (
- PutStoreRequest struct {
+ PutStoreRequest {
StoreId int64 `path:"id"`
Store
}
- PutStoreReply struct {
+ PutStoreReply {
*Store
}
)
type (
- DeleteStoreRequest struct {
+ DeleteStoreRequest {
StoreId int64 `path:"id"`
}
- DeleteStoreReply struct {
+ DeleteStoreReply {
StoreId int64 `json:"id"`
}
)
@@ -152,7 +152,7 @@ type (
type (
AssignStoreManagerRequest {
Id int64 `path:"id"`
- EmployeeId int64 `json:"employeeId"`
+ UserId int64 `json:"userId"`
}
AssignStoreManagerReply {
diff --git a/api/admin/crm/membership/membership.api b/api/admin/crm/membership/membership.api
index 47552eef..e313a892 100644
--- a/api/admin/crm/membership/membership.api
+++ b/api/admin/crm/membership/membership.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/crm/membership
prefix: /api/v1/admin/membership
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
diff --git a/api/admin/crm/product/artisan.api b/api/admin/crm/product/artisan.api
index a0412375..818ac58f 100644
--- a/api/admin/crm/product/artisan.api
+++ b/api/admin/crm/product/artisan.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/crm/product/artisan
prefix: /api/v1/admin/product
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -50,7 +50,7 @@ type (
Artisan {
Id int64 `json:"id,optional"`
- EmployeeId int64 `json:"employeeId,optional"`
+ UserId int64 `json:"userId,optional"`
Name string `json:"name,optional"`
Level int8 `json:"level"`
Gender bool `json:"gender,optional"`
@@ -72,7 +72,7 @@ type (
}
)
type (
- ListArtisansPageRequest struct {
+ ListArtisansPageRequest {
Ids []int64 `form:"ids,optional"`
StoreIds []int64 `form:"storeIds,optional"`
LikeName string `form:"likeName,optional"`
@@ -82,7 +82,7 @@ type (
}
- ListArtisansPageReply struct {
+ ListArtisansPageReply {
List []*Artisan `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -91,44 +91,44 @@ type (
)
type (
- CreateArtisanRequest struct {
+ CreateArtisanRequest {
Artisan
}
- CreateArtisanReply struct {
+ CreateArtisanReply {
ArtisanId int64 `json:"id"`
}
)
type (
- GetArtisanRequest struct {
+ GetArtisanRequest {
ArtisanId int64 `path:"id"`
}
- GetArtisanReply struct {
+ GetArtisanReply {
*Artisan
}
)
type (
- PutArtisanRequest struct {
+ PutArtisanRequest {
ArtisanId int64 `path:"id"`
Artisan
}
- PutArtisanReply struct {
+ PutArtisanReply {
*Artisan
}
)
type (
- DeleteArtisanRequest struct {
+ DeleteArtisanRequest {
ArtisanId int64 `path:"id"`
}
- DeleteArtisanReply struct {
+ DeleteArtisanReply {
ArtisanId int64 `json:"id"`
}
)
@@ -136,12 +136,12 @@ type (
type (
- BindArtisansToStoresRequest struct {
+ BindArtisansToStoresRequest {
ArtisanIds []int64 `json:"artisanIds"`
StoreId []int64 `json:"storeIds"`
}
- BindArtisansToStoresReply struct {
+ BindArtisansToStoresReply {
pivotIds []int64 `json:"pivotIds"`
}
)
diff --git a/api/admin/crm/product/pricebook.api b/api/admin/crm/product/pricebook.api
index 099b2db8..b4cf74a9 100644
--- a/api/admin/crm/product/pricebook.api
+++ b/api/admin/crm/product/pricebook.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/crm/product/pricebook
prefix: /api/v1/admin/product
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -66,11 +66,11 @@ type (
)
type (
- GetPriceBookRequest struct {
+ GetPriceBookRequest {
PriceBook int64 `path:"id"`
}
- GetPriceBookReply struct {
+ GetPriceBookReply {
*PriceBook
}
)
diff --git a/api/admin/crm/product/pricebookentry.api b/api/admin/crm/product/pricebookentry.api
index 84ddfec3..8f040cd5 100644
--- a/api/admin/crm/product/pricebookentry.api
+++ b/api/admin/crm/product/pricebookentry.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/crm/product/pricebookentry
prefix: /api/v1/admin/product
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -105,11 +105,11 @@ type (
)
type (
- GetPriceBookEntryRequest struct {
+ GetPriceBookEntryRequest {
PriceBookEntry int64 `path:"id"`
}
- GetPriceBookEntryReply struct {
+ GetPriceBookEntryReply {
*PriceBookEntry
}
)
diff --git a/api/admin/crm/product/product.api b/api/admin/crm/product/product.api
index 983c969d..74b6a215 100644
--- a/api/admin/crm/product/product.api
+++ b/api/admin/crm/product/product.api
@@ -17,7 +17,7 @@ import "./pricebookentry.api"
@server(
group: admin/crm/product
prefix: /api/v1/admin/product
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -124,7 +124,7 @@ type (
)
type (
- ListProductsPageRequest struct {
+ ListProductsPageRequest {
LikeName string `form:"likeName,optional"`
ProductTypeIds []int `form:"typeIds,optional"`
ProductStatusIds []int `form:"productStatusIds,optional"`
@@ -139,7 +139,7 @@ type (
}
- ListProductsPageReply struct {
+ ListProductsPageReply {
List []Product `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -148,44 +148,44 @@ type (
)
type (
- CreateProductRequest struct {
+ CreateProductRequest {
Product
}
- CreateProductReply struct {
+ CreateProductReply {
ProductKey int64 `json:"id"`
}
)
type (
- GetProductRequest struct {
+ GetProductRequest {
ProductId int64 `path:"id"`
}
- GetProductReply struct {
+ GetProductReply {
*Product
}
)
type (
- PutProductRequest struct {
+ PutProductRequest {
ProductId int64 `path:"id"`
Product
}
- PutProductReply struct {
+ PutProductReply {
*Product
}
)
type (
- PatchProductRequest struct {
+ PatchProductRequest {
ProductId int64 `path:"id"`
Product
}
- PatchProductReply struct {
+ PatchProductReply {
*Product
}
)
@@ -193,7 +193,7 @@ type (
type (
- DisableProductRequest struct {
+ DisableProductRequest {
ProductId int64 `path:"id"`
}
@@ -201,11 +201,11 @@ type (
ProductId int64 `json:"id"`
}
- DeleteProductRequest struct {
+ DeleteProductRequest {
ProductId int64 `path:"id"`
}
- DeleteProductReply struct {
+ DeleteProductReply {
ProductId int64 `json:"id"`
}
)
diff --git a/api/admin/crm/product/productcategory.api b/api/admin/crm/product/productcategory.api
index e5a636fc..fe509d69 100644
--- a/api/admin/crm/product/productcategory.api
+++ b/api/admin/crm/product/productcategory.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/crm/product/category
prefix: /api/v1/admin/product
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -77,7 +77,7 @@ type (
}
)
type (
- ListProductCategoryTreeRequest struct {
+ ListProductCategoryTreeRequest {
CategoryPId int `form:"categoryPId,optional"`
NeedChildren bool `form:"needChildren,optional"`
Names []string `form:"name,optional"`
@@ -85,60 +85,60 @@ type (
}
- ListProductCategoryTreeReply struct {
+ ListProductCategoryTreeReply {
ProductCategories []*ProductCategory `json:"tree"`
}
)
type (
- CreateProductCategoryRequest struct {
+ CreateProductCategoryRequest {
ProductCategory
}
- CreateProductCategoryReply struct {
+ CreateProductCategoryReply {
*ProductCategory
}
)
type (
- UpdateProductCategoryRequest struct {
+ UpdateProductCategoryRequest {
Id int64 `path:"id"`
ProductCategory
}
- UpdateProductCategoryReply struct {
+ UpdateProductCategoryReply {
Id int64 `json:"id"`
}
)
type (
- PatchProductCategoryRequest struct {
+ PatchProductCategoryRequest {
Id int64 `path:"id"`
PId int64 `json:"pId"`
}
- PatchProductCategoryReply struct {
+ PatchProductCategoryReply {
ProductCategory
}
)
type (
- GetProductCategoryRequest struct {
+ GetProductCategoryRequest {
ProductCategoryId int64 `path:"id"`
}
- GetProductCategoryReply struct {
+ GetProductCategoryReply {
*ProductCategory
}
)
type (
- DeleteProductCategoryRequest struct {
+ DeleteProductCategoryRequest {
Id int64 `path:"id"`
}
- DeleteProductCategoryReply struct {
+ DeleteProductCategoryReply {
Id int64 `json:"id"`
}
)
diff --git a/api/admin/crm/product/productspecific.api b/api/admin/crm/product/productspecific.api
index 3cd97061..e9989e8a 100644
--- a/api/admin/crm/product/productspecific.api
+++ b/api/admin/crm/product/productspecific.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/crm/product/productspecific
prefix: /api/v1/admin/product
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -64,7 +64,7 @@ type (
)
type (
- ListProductSpecificPageRequest struct {
+ ListProductSpecificPageRequest {
LikeName string `form:"likeName,optional"`
ProductId int64 `form:"productId"`
OrderBy string `form:"orderBy,optional"`
@@ -73,7 +73,7 @@ type (
}
- ListProductSpecificPageReply struct {
+ ListProductSpecificPageReply {
List []*ProductSpecific `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -82,65 +82,65 @@ type (
)
type (
- CreateProductSpecificRequest struct {
+ CreateProductSpecificRequest {
ProductSpecific
}
- CreateProductSpecificReply struct {
+ CreateProductSpecificReply {
ProductSpecificId int64 `json:"id"`
}
)
type (
- ConfigProductSpecificRequest struct {
+ ConfigProductSpecificRequest {
ProductSpecifics []ProductSpecific `json:"productSpecifics"`
}
- ConfigProductSpecificReply struct {
+ ConfigProductSpecificReply {
Result bool `json:"result"`
}
)
type (
- GetProductSpecificRequest struct {
+ GetProductSpecificRequest {
ProductSpecificId int64 `path:"id"`
}
- GetProductSpecificReply struct {
+ GetProductSpecificReply {
*ProductSpecific
}
)
type (
- PutProductSpecificRequest struct {
+ PutProductSpecificRequest {
ProductSpecificId int64 `path:"id"`
ProductSpecific
}
- PutProductSpecificReply struct {
+ PutProductSpecificReply {
*ProductSpecific
}
)
type (
- PatchProductSpecificRequest struct {
+ PatchProductSpecificRequest {
ProductSpecificId int64 `path:"id"`
ProductSpecific
}
- PatchProductSpecificReply struct {
+ PatchProductSpecificReply {
*ProductSpecific
}
)
type (
- DeleteProductSpecificRequest struct {
+ DeleteProductSpecificRequest {
ProductSpecificId int64 `path:"id"`
}
- DeleteProductSpecificReply struct {
+ DeleteProductSpecificReply {
ProductSpecificId int64 `json:"id"`
}
)
diff --git a/api/admin/crm/product/productstatistics.api b/api/admin/crm/product/productstatistics.api
index cae764e2..8181a90a 100644
--- a/api/admin/crm/product/productstatistics.api
+++ b/api/admin/crm/product/productstatistics.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/crm/product/productstatistics
prefix: /api/v1/admin/product
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -51,7 +51,7 @@ type (
)
type (
- ListProductStatisticsPageRequest struct {
+ ListProductStatisticsPageRequest {
LikeName string `form:"likeName,optional"`
ProductId int64 `form:"productId"`
OrderBy string `form:"orderBy,optional"`
@@ -60,7 +60,7 @@ type (
}
- ListProductStatisticsPageReply struct {
+ ListProductStatisticsPageReply {
List []*ProductStatistics `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -70,55 +70,55 @@ type (
type (
- ConfigProductStatisticsRequest struct {
+ ConfigProductStatisticsRequest {
*ProductStatistics
}
- ConfigProductStatisticsReply struct {
+ ConfigProductStatisticsReply {
Result bool `json:"result"`
}
)
type (
- GetProductStatisticsRequest struct {
+ GetProductStatisticsRequest {
ProductId int64 `path:"id"`
}
- GetProductStatisticsReply struct {
+ GetProductStatisticsReply {
*ProductStatistics
}
)
type (
- PutProductStatisticsRequest struct {
+ PutProductStatisticsRequest {
ProductStatisticsId int64 `path:"id"`
ProductStatistics
}
- PutProductStatisticsReply struct {
+ PutProductStatisticsReply {
*ProductStatistics
}
)
type (
- PatchProductStatisticsRequest struct {
+ PatchProductStatisticsRequest {
ProductStatisticsId int64 `path:"id"`
ProductStatistics
}
- PatchProductStatisticsReply struct {
+ PatchProductStatisticsReply {
*ProductStatistics
}
)
type (
- DeleteProductStatisticsRequest struct {
+ DeleteProductStatisticsRequest {
ProductStatisticsId int64 `path:"id"`
}
- DeleteProductStatisticsReply struct {
+ DeleteProductStatisticsReply {
ProductStatisticsId int64 `json:"id"`
}
)
diff --git a/api/admin/crm/product/sku.api b/api/admin/crm/product/sku.api
index 5bf0d6e1..a4e07bd9 100644
--- a/api/admin/crm/product/sku.api
+++ b/api/admin/crm/product/sku.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/crm/product/sku
prefix: /api/v1/admin/product
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -62,7 +62,7 @@ type (
)
type (
- ListSKUPageRequest struct {
+ ListSKUPageRequest {
LikeName string `form:"likeName,optional"`
ProductId int64 `form:"productId"`
OrderBy string `form:"orderBy,optional"`
@@ -71,7 +71,7 @@ type (
}
- ListSKUPageReply struct {
+ ListSKUPageReply {
List []*SKU `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -80,65 +80,65 @@ type (
)
type (
- CreateSKURequest struct {
+ CreateSKURequest {
SKU
}
- CreateSKUReply struct {
+ CreateSKUReply {
SKUId int64 `json:"id"`
}
)
type (
- ConfigSKURequest struct {
+ ConfigSKURequest {
SKUs []SKU `json:"skus"`
}
- ConfigSKUReply struct {
+ ConfigSKUReply {
Result bool `json:"result"`
}
)
type (
- GetSKURequest struct {
+ GetSKURequest {
SKUId int64 `path:"id"`
}
- GetSKUReply struct {
+ GetSKUReply {
*SKU
}
)
type (
- PutSKURequest struct {
+ PutSKURequest {
SKUId int64 `path:"id"`
SKU
}
- PutSKUReply struct {
+ PutSKUReply {
*SKU
}
)
type (
- PatchSKURequest struct {
+ PatchSKURequest {
SKUId int64 `path:"id"`
SKU
}
- PatchSKUReply struct {
+ PatchSKUReply {
*SKU
}
)
type (
- DeleteSKURequest struct {
+ DeleteSKURequest {
SKUId int64 `path:"id"`
}
- DeleteSKUReply struct {
+ DeleteSKUReply {
SKUId int64 `json:"id"`
}
)
diff --git a/api/admin/crm/trade/billingaddress.api b/api/admin/crm/trade/billingaddress.api
index 28c79ab9..1eeaf1d4 100644
--- a/api/admin/crm/trade/billingaddress.api
+++ b/api/admin/crm/trade/billingaddress.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/crm/trade/address/billing
prefix: /api/v1/admin/trade/address
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -60,7 +60,7 @@ type (
)
type (
- ListBillingAddressesPageRequest struct {
+ ListBillingAddressesPageRequest {
NameLike []string `form:"nameLike,optional"`
OrderBy string `form:"orderBy,optional"`
PageIndex int `form:"pageIndex,optional"`
@@ -68,7 +68,7 @@ type (
}
- ListBillingAddressesPageReply struct {
+ ListBillingAddressesPageReply {
List []*BillingAddress `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -77,55 +77,55 @@ type (
)
type (
- CreateBillingAddressRequest struct {
+ CreateBillingAddressRequest {
BillingAddress *BillingAddress `json:"billingAddress"`
}
- CreateBillingAddressReply struct {
+ CreateBillingAddressReply {
BillingAddressId int64 `json:"id"`
}
)
type (
- GetBillingAddressRequest struct {
+ GetBillingAddressRequest {
BillingAddressId int64 `path:"id"`
}
- GetBillingAddressReply struct {
+ GetBillingAddressReply {
BillingAddress *BillingAddress `json:"billingAddress"`
}
)
type (
- PutBillingAddressRequest struct {
+ PutBillingAddressRequest {
BillingAddressId int64 `path:"id"`
BillingAddress *BillingAddress `json:"billingAddress"`
}
- PutBillingAddressReply struct {
+ PutBillingAddressReply {
BillingAddress *BillingAddress `json:"billingAddress"`
}
)
type (
- PatchBillingAddressRequest struct {
+ PatchBillingAddressRequest {
BillingAddressId int64 `path:"id"`
BillingAddress *BillingAddress `json:"billingAddress"`
}
- PatchBillingAddressReply struct {
+ PatchBillingAddressReply {
BillingAddress *BillingAddress `json:"billingAddress"`
}
)
type (
- DeleteBillingAddressRequest struct {
+ DeleteBillingAddressRequest {
BillingAddressId int64 `path:"id"`
}
- DeleteBillingAddressReply struct {
+ DeleteBillingAddressReply {
BillingAddressId int64 `json:"id"`
}
)
diff --git a/api/admin/crm/trade/deliveryaddress.api b/api/admin/crm/trade/deliveryaddress.api
index c18706d3..3b81868b 100644
--- a/api/admin/crm/trade/deliveryaddress.api
+++ b/api/admin/crm/trade/deliveryaddress.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/crm/trade/address/delivery
prefix: /api/v1/admin/trade/address
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -60,7 +60,7 @@ type (
)
type (
- ListDeliveryAddressesPageRequest struct {
+ ListDeliveryAddressesPageRequest {
NameLike []string `form:"nameLike,optional"`
OrderBy string `form:"orderBy,optional"`
PageIndex int `form:"pageIndex,optional"`
@@ -68,7 +68,7 @@ type (
}
- ListDeliveryAddressesPageReply struct {
+ ListDeliveryAddressesPageReply {
List []*DeliveryAddress `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -77,55 +77,55 @@ type (
)
type (
- CreateDeliveryAddressRequest struct {
+ CreateDeliveryAddressRequest {
DeliveryAddress *DeliveryAddress `json:"deliveryAddress"`
}
- CreateDeliveryAddressReply struct {
+ CreateDeliveryAddressReply {
DeliveryAddressId int64 `json:"id"`
}
)
type (
- GetDeliveryAddressRequest struct {
+ GetDeliveryAddressRequest {
DeliveryAddressId int64 `path:"id"`
}
- GetDeliveryAddressReply struct {
+ GetDeliveryAddressReply {
DeliveryAddress *DeliveryAddress `json:"deliveryAddress"`
}
)
type (
- PutDeliveryAddressRequest struct {
+ PutDeliveryAddressRequest {
DeliveryAddressId int64 `path:"id"`
DeliveryAddress *DeliveryAddress `json:"deliveryAddress"`
}
- PutDeliveryAddressReply struct {
+ PutDeliveryAddressReply {
DeliveryAddress *DeliveryAddress `json:"deliveryAddress"`
}
)
type (
- PatchDeliveryAddressRequest struct {
+ PatchDeliveryAddressRequest {
DeliveryAddressId int64 `path:"id"`
DeliveryAddress *DeliveryAddress `json:"deliveryAddress"`
}
- PatchDeliveryAddressReply struct {
+ PatchDeliveryAddressReply {
DeliveryAddress *DeliveryAddress `json:"deliveryAddress"`
}
)
type (
- DeleteDeliveryAddressRequest struct {
+ DeleteDeliveryAddressRequest {
DeliveryAddressId int64 `path:"id"`
}
- DeleteDeliveryAddressReply struct {
+ DeleteDeliveryAddressReply {
DeliveryAddressId int64 `json:"id"`
}
)
diff --git a/api/admin/crm/trade/logistics.api b/api/admin/crm/trade/logistics.api
index afae36b5..27b62114 100644
--- a/api/admin/crm/trade/logistics.api
+++ b/api/admin/crm/trade/logistics.api
@@ -11,7 +11,7 @@ info (
@server (
group: admin/crm/trade/logistics
prefix: /api/v1/admin/trade
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -54,57 +54,57 @@ type Logistics {
IsActive bool `json:"isActive, omitempty"`
}
-type ListLogisticssRequest struct {
+type ListLogisticssRequest {
NameLike string `json:"nameLike"`
PageIndex int `form:"pageIndex"`
PageSize int `form:"pageSize"`
}
-type ListLogisticssResponse struct {
+type ListLogisticssResponse {
List []*Logistics `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Total int64 `json:"total"`
}
-type GetLogisticsRequest struct {
+type GetLogisticsRequest {
Id int64 `json:"id"`
}
-type GetLogisticsResponse struct {
+type GetLogisticsResponse {
Logistics *Logistics `json:"logistics"`
}
-type CreateLogisticsRequest struct {
+type CreateLogisticsRequest {
Logistics *Logistics `json:"logistics"`
}
-type CreateLogisticsResponse struct {
+type CreateLogisticsResponse {
LogisticsId int64 `json:"logisticsId"`
}
-type UpdateLogisticsRequest struct {
+type UpdateLogisticsRequest {
Id int64 `json:"id"`
Logistics *Logistics `json:"logistics"`
}
-type UpdateLogisticsResponse struct {
+type UpdateLogisticsResponse {
Logistics *Logistics `json:"logistics"`
}
-type PatchLogisticsRequest struct {
+type PatchLogisticsRequest {
Id int64 `json:"id"`
Logistics *Logistics `json:"logistics"`
}
-type PatchLogisticsResponse struct {
+type PatchLogisticsResponse {
Logistics *Logistics `json:"logistics"`
}
-type DeleteLogisticsRequest struct {
+type DeleteLogisticsRequest {
Id int64 `json:"id"`
}
-type DeleteLogisticsResponse struct {
+type DeleteLogisticsResponse {
LogisticsId int64 `json:"logisticsId"`
}
diff --git a/api/admin/crm/trade/order.api b/api/admin/crm/trade/order.api
index 5ae7225c..ed17369e 100644
--- a/api/admin/crm/trade/order.api
+++ b/api/admin/crm/trade/order.api
@@ -14,7 +14,7 @@ import "./payment.api"
@server(
group: admin/crm/trade/order
prefix: /api/v1/admin/trade
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@doc("查询订单列表")
diff --git a/api/admin/crm/trade/payment.api b/api/admin/crm/trade/payment.api
index 70513843..ec4885ff 100644
--- a/api/admin/crm/trade/payment.api
+++ b/api/admin/crm/trade/payment.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/crm/trade/payment
prefix: /api/v1/admin/trade
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -77,7 +77,7 @@ type (
}
)
type (
- ListPaymentsPageRequest struct {
+ ListPaymentsPageRequest {
PaymentType string `form:"paymentType,optional"`
Keys []string `form:"keys,optional"`
OrderBy string `form:"orderBy,optional"`
@@ -86,7 +86,7 @@ type (
}
- ListPaymentsPageReply struct {
+ ListPaymentsPageReply {
List []*Payment `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -95,55 +95,55 @@ type (
)
type (
- CreatePaymentRequest struct {
+ CreatePaymentRequest {
Payment
}
- CreatePaymentReply struct {
+ CreatePaymentReply {
PaymentKey int64 `json:"id"`
}
)
type (
- GetPaymentRequest struct {
+ GetPaymentRequest {
PaymentId int64 `path:"id"`
}
- GetPaymentReply struct {
+ GetPaymentReply {
*Payment
}
)
type (
- PutPaymentRequest struct {
+ PutPaymentRequest {
PaymentId int64 `path:"id"`
Payment
}
- PutPaymentReply struct {
+ PutPaymentReply {
*Payment
}
)
type (
- PatchPaymentRequest struct {
+ PatchPaymentRequest {
PaymentId int64 `path:"id"`
Payment
}
- PatchPaymentReply struct {
+ PatchPaymentReply {
*Payment
}
)
type (
- DeletePaymentRequest struct {
+ DeletePaymentRequest {
PaymentId int64 `path:"id"`
}
- DeletePaymentReply struct {
+ DeletePaymentReply {
PaymentId int64 `json:"id"`
}
)
diff --git a/api/admin/crm/trade/refundorder.api b/api/admin/crm/trade/refundorder.api
index 5f782fe3..1cf2a037 100644
--- a/api/admin/crm/trade/refundorder.api
+++ b/api/admin/crm/trade/refundorder.api
@@ -13,7 +13,7 @@ info(
@server(
group: admin/crm/trade/order
prefix: /api/v1/admin/trade
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@doc("查询退款单列表")
diff --git a/api/admin/crm/trade/shippingaddress.api b/api/admin/crm/trade/shippingaddress.api
index 30f16ad2..b41b888c 100644
--- a/api/admin/crm/trade/shippingaddress.api
+++ b/api/admin/crm/trade/shippingaddress.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/crm/trade/address/shipping
prefix: /api/v1/admin/trade/address
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -59,7 +59,7 @@ type (
}
)
type (
- ListShippingAddressesPageRequest struct {
+ ListShippingAddressesPageRequest {
NameLike []string `form:"nameLike,optional"`
OrderBy string `form:"orderBy,optional"`
PageIndex int `form:"pageIndex,optional"`
@@ -67,7 +67,7 @@ type (
}
- ListShippingAddressesPageReply struct {
+ ListShippingAddressesPageReply {
List []*ShippingAddress `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -76,55 +76,55 @@ type (
)
type (
- CreateShippingAddressRequest struct {
+ CreateShippingAddressRequest {
ShippingAddress
}
- CreateShippingAddressReply struct {
+ CreateShippingAddressReply {
*ShippingAddress
}
)
type (
- GetShippingAddressRequest struct {
+ GetShippingAddressRequest {
ShippingAddressId int64 `path:"id"`
}
- GetShippingAddressReply struct {
+ GetShippingAddressReply {
*ShippingAddress
}
)
type (
- PutShippingAddressRequest struct {
+ PutShippingAddressRequest {
ShippingAddressId int64 `path:"id"`
ShippingAddress
}
- PutShippingAddressReply struct {
+ PutShippingAddressReply {
*ShippingAddress
}
)
type (
- PatchShippingAddressRequest struct {
+ PatchShippingAddressRequest {
ShippingAddressId int64 `path:"id"`
ShippingAddress
}
- PatchShippingAddressReply struct {
+ PatchShippingAddressReply {
*ShippingAddress
}
)
type (
- DeleteShippingAddressRequest struct {
+ DeleteShippingAddressRequest {
ShippingAddressId int64 `path:"id"`
}
- DeleteShippingAddressReply struct {
+ DeleteShippingAddressReply {
ShippingAddressId int64 `json:"id"`
}
)
diff --git a/api/admin/crm/trade/tokenproduct.api b/api/admin/crm/trade/tokenproduct.api
index 5c744dc7..71e4d876 100644
--- a/api/admin/crm/trade/tokenproduct.api
+++ b/api/admin/crm/trade/tokenproduct.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/crm/trade/token
prefix: /api/v1/admin/trade/token
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
diff --git a/api/admin/crm/trade/warehouse.api b/api/admin/crm/trade/warehouse.api
index 80b9c9f8..d9d89257 100644
--- a/api/admin/crm/trade/warehouse.api
+++ b/api/admin/crm/trade/warehouse.api
@@ -11,7 +11,7 @@ info (
@server (
group: admin/crm/trade/warehouse
prefix: /api/v1/admin/trade
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -54,57 +54,57 @@ type Warehouse {
IsActive bool `json:"isActive, omitempty"`
}
-type ListWarehousesRequest struct {
+type ListWarehousesRequest {
NameLike string `json:"nameLike"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
}
-type ListWarehousesResponse struct {
+type ListWarehousesResponse {
List []*Warehouse `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Total int64 `json:"total"`
}
-type GetWarehouseRequest struct {
+type GetWarehouseRequest {
Id int64 `json:"id"`
}
-type GetWarehouseResponse struct {
+type GetWarehouseResponse {
Warehouse *Warehouse `json:"warehouse"`
}
-type CreateWarehouseRequest struct {
+type CreateWarehouseRequest {
Warehouse *Warehouse `json:"warehouse"`
}
-type CreateWarehouseResponse struct {
+type CreateWarehouseResponse {
WarehouseId int64 `json:"warehouseId"`
}
-type UpdateWarehouseRequest struct {
+type UpdateWarehouseRequest {
Id int64 `json:"id"`
Warehouse *Warehouse `json:"warehouse"`
}
-type UpdateWarehouseResponse struct {
+type UpdateWarehouseResponse {
Warehouse *Warehouse `json:"warehouse"`
}
-type PatchWarehouseRequest struct {
+type PatchWarehouseRequest {
Id int64 `json:"id"`
Warehouse *Warehouse `json:"warehouse"`
}
-type PatchWarehouseResponse struct {
+type PatchWarehouseResponse {
Warehouse *Warehouse `json:"warehouse"`
}
-type DeleteWarehouseRequest struct {
+type DeleteWarehouseRequest {
Id int64 `json:"id"`
}
-type DeleteWarehouseResponse struct {
+type DeleteWarehouseResponse {
WarehouseId int64 `json:"warehouseId"`
}
diff --git a/api/admin/department.api b/api/admin/department.api
index 20fc2969..f5ce585f 100644
--- a/api/admin/department.api
+++ b/api/admin/department.api
@@ -1,7 +1,7 @@
@server(
group: admin/department
prefix: /api/v1/admin/department
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
diff --git a/api/admin/dictionary.api b/api/admin/dictionary.api
index 4931909e..27a38229 100644
--- a/api/admin/dictionary.api
+++ b/api/admin/dictionary.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/dictionary
prefix: /api/v1/admin/dictionary
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -64,12 +64,12 @@ service PowerX {
}
type (
- ListDictionaryTypesPageRequest struct {
+ ListDictionaryTypesPageRequest {
PageIndex int `form:"pageIndex,optional"`
PageSize int `form:"pageSize,optional"`
}
- DictionaryType struct {
+ DictionaryType {
Id int64 `json:"id,optional"`
Type string `json:"type"`
Name string `json:"name"`
@@ -77,7 +77,7 @@ type (
Items []*DictionaryItem `json:"items,optional"`
}
- ListDictionaryTypesPageReply struct {
+ ListDictionaryTypesPageReply {
List []DictionaryType `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -94,13 +94,13 @@ type (
)
type (
- CreateDictionaryTypeRequest struct {
+ CreateDictionaryTypeRequest {
Type string `json:"type"`
Name string `json:"name"`
Description string `json:"description,optional"`
}
- CreateDictionaryTypeReply struct {
+ CreateDictionaryTypeReply {
Type string `json:"type"`
Name string `json:"name"`
Description string `json:"description,optional"`
@@ -108,35 +108,35 @@ type (
)
type (
- UpdateDictionaryTypeRequest struct {
+ UpdateDictionaryTypeRequest {
Type string `path:"type"`
Name string `json:"name,optional"`
Description string `json:"description,optional"`
}
- UpdateDictionaryTypeReply struct {
+ UpdateDictionaryTypeReply {
*DictionaryType
}
)
type (
- DeleteDictionaryTypeRequest struct {
+ DeleteDictionaryTypeRequest {
Type string `path:"type"`
}
- DeleteDictionaryTypeReply struct {
+ DeleteDictionaryTypeReply {
Type string `json:"type"`
}
)
type (
- ListDictionaryItemsRequest struct {
+ ListDictionaryItemsRequest {
Type string `form:"type"`
PageIndex int `form:"pageIndex,optional"`
PageSize int `form:"pageSize,optional"`
}
- DictionaryItem struct {
+ DictionaryItem {
Id int64 `json:"id,optional"`
Key string `json:"key"`
Type string `json:"type"`
@@ -146,7 +146,7 @@ type (
Description string `json:"description"`
}
- ListDictionaryItemsReply struct {
+ ListDictionaryItemsReply {
List []DictionaryItem `json:"list"`
}
@@ -161,7 +161,7 @@ type (
)
type (
- CreateDictionaryItemRequest struct {
+ CreateDictionaryItemRequest {
Key string `json:"key"`
Type string `json:"type"`
Name string `json:"name"`
@@ -170,7 +170,7 @@ type (
Description string `json:"description,optional"`
}
- CreateDictionaryItemReply struct {
+ CreateDictionaryItemReply {
Key string `json:"key"`
Type string `json:"type"`
Name string `json:"name,optional"`
@@ -181,7 +181,7 @@ type (
)
type (
- UpdateDictionaryItemRequest struct {
+ UpdateDictionaryItemRequest {
Key string `path:"key"`
Type string `path:"type"`
Name string `json:"name,optional"`
@@ -190,18 +190,18 @@ type (
Description string `json:"description,optional"`
}
- UpdateDictionaryItemReply struct {
+ UpdateDictionaryItemReply {
*DictionaryItem
}
)
type (
- DeleteDictionaryItemRequest struct {
+ DeleteDictionaryItemRequest {
Key string `path:"key"`
Type string `path:"type"`
}
- DeleteDictionaryItemReply struct {
+ DeleteDictionaryItemReply {
Key string `json:"key"`
Type string `json:"type"`
}
diff --git a/api/admin/infoorganization/category.api b/api/admin/infoorganization/category.api
index b561dc2a..d39f404b 100644
--- a/api/admin/infoorganization/category.api
+++ b/api/admin/infoorganization/category.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/infoorganization/category
prefix: /api/v1/admin/info-organization
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -61,7 +61,7 @@ type (
}
)
type (
- ListCategoryTreeRequest struct {
+ ListCategoryTreeRequest {
CategoryPId int `form:"categoryPId,optional"`
NeedChildren bool `form:"needChildren,optional"`
Names []string `form:"name,optional"`
@@ -69,60 +69,60 @@ type (
}
- ListCategoryTreeReply struct {
+ ListCategoryTreeReply {
ProductCategories []*Category `json:"tree"`
}
)
type (
- CreateCategoryRequest struct {
+ CreateCategoryRequest {
Category
}
- CreateCategoryReply struct {
+ CreateCategoryReply {
*Category
}
)
type (
- UpdateCategoryRequest struct {
+ UpdateCategoryRequest {
Id int64 `path:"id"`
Category
}
- UpdateCategoryReply struct {
+ UpdateCategoryReply {
Id int64 `json:"id"`
}
)
type (
- PatchCategoryRequest struct {
+ PatchCategoryRequest {
Id int64 `path:"id"`
PId int64 `json:"pId"`
}
- PatchCategoryReply struct {
+ PatchCategoryReply {
Category
}
)
type (
- GetCategoryRequest struct {
+ GetCategoryRequest {
CategoryId int64 `path:"id"`
}
- GetCategoryReply struct {
+ GetCategoryReply {
*Category
}
)
type (
- DeleteCategoryRequest struct {
+ DeleteCategoryRequest {
Id int64 `path:"id"`
}
- DeleteCategoryReply struct {
+ DeleteCategoryReply {
Id int64 `json:"id"`
}
)
diff --git a/api/admin/infoorganization/label.api b/api/admin/infoorganization/label.api
index 2dfd30cd..9b27ce2b 100644
--- a/api/admin/infoorganization/label.api
+++ b/api/admin/infoorganization/label.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/infoorganization/label
prefix: /api/v1/admin/info-organization
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -61,7 +61,7 @@ type (
}
)
type (
- ListLabelTreeRequest struct {
+ ListLabelTreeRequest {
LabelPId int `form:"labelPId,optional"`
NeedChildren bool `form:"needChildren,optional"`
Names []string `form:"name,optional"`
@@ -69,60 +69,60 @@ type (
}
- ListLabelTreeReply struct {
+ ListLabelTreeReply {
ProductCategories []*Label `json:"tree"`
}
)
type (
- CreateLabelRequest struct {
+ CreateLabelRequest {
Label
}
- CreateLabelReply struct {
+ CreateLabelReply {
*Label
}
)
type (
- UpdateLabelRequest struct {
+ UpdateLabelRequest {
Id int64 `path:"id"`
Label
}
- UpdateLabelReply struct {
+ UpdateLabelReply {
Id int64 `json:"id"`
}
)
type (
- PatchLabelRequest struct {
+ PatchLabelRequest {
Id int64 `path:"id"`
PId int64 `json:"pId"`
}
- PatchLabelReply struct {
+ PatchLabelReply {
Label
}
)
type (
- GetLabelRequest struct {
+ GetLabelRequest {
LabelId int64 `path:"id"`
}
- GetLabelReply struct {
+ GetLabelReply {
*Label
}
)
type (
- DeleteLabelRequest struct {
+ DeleteLabelRequest {
Id int64 `path:"id"`
}
- DeleteLabelReply struct {
+ DeleteLabelReply {
Id int64 `json:"id"`
}
)
diff --git a/api/admin/infoorganization/tag.api b/api/admin/infoorganization/tag.api
index da2670ef..dc80cabc 100644
--- a/api/admin/infoorganization/tag.api
+++ b/api/admin/infoorganization/tag.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/infoorganization/tag
prefix: /api/v1/admin/info-organization
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -61,7 +61,7 @@ type (
}
)
type (
- ListTagTreeRequest struct {
+ ListTagTreeRequest {
TagPId int `form:"tagPId,optional"`
NeedChildren bool `form:"needChildren,optional"`
Names []string `form:"name,optional"`
@@ -69,60 +69,60 @@ type (
}
- ListTagTreeReply struct {
+ ListTagTreeReply {
ProductCategories []*Tag `json:"tree"`
}
)
type (
- CreateTagRequest struct {
+ CreateTagRequest {
Tag
}
- CreateTagReply struct {
+ CreateTagReply {
*Tag
}
)
type (
- UpdateTagRequest struct {
+ UpdateTagRequest {
Id int64 `path:"id"`
Tag
}
- UpdateTagReply struct {
+ UpdateTagReply {
Id int64 `json:"id"`
}
)
type (
- PatchTagRequest struct {
+ PatchTagRequest {
Id int64 `path:"id"`
PId int64 `json:"pId"`
}
- PatchTagReply struct {
+ PatchTagReply {
Tag
}
)
type (
- GetTagRequest struct {
+ GetTagRequest {
TagId int64 `path:"id"`
}
- GetTagReply struct {
+ GetTagReply {
*Tag
}
)
type (
- DeleteTagRequest struct {
+ DeleteTagRequest {
Id int64 `path:"id"`
}
- DeleteTagReply struct {
+ DeleteTagReply {
Id int64 `json:"id"`
}
)
diff --git a/api/admin/mediaresource.api b/api/admin/mediaresource.api
index 7c67ca55..8e4254f1 100644
--- a/api/admin/mediaresource.api
+++ b/api/admin/mediaresource.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/mediaresource
prefix: /api/v1/admin/media
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -39,12 +39,12 @@ service PowerX {
type (
- SortIdItem struct {
+ SortIdItem {
Id int64 `json:"id,optional"`
SortIndex int `json:"sortIndex,optional"`
}
- MediaResource struct {
+ MediaResource {
Id int64 `json:"id,optional"`
CustomerId int64 `json:"customerId,optional"`
Filename string `json:"filename,optional"`
@@ -57,13 +57,13 @@ type (
SortIndex int `json:"sortIndex,optional"`
}
- CreateMediaResourceByBase64Request struct {
+ CreateMediaResourceByBase64Request {
MediaName string `json:"mediaName"`
BucketName string `json:"bucketName"`
Base64Data string `json:"base64Data"`
}
- CreateMediaResourceReply struct {
+ CreateMediaResourceReply {
*MediaResource
isOSS bool `json:"isOSS"`
}
diff --git a/api/admin/permission.api b/api/admin/permission.api
index 12775ffe..dc717181 100644
--- a/api/admin/permission.api
+++ b/api/admin/permission.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/permission
prefix: /api/v1/admin/permission
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -32,8 +32,8 @@ service PowerX {
patch /roles/:roleCode (PatchRoleReqeust) returns (PatchRoleReply)
@doc "获取角色的用户列表"
- @handler GetRoleEmployees
- get /roles/:roleCode/users (GetRoleEmployeesReqeust) returns (GetRoleEmployeesReply)
+ @handler GetRoleUsers
+ get /roles/:roleCode/users (GetRoleUsersReqeust) returns (GetRoleUsersReply)
@doc "为角色授予API权限"
@handler SetRolePermissions
@@ -44,8 +44,8 @@ service PowerX {
get /api-list (ListAPIRequest) returns (ListAPIReply)
@doc "为角色分配用户"
- @handler SetRoleEmployees
- post /roles/:roleCode/actions/set-employees (SetRoleEmployeesRequest) returns (SetRoleEmployeesReply)
+ @handler SetRoleUsers
+ post /roles/:roleCode/actions/set-users (SetRoleUsersRequest) returns (SetRoleUsersReply)
@doc "为用户授予角色"
@handler SetUserRoles
@@ -127,12 +127,12 @@ type (
)
type (
- SetRoleEmployeesRequest {
+ SetRoleUsersRequest {
RoleCode string `path:"roleCode"`
- EmployeeIds []int64 `json:"employeeIds"`
+ UserIds []int64 `json:"userIds"`
}
- SetRoleEmployeesReply {
+ SetRoleUsersReply {
Status string `json:"status"`
}
)
@@ -148,29 +148,29 @@ type (
)
type (
- GetRoleEmployeesReqeust {
+ GetRoleUsersReqeust {
RoleCode string `path:"roleCode"`
PageIndex int `form:"pageIndex"`
PageSize int `form:"pageSize"`
}
- RoleEmployeeDepartment {
+ RoleUserDepartment {
Id int64 `json:"id"`
Name string `json:"name"`
}
- RoleEmployee {
+ RoleUser {
Id int64 `json:"id"`
Name string `json:"name"`
Nickname string `json:"nickname"`
Account string `json:"account"`
PhoneNumber string `json:"phoneNumber"`
- Department *RoleEmployeeDepartment `json:"department"`
+ Department *RoleUserDepartment `json:"department"`
Email string `json:"email"`
}
- GetRoleEmployeesReply {
- List []RoleEmployee `json:"list"`
+ GetRoleUsersReply {
+ List []RoleUser `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Total int64 `json:"total"`
diff --git a/api/admin/position.api b/api/admin/position.api
index ad005d12..ea4f4b99 100644
--- a/api/admin/position.api
+++ b/api/admin/position.api
@@ -1,7 +1,7 @@
@server(
group: admin/position
prefix: /api/v1/admin/position
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
diff --git a/api/admin/scrm/app/weworkapp.api b/api/admin/scrm/app/weworkapp.api
index 150da419..a08bef94 100644
--- a/api/admin/scrm/app/weworkapp.api
+++ b/api/admin/scrm/app/weworkapp.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/app
prefix: /api/v1/admin/scrm/app/wechat
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -27,10 +27,10 @@ service PowerX {
type (
- ApplicationRequest struct {
+ ApplicationRequest {
AgentId int `form:"agentId"`
}
- ApplicationReply struct {
+ ApplicationReply {
Agentid int `json:"agentId"`
Name string `json:"name"`
SquareLogoUrl string `json:"squareLogoUrl"`
@@ -45,17 +45,17 @@ type (
HomeUrl string `json:"homeUrl"`
CustomizedPublishStatus int `json:"customizedPublishStatus"`
}
- AllowUserinfos struct {
+ AllowUserinfos {
User []User `json:"user"`
}
- User struct {
+ User {
Userid string `json:"userId"`
}
- AllowPartys struct {
+ AllowPartys {
Partyid []int `json:"partyId"`
}
- AllowTags struct {
+ AllowTags {
Tagid []int `json:"tagId"`
}
)
@@ -72,7 +72,7 @@ type (
}
- AppWechat struct {
+ AppWechat {
Agentid int `json:"agentId"`
Name string `json:"name"`
SquareLogoUrl string `json:"squareLogoUrl"`
diff --git a/api/admin/scrm/app/weworkappmessage.api b/api/admin/scrm/app/weworkappmessage.api
index 4acb7011..8c4eee9e 100644
--- a/api/admin/scrm/app/weworkappmessage.api
+++ b/api/admin/scrm/app/weworkappmessage.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/app
prefix: /api/v1/admin/scrm/app/wechat
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -28,7 +28,7 @@ type (
Message string `json:"message"`
}
- AppMessageArticlesRequest struct {
+ AppMessageArticlesRequest {
ToUser string `json:"toUser,optional"` // "UserID1|UserID2|UserID3",
ToParty string `json:"toParty,optional"` // "PartyID1|PartyID2",
ToTag string `json:"toTag,optional"` // "TagID1 | TagID2",
@@ -39,11 +39,11 @@ type (
}
- AppMessageRequestNews struct {
+ AppMessageRequestNews {
Article []*Article `json:"articles"`
}
- Article struct {
+ Article {
Title string `json:"title"` // "领奖通知",
Description string `json:"description"` // "
2016年9月26日
恭喜你抽中iPhone 7一台,领奖码:xxxx
请于2016年10月10日前联系行政同事领取
",
URL string `json:"url"` // "URL",
diff --git a/api/admin/scrm/app/weworkgroup.api b/api/admin/scrm/app/weworkgroup.api
index 00e8c770..19e8ffb0 100644
--- a/api/admin/scrm/app/weworkgroup.api
+++ b/api/admin/scrm/app/weworkgroup.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/app
prefix: /api/v1/admin/scrm/app/wechat
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -45,7 +45,7 @@ type (
type (
//
- AppGroupCreateRequest struct {
+ AppGroupCreateRequest {
Name string `json:"name"` // 名称
Owner string `json:"owner"` // owner
UserList []string `json:"userList"` // 用户列表
@@ -61,7 +61,7 @@ type (
type (
//
- AppGroupMessageArticleRequest struct {
+ AppGroupMessageArticleRequest {
ChatIds []string `json:"chatIds"`
Title string `json:"title"` // "领奖通知",
Description string `json:"description"` // "2016年9月26日
恭喜你抽中iPhone 7一台,领奖码:xxxx
请于2016年10月10日前联系行政同事领取
",
diff --git a/api/admin/scrm/bot/weworkbot.api b/api/admin/scrm/bot/weworkbot.api
index c79f573a..c0657571 100644
--- a/api/admin/scrm/bot/weworkbot.api
+++ b/api/admin/scrm/bot/weworkbot.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/bot
prefix: /api/v1/admin/scrm/bot/wechat
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -23,7 +23,7 @@ service PowerX {
type (
//
- GroupRobotMsgNewsArticlesRequest struct {
+ GroupRobotMsgNewsArticlesRequest {
Key string `json:"key"` // 机器人key
Title string `json:"title"`
Description string `json:"description,omitempty"`
diff --git a/api/admin/scrm/contactway.api b/api/admin/scrm/contactway.api
index 6ef8fdc2..d30181c1 100644
--- a/api/admin/scrm/contactway.api
+++ b/api/admin/scrm/contactway.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/contractway
prefix: /api/v1/admin/contract-way
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -72,7 +72,7 @@ type (
type (
GetContractWaysRequest {
- EmployeeId int64 `form:"employeeId,optional"`
+ UserId int64 `form:"userId,optional"`
Name string `form:"name,optional"`
StartDate string `form:"startDate,optional"`
EndDate string `form:"endDate,optional"`
diff --git a/api/admin/scrm/customer.api b/api/admin/scrm/customer.api
index 47c23048..3ef15893 100644
--- a/api/admin/scrm/customer.api
+++ b/api/admin/scrm/customer.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/customer
prefix: /api/v1/admin/scrm/customer
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
diff --git a/api/admin/scrm/customer/weworkcustomer.api b/api/admin/scrm/customer/weworkcustomer.api
index 99797b00..fd8bdfcd 100644
--- a/api/admin/scrm/customer/weworkcustomer.api
+++ b/api/admin/scrm/customer/weworkcustomer.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/customer
prefix: /api/v1/admin/scrm/customer/wechat
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -55,14 +55,14 @@ type (
type (
- WechatCustomer struct {
+ WechatCustomer {
ExternalContact WechatCustomersWithExternalContactExternalProfile `json:"externalContact"`
FollowUser *WechatCustomersWithFollowUser `json:"followUser,omitempty"`
NextCursor string `json:"nextCursor,omitempty"`
}
- WechatCustomersWithExternalContactExternalProfile struct {
+ WechatCustomersWithExternalContactExternalProfile {
ExternalUserId string `json:"externalUserId"`
Name string `json:"name"`
Position string `json:"position"`
@@ -76,32 +76,32 @@ type (
ExternalProfile ExternalContactExternalProfileWithExternalProfile `json:"externalProfile"`
}
- ExternalContactExternalProfileWithExternalProfile struct {
+ ExternalContactExternalProfileWithExternalProfile {
ExternalAttr []*ExternalContactExternalProfileExternalProfileWithExternalAttr `json:"externalAttr"`
}
- ExternalContactExternalProfileExternalProfileWithExternalAttr struct {
+ ExternalContactExternalProfileExternalProfileWithExternalAttr {
Type int `json:"type"`
Name string `json:"name"`
Text ExternalContactExternalProfileExternalProfileExternalAttrWithText `json:"text"`
Web ExternalContactExternalProfileExternalProfileExternalAttrWithWeb `json:"web"`
Miniprogram ExternalContactExternalProfileExternalProfileExternalAttrWithMiniprogram `json:"miniprogram"`
}
- ExternalContactExternalProfileExternalProfileExternalAttrWithText struct {
+ ExternalContactExternalProfileExternalProfileExternalAttrWithText {
Value string `json:"value"`
}
- ExternalContactExternalProfileExternalProfileExternalAttrWithWeb struct {
+ ExternalContactExternalProfileExternalProfileExternalAttrWithWeb {
Url string `json:"url"`
Title string `json:"title"`
}
- ExternalContactExternalProfileExternalProfileExternalAttrWithMiniprogram struct {
+ ExternalContactExternalProfileExternalProfileExternalAttrWithMiniprogram {
Appid string `json:"appid"`
Pagepath string `json:"pagepath"`
Title string `json:"title"`
}
- WechatCustomersWithFollowUser struct {
+ WechatCustomersWithFollowUser {
UserId string `json:"userId"`
Remark string `json:"remark"`
Description string `json:"description"`
@@ -115,13 +115,13 @@ type (
AddWay int `json:"addWay"`
State string `json:"state,omitempty"`
}
- WechatCustomersFollowUserWithTags struct {
+ WechatCustomersFollowUserWithTags {
GroupName string `json:"groupName"`
TagName string `json:"tagName"`
TagId string `json:"tagId,omitempty"`
Type int `json:"type"`
}
- WechatCustomersFollowUserWithWechatChannels struct {
+ WechatCustomersFollowUserWithWechatChannels {
Nickname string `json:"nickname"`
Source int `json:"source"`
}
diff --git a/api/admin/scrm/customer/weworkcustomergroup.api b/api/admin/scrm/customer/weworkcustomergroup.api
index 046190b7..8c1b72d5 100644
--- a/api/admin/scrm/customer/weworkcustomergroup.api
+++ b/api/admin/scrm/customer/weworkcustomergroup.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/customer
prefix: /api/v1/admin/scrm/customer/wechat
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -34,7 +34,7 @@ type (
Cursor string `json:"cursor,optional"`
Limit int `json:"limit,optional"`
}
- OwnerFilter struct {
+ OwnerFilter {
UseridList []string `json:"useridList,optional"`
}
)
@@ -44,7 +44,7 @@ type (
WeWorkListCustomerGroupReply {
List []WechatCustomerGroup `json:"list"` //https://developer.work.weixin.qq.com/document/path/92122
}
- WechatCustomerGroup struct {
+ WechatCustomerGroup {
ChatId string `json:"chatId"`
Name string `json:"name"`
Owner string `json:"owner"`
@@ -53,11 +53,11 @@ type (
MemberList []*WechatCustomerGroupMemberList `json:"memberList"`
AdminList []*WechatCustomerGroupAdminList `json:"adminList"`
}
- WechatCustomerGroupAdminList struct {
+ WechatCustomerGroupAdminList {
UserId string `json:"userId"`
}
- WechatCustomerGroupMemberList struct {
+ WechatCustomerGroupMemberList {
UserId string `json:"userId"`
Type int `json:"type"`
JoinTime int `json:"joinTime"`
@@ -67,14 +67,14 @@ type (
Name string `json:"name"`
UnionId string `json:"unionId,omitempty"`
}
- WechatCustomerGroupMemberListInvitor struct {
+ WechatCustomerGroupMemberListInvitor {
UserId string `json:"userId"`
}
)
type (
- WeWorkAddMsgTemplateRequest struct {
+ WeWorkAddMsgTemplateRequest {
ChatType string `json:"chatType,optional,options=single|group"` // 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群
ExternalUserId []string `json:"externalUserId,optional"` // chat_type为single时有效,不可与sender同时为空
@@ -84,16 +84,16 @@ type (
SendTime int64 `json:"sendTime,optional"` // 定时发送,不填默认立刻发送// 附件, 当前仅支持图片
}
- WeWorkTextOfMessage struct {
+ WeWorkTextOfMessage {
Content string `json:"content"` // "内容"
}
- Content struct {
+ Content {
Link Link `json:"link,optional"`
//Image Image `json:"image,optional"`
}
- Link struct {
+ Link {
MsgType string `json:"msgType,optional"` // 默认:link
Title string `json:"title"` // "消息标题",
PicURL string `json:"picUrl"` // "https://example.pic.com/path",
@@ -101,13 +101,13 @@ type (
URL string `json:"url"` // "https://example.link.com/path"
}
- Image struct {
+ Image {
MediaId string `json:"mediaId,optional"` // 不填
PicUrl string `json:"picUrl,optional"` // 图片地址
}
- WeWorkAddMsgTemplateResponse struct {
+ WeWorkAddMsgTemplateResponse {
FailList []string `json:"failList"`
MsgId string `json:"msgId"`
}
diff --git a/api/admin/scrm/organization/weworkdepartment.api b/api/admin/scrm/organization/weworkdepartment.api
index 5191d7d9..fadd3786 100644
--- a/api/admin/scrm/organization/weworkdepartment.api
+++ b/api/admin/scrm/organization/weworkdepartment.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/organization
prefix: /api/v1/admin/scrm/organization/wechat
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
diff --git a/api/admin/scrm/organization/weworkemployee.api b/api/admin/scrm/organization/weworuser.api
similarity index 84%
rename from api/admin/scrm/organization/weworkemployee.api
rename to api/admin/scrm/organization/weworuser.api
index 7e653dc5..345be494 100644
--- a/api/admin/scrm/organization/weworkemployee.api
+++ b/api/admin/scrm/organization/weworuser.api
@@ -11,16 +11,16 @@ info(
@server(
group: admin/scrm/organization
prefix: /api/v1/admin/scrm/organization/wechat
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@doc "员工列表/page"
- @handler ListWeWorkEmployeePage
- post /employee/page (ListWeWorkEmployeeReqeust) returns (ListWeWorkEmployeeReply)
+ @handler ListWeWorkUserPage
+ post /user/page (ListWeWorkUserReqeust) returns (ListWeWorkUserReply)
- @doc "同步组织架构/department&employee"
- @handler SyncWeWorkEmployee
+ @doc "同步组织架构/department&user"
+ @handler SyncWeWorkUser
get /sync returns (SyncWeWorkOrganizationReply)
}
@@ -28,7 +28,7 @@ service PowerX {
type (
- SyncWeWorkOrganizationReply struct {
+ SyncWeWorkOrganizationReply {
Status string `json:"status"`
}
)
@@ -36,7 +36,7 @@ type (
type (
- ListWeWorkEmployeeReqeust {
+ ListWeWorkUserReqeust {
Id int64 `json:"id,optional"` // 微信员工ID
Name string `json:"name,optional"` // 微信员工名称
Alias string `json:"alias,optional"` // 微信员工别称
@@ -49,14 +49,14 @@ type (
PageSize int `form:"pageSize,optional"`
}
- ListWeWorkEmployeeReply {
- List []*WechatEmployee `json:"list"`
+ ListWeWorkUserReply {
+ List []*WechatUser `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Total int64 `json:"total"`
}
//
- WechatEmployee {
+ WechatUser {
WeWorkUserId string `json:"weWorkUserId"`
Name string `json:"name"`
diff --git a/api/admin/scrm/qrcode/weworkcustomergroupqrcode.api b/api/admin/scrm/qrcode/weworkcustomergroupqrcode.api
index c84ffbe7..a83c30a3 100644
--- a/api/admin/scrm/qrcode/weworkcustomergroupqrcode.api
+++ b/api/admin/scrm/qrcode/weworkcustomergroupqrcode.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/qrcode
prefix: /api/v1/admin/scrm/qrcode/wechat
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
diff --git a/api/admin/scrm/resource/weworkresource.api b/api/admin/scrm/resource/weworkresource.api
index 91ddaeb8..0786429a 100644
--- a/api/admin/scrm/resource/weworkresource.api
+++ b/api/admin/scrm/resource/weworkresource.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/resource
prefix: /api/v1/admin/scrm/resource/wechat
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -25,24 +25,24 @@ service PowerX {
}
type (
- CreateWeWorkSourceImageReply struct {
+ CreateWeWorkSourceImageReply {
Link string `json:"link"`
}
- ListWeWorkResourceImageRequest struct {
+ ListWeWorkResourceImageRequest {
ResourceType string `json:"resourceType,optional"`
PageIndex int `form:"pageIndex,optional"`
PageSize int `form:"pageSize,optional"`
}
- ListWeWorkResourceImageReply struct {
+ ListWeWorkResourceImageReply {
List []*Resource `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Total int64 `json:"total"`
}
- Resource struct {
+ Resource {
Link string `json:"link"`
ResourceType string `json:"resourceType"`
CreateTime string `json:"createTime"`
diff --git a/api/admin/scrm/tag/weworktag.api b/api/admin/scrm/tag/weworktag.api
index 21f2737a..c2f88243 100644
--- a/api/admin/scrm/tag/weworktag.api
+++ b/api/admin/scrm/tag/weworktag.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/scrm/tag
prefix: /api/v1/admin/scrm/tag/wechat
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -123,7 +123,7 @@ type (
)
type (
- CreateCorpTagRequest struct {
+ CreateCorpTagRequest {
GroupId string `json:"groupId,optional"` //et2lz4UgAArZWi6ZKx1X8jo3uxfbC_sA 下拉标签组
GroupName string `json:"groupName"`
Sort int `json:"Sort,optional"`
@@ -131,12 +131,12 @@ type (
AgentId int64 `json:"agentId,optional"` //应用列表
}
- TagFieldTag struct {
+ TagFieldTag {
Name string `json:"name"`
Sort int `json:"sort,optional"`
}
- ActionCorpTagGroupRequest struct {
+ ActionCorpTagGroupRequest {
AgentId *int64 `json:"agentId,optional"`
GroupId *string `json:"groupId,optional"`
GroupName string `json:"groupName,optional"`
@@ -149,7 +149,7 @@ type (
)
type (
- UpdateCorpTagRequest struct {
+ UpdateCorpTagRequest {
TagId string `json:"tagId"`
Name string `json:"name"`
Sort int `json:"sort,optional"`
@@ -159,7 +159,7 @@ type (
type (
- DeleteCorpTagRequest struct {
+ DeleteCorpTagRequest {
TagIds []string `json:"tagIds,optional"`
GroupIds []string `json:"groupIds,optional"`
AgentId int64 `json:"agentId,optional"`
@@ -168,7 +168,7 @@ type (
type (
- ActionCustomerTagRequest struct {
+ ActionCustomerTagRequest {
UserId string `json:"userId"`
ExternalUserId string `json:"externalUserId"`
AddTag []string `json:"addTag,optional"`
diff --git a/api/admin/tag.api b/api/admin/tag.api
index 31fca1fa..9cddf29a 100644
--- a/api/admin/tag.api
+++ b/api/admin/tag.api
@@ -12,7 +12,7 @@ info(
@server(
group: admin/tag
prefix: /api/v1/admin/tags
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -60,7 +60,7 @@ type (
}
)
type (
- ListTagTreeRequest struct {
+ ListTagTreeRequest {
TagPId int `form:"tagPId,optional"`
NeedChildren bool `form:"needChildren,optional"`
Names []string `form:"name,optional"`
@@ -68,60 +68,60 @@ type (
}
- ListTagTreeReply struct {
+ ListTagTreeReply {
Tags []*Tag `json:"tree"`
}
)
type (
- CreateTagRequest struct {
+ CreateTagRequest {
Tag
}
- CreateTagReply struct {
+ CreateTagReply {
*Tag
}
)
type (
- UpdateTagRequest struct {
+ UpdateTagRequest {
Id int64 `path:"id"`
Tag
}
- UpdateTagReply struct {
+ UpdateTagReply {
Id int64 `json:"id"`
}
)
type (
- PatchTagRequest struct {
+ PatchTagRequest {
Id int64 `path:"id"`
PId int64 `json:"pId"`
}
- PatchTagReply struct {
+ PatchTagReply {
Tag
}
)
type (
- GetTagRequest struct {
+ GetTagRequest {
TagId int64 `path:"id"`
}
- GetTagReply struct {
+ GetTagReply {
*Tag
}
)
type (
- DeleteTagRequest struct {
+ DeleteTagRequest {
Id int64 `path:"id"`
}
- DeleteTagReply struct {
+ DeleteTagReply {
Id int64 `json:"id"`
}
)
diff --git a/api/admin/employee.api b/api/admin/user.api
similarity index 73%
rename from api/admin/employee.api
rename to api/admin/user.api
index b045110e..03188ba0 100644
--- a/api/admin/employee.api
+++ b/api/admin/user.api
@@ -9,53 +9,53 @@ info(
)
@server(
- group: admin/employee
- prefix: /api/v1/admin/employee
- middleware: EmployeeJWTAuth
+ group: admin/user
+ prefix: /api/v1/admin/user
+ middleware: UserJWTAuth
)
service PowerX {
@doc "同步员工"
- @handler SyncEmployees
- post /employees/actions/sync (SyncEmployeesRequest) returns (SyncEmployeesReply)
+ @handler SyncUsers
+ post /users/actions/sync (SyncUsersRequest) returns (SyncUsersReply)
@doc "查询员工"
- @handler GetEmployee
- get /employees/:id (GetEmployeeRequest) returns (GetEmployeeReply)
+ @handler GetUser
+ get /users/:id (GetUserRequest) returns (GetUserReply)
@doc "List员工"
- @handler ListEmployees
- get /employees (ListEmployeesRequest) returns (ListEmployeesReply)
+ @handler ListUsers
+ get /users (ListUsersRequest) returns (ListUsersReply)
@doc "创建员工"
- @handler CreateEmployee
- post /employees (CreateEmployeeRequest) returns (CreateEmployeeReply)
+ @handler CreateUser
+ post /users (CreateUserRequest) returns (CreateUserReply)
@doc "编辑员工信息"
- @handler UpdateEmployee
- patch /employees/:id (UpdateEmployeeRequest) returns (UpdateEmployeeReply)
+ @handler UpdateUser
+ patch /users/:id (UpdateUserRequest) returns (UpdateUserReply)
@doc "删除员工"
- @handler DeleteEmployee
- delete /employees/:id (DeleteEmployeeRequest) returns (DeleteEmployeeReply)
+ @handler DeleteUser
+ delete /users/:id (DeleteUserRequest) returns (DeleteUserReply)
@doc "重设密码"
@handler ResetPassword
- post /employees/actions/reset-password (ResetPasswordRequest) returns (ResetPasswordReply)
+ post /users/actions/reset-password (ResetPasswordRequest) returns (ResetPasswordReply)
}
type (
- GetEmployeeRequest {
+ GetUserRequest {
Id int64 `path:"id"`
}
- GetEmployeeReply {
- *Employee
+ GetUserReply {
+ *User
}
)
type (
- ListEmployeesRequest {
+ ListUsersRequest {
Ids []int64 `form:"ids,optional"`
LikeName string `form:"likeName,optional"`
LikeEmail string `form:"likeEmail,optional"`
@@ -68,12 +68,12 @@ type (
PageSize int `form:"pageSize,optional"`
}
- EmployeeDepartment {
+ UserDepartment {
DepId int64 `json:"depId"`
DepName string `json:"depName"`
}
- Employee {
+ User {
Id int64 `json:"id"`
Account string `json:"account"`
Name string `json:"name"`
@@ -85,7 +85,7 @@ type (
Avatar string `json:"avatar,optional"`
ExternalEmail string `json:"externalEmail,optional"`
Roles []string `json:"roles"`
- Department *EmployeeDepartment `json:"department"`
+ Department *UserDepartment `json:"department"`
Position *Position `json:"position"`
PositionId int64 `json:"positionId"`
JobTitle string `json:"jobTitle"`
@@ -93,8 +93,8 @@ type (
CreatedAt string `json:"createdAt"`
}
- ListEmployeesReply {
- List []Employee `json:"list"`
+ ListUsersReply {
+ List []User `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Total int64 `json:"total"`
@@ -102,18 +102,18 @@ type (
)
type (
- SyncEmployeesRequest {
+ SyncUsersRequest {
Source string `json:"source"`
Target string `json:"target"`
}
- SyncEmployeesReply {
+ SyncUsersReply {
Status bool `json:"status"`
}
)
type (
- CreateEmployeeRequest {
+ CreateUserRequest {
Account string `json:"account"`
Name string `json:"name"`
NickName string `json:"nickName,optional"`
@@ -129,13 +129,13 @@ type (
Password string `json:"password,optional"`
}
- CreateEmployeeReply {
+ CreateUserReply {
Id int64 `json:"id"`
}
)
type (
- UpdateEmployeeRequest {
+ UpdateUserRequest {
Id int64 `path:"id"`
Name string `json:"name,optional"`
NickName string `json:"nickName,optional"`
@@ -152,17 +152,17 @@ type (
Status string `json:"status,optional,options=enabled|disabled"`
}
- UpdateEmployeeReply {
- *Employee
+ UpdateUserReply {
+ *User
}
)
type (
- DeleteEmployeeRequest {
+ DeleteUserRequest {
Id int64 `path:"id"`
}
- DeleteEmployeeReply {
+ DeleteUserReply {
Id int64 `json:"id"`
}
)
diff --git a/api/admin/userinfo.api b/api/admin/userinfo.api
index abc6fe0c..5ba2be8b 100644
--- a/api/admin/userinfo.api
+++ b/api/admin/userinfo.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/userinfo
prefix: /api/v1/admin/user-center
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
diff --git a/api/admin/wechat/officialaccount/media.api b/api/admin/wechat/officialaccount/media.api
index 3c425a82..1f3d5a67 100644
--- a/api/admin/wechat/officialaccount/media.api
+++ b/api/admin/wechat/officialaccount/media.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/wechat/officialaccount/media
prefix: /api/v1/admin/wechat/official-account
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -48,43 +48,43 @@ service PowerX {
type (
- GetOAMediaListRequest struct {
+ GetOAMediaListRequest {
Offset int64 `json:"offset,optional"`
Count int64 `json:"count,optional"`
MediaType string `json:"type"`
}
- GetOAMediaListReply struct {
+ GetOAMediaListReply {
TotalCount interface{} `json:"total_count"`
ItemCount interface{} `json:"item_count"`
Item interface{} `json:"item"`
}
- GetOAMediaNewsListReply struct {
+ GetOAMediaNewsListReply {
NewsItem interface{} `json:"news_item"`
}
)
type (
- CreateOAMediaRequest struct {
+ CreateOAMediaRequest {
OAMedia interface{} `json:"media"`
}
- CreateOAMediaReply struct {
+ CreateOAMediaReply {
Success bool `json:"success,optional"`
Data interface{} `json:"data"`
}
)
type (
- GetOAMediaRequest struct {
+ GetOAMediaRequest {
MediaId string `path:"mediaId"`
}
- GetOAMediaReply struct {
+ GetOAMediaReply {
OAMedia interface{} `json:"media"`
}
- GetOAMediaByVideoReply struct {
+ GetOAMediaByVideoReply {
Title string `json:"title"`
Description string `json:"description"`
DownUrl string `json:"down_url"`
@@ -93,11 +93,11 @@ type (
type (
- DeleteOAMediaRequest struct {
+ DeleteOAMediaRequest {
MediaId string `path:"mediaId"`
}
- DeleteOAMediaReply struct {
+ DeleteOAMediaReply {
Success bool `json:"success"`
Data interface{} `json:"data"`
}
diff --git a/api/admin/wechat/officialaccount/menu.api b/api/admin/wechat/officialaccount/menu.api
index e3e07a9f..5aaa4280 100644
--- a/api/admin/wechat/officialaccount/menu.api
+++ b/api/admin/wechat/officialaccount/menu.api
@@ -11,7 +11,7 @@ info(
@server(
group: admin/wechat/officialaccount/menu
prefix: /api/v1/admin/wechat/official-account
- middleware: EmployeeJWTAuth
+ middleware: UserJWTAuth
)
service PowerX {
@@ -34,7 +34,7 @@ service PowerX {
}
type (
- OASubButton struct {
+ OASubButton {
Name string `json:"name,optional"`
Id int `json:"id,optional"`
@@ -45,7 +45,7 @@ type (
PagePath string `json:"pagepath,omitempty,optional"`
}
- OAButton struct {
+ OAButton {
Name string `json:"name,optional"`
Type string `json:"type,optional"`
Key string `json:"key,omitempty,optional"`
@@ -56,7 +56,7 @@ type (
Id int `json:"id,optional"`
}
- MatchRule struct {
+ MatchRule {
TagId string `json:"tag_id,optional"`
Sex string `json:"sex,optional"`
Country string `json:"country,optional"`
@@ -64,7 +64,7 @@ type (
City string `json:"city,optional"`
Language string `json:"language,optional"`
}
- OAMenu struct {
+ OAMenu {
Id int64 `json:"id,optional"`
OAButton []*OAButton `json:"button,optional"`
MatchRule *MatchRule `json:"matchrule,optional"`
@@ -72,22 +72,22 @@ type (
)
type (
- SyncMenusRequest struct {
+ SyncMenusRequest {
OAMenu
}
- SyncMenusReply struct {
+ SyncMenusReply {
Success bool `json:"success,optional"`
Data interface{} `json:"data"`
}
)
type (
- CreateMenuRequest struct {
+ CreateMenuRequest {
OAMenu
}
- CreateMenuReply struct {
+ CreateMenuReply {
Success bool `json:"success,optional"`
Data interface{} `json:"data"`
}
@@ -95,7 +95,7 @@ type (
type (
- QueryMenusReply struct {
+ QueryMenusReply {
Button interface{} `json:"button"`
MatchRule interface{} `json:"matchrule"`
}
@@ -103,7 +103,7 @@ type (
type (
- DeleteMenuReply struct {
+ DeleteMenuReply {
Success bool `json:"success"`
Data interface{} `json:"data"`
}
diff --git a/api/mp/trade/cart.api b/api/mp/trade/cart.api
index b55ad082..7e08eb9f 100644
--- a/api/mp/trade/cart.api
+++ b/api/mp/trade/cart.api
@@ -43,14 +43,14 @@ service PowerX {
type (
- Cart struct {
+ Cart {
Id int64 `json:"id", optional"`
CustomerId int64 `json:"customerId", optional"`
Status int `json:"status", optional"`
Items []*CartItem `json:"items", optional"`
}
- CartItem struct {
+ CartItem {
Id int64 `json:"id, optional"`
CustomerId int64 `json:"customerId,omitempty,optional"`
CartId int64 `json:"cartId,omitempty,optional"`
@@ -67,12 +67,12 @@ type (
)
type (
- ListCartItemsPageRequest struct {
+ ListCartItemsPageRequest {
PageIndex int `form:"pageIndex,optional"`
PageSize int `form:"pageSize,optional"`
}
- ListCartItemsPageReply struct {
+ ListCartItemsPageReply {
List []*CartItem `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
@@ -81,50 +81,50 @@ type (
)
type (
- GetCartRequest struct {
+ GetCartRequest {
}
- GetCartReply struct {
+ GetCartReply {
*Cart
}
)
type (
- AddToCartRequest struct {
+ AddToCartRequest {
CartItem
}
- AddToCartReply struct {
+ AddToCartReply {
*CartItem
}
)
type (
- UpdateCartItemQuantityRequest struct {
+ UpdateCartItemQuantityRequest {
ItemId int64 `path:"itemId"`
Quantity int `json:"quantity"`
}
- UpdateCartItemQuantityReply struct {
+ UpdateCartItemQuantityReply {
*CartItem
}
)
type (
- RemoveCartItemRequest struct {
+ RemoveCartItemRequest {
ItemId int64 `path:"itemId"`
}
- RemoveCartItemReply struct {
+ RemoveCartItemReply {
ItemId int64 `json:"itemId"`
}
)
type (
- ClearCartItemsRequest struct {
+ ClearCartItemsRequest {
}
- ClearCartItemsReply struct {
+ ClearCartItemsReply {
Message string `json:"message"`
}
)
diff --git a/api/mp/trade/logistics.api b/api/mp/trade/logistics.api
index 5f77b5af..700c09aa 100644
--- a/api/mp/trade/logistics.api
+++ b/api/mp/trade/logistics.api
@@ -54,57 +54,57 @@ type Logistics {
IsActive bool `json:"isActive, omitempty"`
}
-type ListLogisticssRequest struct {
+type ListLogisticssRequest {
NameLike string `json:"nameLike"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
}
-type ListLogisticssResponse struct {
+type ListLogisticssResponse {
List []*Logistics `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Total int64 `json:"total"`
}
-type GetLogisticsRequest struct {
+type GetLogisticsRequest {
Id int64 `json:"id"`
}
-type GetLogisticsResponse struct {
+type GetLogisticsResponse {
Logistics *Logistics `json:"logistics"`
}
-type CreateLogisticsRequest struct {
+type CreateLogisticsRequest {
Logistics *Logistics `json:"logistics"`
}
-type CreateLogisticsResponse struct {
+type CreateLogisticsResponse {
LogisticsId int64 `json:"logisticsId"`
}
-type UpdateLogisticsRequest struct {
+type UpdateLogisticsRequest {
Id int64 `json:"id"`
Logistics *Logistics `json:"logistics"`
}
-type UpdateLogisticsResponse struct {
+type UpdateLogisticsResponse {
Logistics *Logistics `json:"logistics"`
}
-type PatchLogisticsRequest struct {
+type PatchLogisticsRequest {
Id int64 `json:"id"`
Logistics *Logistics `json:"logistics"`
}
-type PatchLogisticsResponse struct {
+type PatchLogisticsResponse {
Logistics *Logistics `json:"logistics"`
}
-type DeleteLogisticsRequest struct {
+type DeleteLogisticsRequest {
Id int64 `json:"id"`
}
-type DeleteLogisticsResponse struct {
+type DeleteLogisticsResponse {
LogisticsId int64 `json:"logisticsId"`
}
diff --git a/api/mp/trade/order.api b/api/mp/trade/order.api
index e0310f60..d7bf64c3 100644
--- a/api/mp/trade/order.api
+++ b/api/mp/trade/order.api
@@ -43,7 +43,7 @@ service PowerX {
type (
- CreateOrderByProductsRequest struct {
+ CreateOrderByProductsRequest {
PriceBookId int64 `json:"PriceBookId,optional,emptyomit"`
ProductIds []int64 `json:"productIds"`
SkuIds []int64 `json:"skuIds"`
@@ -52,19 +52,19 @@ type (
Comment string `json:"comment"`
}
- CreateOrderByProductsReply struct {
+ CreateOrderByProductsReply {
OrderId int64 `json:"orderId"`
PaymentAmount float64 `json:"paymentAmount"`
}
)
type (
- CreateOrderByCartItemsRequest struct {
+ CreateOrderByCartItemsRequest {
CartItemIds []int64 `json:"cartItemIds"`
ShippingAddressId int64 `json:"shippingAddressId"`
Comment string `json:"comment"`
}
- CreateOrderByCartItemsReply struct {
+ CreateOrderByCartItemsReply {
OrderId int64 `json:"orderId"`
CartId int64 `json:"cartId"`
PaymentAmount float64 `json:"paymentAmount"`
@@ -74,11 +74,11 @@ type (
type (
- CancelOrderRequest struct {
+ CancelOrderRequest {
OrderId int64 `path:"id"`
}
- CancelOrderReply struct {
+ CancelOrderReply {
OrderId int64 `json:"orderId,optional"`
}
)
diff --git a/api/mp/trade/payment.api b/api/mp/trade/payment.api
index 2c129577..a53358a7 100644
--- a/api/mp/trade/payment.api
+++ b/api/mp/trade/payment.api
@@ -38,13 +38,13 @@ service PowerX {
type (
- CreatePaymentFromOrderRequest struct {
+ CreatePaymentFromOrderRequest {
OrderId int64 `json:"orderId"`
PaymentType int `json:"paymentType"`
Comment string `json:"comment,optional"`
}
- CreatePaymentFromOrderRequestReply struct {
+ CreatePaymentFromOrderRequestReply {
PaymentId int64 `json:"paymentId"`
Data interface{} `json:"data"`
}
@@ -52,12 +52,12 @@ type (
type (
- UpdatePaymentRequest struct {
+ UpdatePaymentRequest {
PaymentId int64 `path:"id"`
Payment
}
- UpdatePaymentReply struct {
+ UpdatePaymentReply {
*Payment
}
)
diff --git a/api/plugin.api b/api/plugin.api
index b35024d8..de6c9960 100644
--- a/api/plugin.api
+++ b/api/plugin.api
@@ -20,7 +20,7 @@ service PowerX {
}
type (
- Route struct {
+ Route {
Method string `json:"method"`
Path string `json:"path"`
}
@@ -44,7 +44,7 @@ type (
RequestAuth bool `json:"requestAuth"`
}
- PluginWebRoutes struct {
+ PluginWebRoutes {
Name string `json:"name"`
Path string `json:"path"`
Meta PluginWebRouteMeta `json:"meta"`
@@ -56,7 +56,7 @@ type (
Socpe []string `form:"scope"`
}
- PluginWebInfo struct {
+ PluginWebInfo {
Name string `json:"name"`
Desc string `json:"desc"`
Verison string `json:"version"`
diff --git a/api_group.csv b/api_group.csv
new file mode 100644
index 00000000..f0d4ae77
--- /dev/null
+++ b/api_group.csv
@@ -0,0 +1,425 @@
+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,代币管理,代币管理
+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,场景活码,场景活码
+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,代币管理,代币管理
+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,场景活码,场景活码
+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,代币管理,代币管理
+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,场景活码,场景活码
+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,代币管理,代币管理
+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,场景活码,场景活码
+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,代币管理,代币管理
+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/cmd/ctl/database/migrate/powerx.go b/cmd/ctl/database/migrate/powerx.go
index 80b213fa..99fe1fdf 100644
--- a/cmd/ctl/database/migrate/powerx.go
+++ b/cmd/ctl/database/migrate/powerx.go
@@ -6,6 +6,7 @@ import (
"PowerX/internal/model"
"PowerX/internal/model/crm/customerdomain"
"PowerX/internal/model/crm/market"
+ "PowerX/internal/model/crm/operation"
"PowerX/internal/model/crm/product"
"PowerX/internal/model/crm/trade"
infoorganizatoin "PowerX/internal/model/infoorganization"
@@ -49,8 +50,8 @@ func NewPowerMigrator(conf *config.Config) (*PowerMigrator, error) {
func (m *PowerMigrator) AutoMigrate() {
_ = m.db.AutoMigrate(&model.DataDictionaryType{}, &model.DataDictionaryItem{}, &model.PivotDataDictionaryToObject{})
- _ = m.db.AutoMigrate(&origanzation.Department{}, &origanzation.Employee{}, &origanzation.Position{})
- _ = m.db.AutoMigrate(&permission.EmployeeCasbinPolicy{}, permission.AdminRole{}, permission.AdminRoleMenuName{}, permission.AdminAPI{})
+ _ = m.db.AutoMigrate(&origanzation.Department{}, &origanzation.User{}, &origanzation.Position{})
+ _ = m.db.AutoMigrate(&permission.UserCasbinPolicy{}, permission.AdminRole{}, permission.AdminRoleMenuName{}, permission.AdminAPI{})
// info organization
_ = m.db.AutoMigrate(&infoorganizatoin.Category{}, &infoorganizatoin.Label{}, &infoorganizatoin.Tag{})
@@ -95,7 +96,7 @@ func (m *PowerMigrator) AutoMigrate() {
migrate.AutoMigrateCustom(m.db)
// wechat organization
- _ = m.db.AutoMigrate(&organization.WeWorkEmployee{}, &organization.WeWorkDepartment{})
+ _ = m.db.AutoMigrate(&organization.WeWorkUser{}, &organization.WeWorkDepartment{})
// wechat customer
_ = m.db.AutoMigrate(&customer.WeWorkExternalContacts{}, &customer.WeWorkExternalContactFollow{})
// wechat resource
diff --git a/cmd/ctl/database/seed/datadictionary/membershipstatus.go b/cmd/ctl/database/seed/datadictionary/membershipstatus.go
index be7ef0d1..dc4892f3 100644
--- a/cmd/ctl/database/seed/datadictionary/membershipstatus.go
+++ b/cmd/ctl/database/seed/datadictionary/membershipstatus.go
@@ -2,6 +2,7 @@ package datadictionary
import (
"PowerX/internal/model"
+ "PowerX/internal/model/crm/operation"
)
func defaultMembershipStatusDataDictionary() *model.DataDictionaryType {
diff --git a/cmd/ctl/database/seed/datadictionary/membershiptype.go b/cmd/ctl/database/seed/datadictionary/membershiptype.go
index bda2eef4..46e4fbed 100644
--- a/cmd/ctl/database/seed/datadictionary/membershiptype.go
+++ b/cmd/ctl/database/seed/datadictionary/membershiptype.go
@@ -2,6 +2,7 @@ package datadictionary
import (
"PowerX/internal/model"
+ "PowerX/internal/model/crm/operation"
)
func defaultMembershipTypeDataDictionary() *model.DataDictionaryType {
diff --git a/cmd/server/powerx.go b/cmd/server/powerx.go
index af694bac..0eed8db3 100644
--- a/cmd/server/powerx.go
+++ b/cmd/server/powerx.go
@@ -21,48 +21,70 @@ import (
"github.com/zeromicro/go-zero/core/conf"
)
+// 定义了一个全局变量 configFile,用于指定配置文件的路径,默认为 etc/powerx.yaml。
var configFile = flag.String("f", "etc/powerx.yaml", "the config file")
+// 在 main() 函数中,首先解析命令行参数,加载配置文件,然后初始化 Gin 框架,并设置为发布模式。
func main() {
+ // 解析命令行参数
flag.Parse()
+ // ---------- 加载配置文件 ----------
var c config.Config
conf.MustLoad(*configFile, &c)
+ // 设置配置文件目录
c.EtcDir = filepath.Dir(*configFile)
+ // ---------- 设置 Gin 框架为发布模式 ----------
gin.SetMode(gin.ReleaseMode)
+ // 创建 Gin 路由实例
r := zgin.NewRouter()
+
+ // 创建 Go-Zero REST 服务器实例
server := rest.MustNewServer(c.Server, rest.WithRouter(r))
+
+ // 设置跨域配置
runOpt := config.SetupCors(&c)
if runOpt == nil {
server = rest.MustNewServer(c.Server)
} else {
server = rest.MustNewServer(c.Server, runOpt)
}
+ // 确保服务器关闭
defer server.Stop()
+
+ // ---------- 设置日志 ----------
zerox.MustSetupLog(c.Log)
+ // ---------- 创建插件管理器实例 ----------
plugin := pluginx.NewManager(context.Background(), r, fmt.Sprintf("%s:%d", "127.0.0.1", c.Server.Port))
+ // 创建服务上下文
ctx := svc.NewServiceContext(c, svc.WithPlugin(plugin))
+ // 启动插件
go func() {
plugin.Start()
}()
+ // 确保插件关闭
defer ctx.Plugin.Close()
+ // ---------- 注册业务处理函数 ----------
handler.RegisterHandlers(server, ctx)
+ // ---------- 注册 Webhook 处理函数 ----------
handler.RegisterWebhookHandlers(server, ctx)
-
+ // ---------- 注册静态资源处理函数 ----------
handler.RegisterStaticHandlers(server, ctx)
- // error 5xx
+ // ---------- 添加恢复中间件 ----------
server.Use(recovery.RecoverMiddleware())
- // 设置自定义错误处理逻辑 3xx 4xx default: 400
+ // ---------- 设置自定义错误处理逻辑 ----------
+ // 3xx 4xx default: 400
httpx.SetErrorHandler(handler.ErrorHandle)
httpx.SetErrorHandlerCtx(handler.ErrorHandleCtx)
+ // ---------- 启动服务器 ----------
fmt.Printf("Starting server at %s:%d...\n", c.Server.Host, c.Server.Port)
server.Start()
}
diff --git a/etc/api.csv b/etc/api.csv
index 8304a49c..1993254b 100644
--- a/etc/api.csv
+++ b/etc/api.csv
@@ -1,12 +1,12 @@
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/employees,get,员工Options远程搜索
-admin/common,/api/v1/admin/common/options/employee-query,get,查询员工过滤条件
+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-employee,put,为商机分配员工
+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,查询客户
@@ -15,14 +15,14 @@ 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/employees,post,为客户分配员工
+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/employees,post,为线索分配员工
+admin/crm/customerdomain/leader,/api/v1/admin/customerdomain/leads/:id/actions/users,post,为线索分配员工
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,创建或更新媒体
@@ -115,13 +115,13 @@ 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/employee,/api/v1/admin/employee/employees/actions/sync,post,同步员工
-admin/employee,/api/v1/admin/employee/employees/:id,get,查询员工
-admin/employee,/api/v1/admin/employee/employees,get,List员工
-admin/employee,/api/v1/admin/employee/employees,post,创建员工
-admin/employee,/api/v1/admin/employee/employees/:id,patch,编辑员工信息
-admin/employee,/api/v1/admin/employee/employees/:id,delete,删除员工
-admin/employee,/api/v1/admin/employee/employees/actions/reset-password,post,重设密码
+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/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,创新类别
@@ -152,7 +152,7 @@ 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-employees,post,为角色分配用户
+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,更新职位信息(可选更新)
@@ -181,8 +181,8 @@ 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/employee/page,post,员工列表/page
-admin/scrm/organization,/api/v1/admin/scrm/organization/wechat/sync,get,同步组织架构/department&employee
+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,更新场景码
diff --git a/etc/api_group.csv b/etc/api_group.csv
index 8f3d9be2..4d07128c 100644
--- a/etc/api_group.csv
+++ b/etc/api_group.csv
@@ -25,7 +25,7 @@ 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/employee,/api/v1/admin/employee,员工管理,员工管理
+admin/user,/api/v1/admin/user,员工管理,员工管理
admin/infoorganization/category,/api/v1/admin/info-organization,类别,类别
admin/infoorganization/label,/api/v1/admin/info-organization,框架标签,框架标签
admin/infoorganization/tag,/api/v1/admin/info-organization,碎片标签,碎片标签
diff --git a/internal/handler/admin/common/getemployeeoptionshandler.go b/internal/handler/admin/common/getuseroptionshandler.go
similarity index 66%
rename from internal/handler/admin/common/getemployeeoptionshandler.go
rename to internal/handler/admin/common/getuseroptionshandler.go
index 3e90e044..77a9a41b 100644
--- a/internal/handler/admin/common/getemployeeoptionshandler.go
+++ b/internal/handler/admin/common/getuseroptionshandler.go
@@ -9,16 +9,16 @@ import (
"github.com/zeromicro/go-zero/rest/httpx"
)
-func GetEmployeeOptionsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func GetUserOptionsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.GetEmployeeOptionsRequest
+ var req types.GetUserOptionsRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := common.NewGetEmployeeOptionsLogic(r.Context(), svcCtx)
- resp, err := l.GetEmployeeOptions(&req)
+ l := common.NewGetUserOptionsLogic(r.Context(), svcCtx)
+ resp, err := l.GetUserOptions(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/common/getemployeequeryoptionshandler.go b/internal/handler/admin/common/getuserqueryoptionshandler.go
similarity index 62%
rename from internal/handler/admin/common/getemployeequeryoptionshandler.go
rename to internal/handler/admin/common/getuserqueryoptionshandler.go
index 7a4c9a9b..fdc03fdd 100644
--- a/internal/handler/admin/common/getemployeequeryoptionshandler.go
+++ b/internal/handler/admin/common/getuserqueryoptionshandler.go
@@ -8,10 +8,10 @@ import (
"github.com/zeromicro/go-zero/rest/httpx"
)
-func GetEmployeeQueryOptionsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func GetUserQueryOptionsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- l := common.NewGetEmployeeQueryOptionsLogic(r.Context(), svcCtx)
- resp, err := l.GetEmployeeQueryOptions()
+ l := common.NewGetUserQueryOptionsLogic(r.Context(), svcCtx)
+ resp, err := l.GetUserQueryOptions()
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/crm/business/opportunity/assignemployeetoopportunityhandler.go b/internal/handler/admin/crm/business/opportunity/assignusertoopportunityhandler.go
similarity index 63%
rename from internal/handler/admin/crm/business/opportunity/assignemployeetoopportunityhandler.go
rename to internal/handler/admin/crm/business/opportunity/assignusertoopportunityhandler.go
index 48d96f0c..555052a8 100644
--- a/internal/handler/admin/crm/business/opportunity/assignemployeetoopportunityhandler.go
+++ b/internal/handler/admin/crm/business/opportunity/assignusertoopportunityhandler.go
@@ -9,16 +9,16 @@ import (
"github.com/zeromicro/go-zero/rest/httpx"
)
-func AssignEmployeeToOpportunityHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func AssignUserToOpportunityHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.AssignEmployeeToOpportunityRequest
+ var req types.AssignUserToOpportunityRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := opportunity.NewAssignEmployeeToOpportunityLogic(r.Context(), svcCtx)
- resp, err := l.AssignEmployeeToOpportunity(&req)
+ l := opportunity.NewAssignUserToOpportunityLogic(r.Context(), svcCtx)
+ resp, err := l.AssignUserToOpportunity(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/crm/customerdomain/customer/assigncustomertoemployeehandler.go b/internal/handler/admin/crm/customerdomain/customer/assigncustomertouserhandler.go
similarity index 65%
rename from internal/handler/admin/crm/customerdomain/customer/assigncustomertoemployeehandler.go
rename to internal/handler/admin/crm/customerdomain/customer/assigncustomertouserhandler.go
index fd40e3d7..9ec4d0b3 100644
--- a/internal/handler/admin/crm/customerdomain/customer/assigncustomertoemployeehandler.go
+++ b/internal/handler/admin/crm/customerdomain/customer/assigncustomertouserhandler.go
@@ -9,16 +9,16 @@ import (
"github.com/zeromicro/go-zero/rest/httpx"
)
-func AssignCustomerToEmployeeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func AssignCustomerToUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.AssignCustomerToEmployeeRequest
+ var req types.AssignCustomerToUserRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := customer.NewAssignCustomerToEmployeeLogic(r.Context(), svcCtx)
- resp, err := l.AssignCustomerToEmployee(&req)
+ l := customer.NewAssignCustomerToUserLogic(r.Context(), svcCtx)
+ resp, err := l.AssignCustomerToUser(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/crm/customerdomain/leader/assignleadtoemployeehandler.go b/internal/handler/admin/crm/customerdomain/leader/assignleadtouserhandler.go
similarity index 66%
rename from internal/handler/admin/crm/customerdomain/leader/assignleadtoemployeehandler.go
rename to internal/handler/admin/crm/customerdomain/leader/assignleadtouserhandler.go
index 7b064c20..e8fbb8a2 100644
--- a/internal/handler/admin/crm/customerdomain/leader/assignleadtoemployeehandler.go
+++ b/internal/handler/admin/crm/customerdomain/leader/assignleadtouserhandler.go
@@ -9,16 +9,16 @@ import (
"github.com/zeromicro/go-zero/rest/httpx"
)
-func AssignLeadToEmployeeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func AssignLeadToUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.AssignLeadToEmployeeRequest
+ var req types.AssignLeadToUserRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := leader.NewAssignLeadToEmployeeLogic(r.Context(), svcCtx)
- resp, err := l.AssignLeadToEmployee(&req)
+ l := leader.NewAssignLeadToUserLogic(r.Context(), svcCtx)
+ resp, err := l.AssignLeadToUser(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/customerdomain/customer/assigncustomertoemployeehandler.go b/internal/handler/admin/customerdomain/customer/assigncustomertouserhandler.go
similarity index 57%
rename from internal/handler/admin/customerdomain/customer/assigncustomertoemployeehandler.go
rename to internal/handler/admin/customerdomain/customer/assigncustomertouserhandler.go
index 863d1b39..3e59f316 100644
--- a/internal/handler/admin/customerdomain/customer/assigncustomertoemployeehandler.go
+++ b/internal/handler/admin/customerdomain/customer/assigncustomertouserhandler.go
@@ -1,24 +1,23 @@
package customer
import (
- "PowerX/internal/logic/admin/customerdomain/customer"
- "net/http"
-
+ "PowerX/internal/logic/admin/crm/customerdomain/customer"
"PowerX/internal/svc"
"PowerX/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
+ "net/http"
)
-func AssignCustomerToEmployeeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func AssignCustomerToUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.AssignCustomerToEmployeeRequest
+ var req types.AssignCustomerToUserRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := customer.NewAssignCustomerToEmployeeLogic(r.Context(), svcCtx)
- resp, err := l.AssignCustomerToEmployee(&req)
+ l := customer.NewAssignCustomerToUserLogic(r.Context(), svcCtx)
+ resp, err := l.AssignCustomerToUser(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/customerdomain/leader/assignleadtoemployeehandler.go b/internal/handler/admin/customerdomain/leader/assignleadtouserhandler.go
similarity index 58%
rename from internal/handler/admin/customerdomain/leader/assignleadtoemployeehandler.go
rename to internal/handler/admin/customerdomain/leader/assignleadtouserhandler.go
index 2e1c5a43..98b13438 100644
--- a/internal/handler/admin/customerdomain/leader/assignleadtoemployeehandler.go
+++ b/internal/handler/admin/customerdomain/leader/assignleadtouserhandler.go
@@ -1,7 +1,7 @@
package leader
import (
- "PowerX/internal/logic/admin/customerdomain/leader"
+ "PowerX/internal/logic/admin/crm/customerdomain/leader"
"net/http"
"PowerX/internal/svc"
@@ -9,16 +9,16 @@ import (
"github.com/zeromicro/go-zero/rest/httpx"
)
-func AssignLeadToEmployeeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func AssignLeadToUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.AssignLeadToEmployeeRequest
+ var req types.AssignLeadToUserRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := leader.NewAssignLeadToEmployeeLogic(r.Context(), svcCtx)
- resp, err := l.AssignLeadToEmployee(&req)
+ l := leader.NewAssignLeadToUserLogic(r.Context(), svcCtx)
+ resp, err := l.AssignLeadToUser(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/employee/createemployeehandler.go b/internal/handler/admin/employee/createemployeehandler.go
deleted file mode 100644
index c2d0a8d2..00000000
--- a/internal/handler/admin/employee/createemployeehandler.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package employee
-
-import (
- "net/http"
-
- "PowerX/internal/logic/admin/employee"
- "PowerX/internal/svc"
- "PowerX/internal/types"
- "github.com/zeromicro/go-zero/rest/httpx"
-)
-
-func CreateEmployeeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
- var req types.CreateEmployeeRequest
- if err := httpx.Parse(r, &req); err != nil {
- httpx.ErrorCtx(r.Context(), w, err)
- return
- }
-
- l := employee.NewCreateEmployeeLogic(r.Context(), svcCtx)
- resp, err := l.CreateEmployee(&req)
- if err != nil {
- httpx.ErrorCtx(r.Context(), w, err)
- } else {
- httpx.OkJsonCtx(r.Context(), w, resp)
- }
- }
-}
diff --git a/internal/handler/admin/employee/updateemployeehandler.go b/internal/handler/admin/employee/updateemployeehandler.go
deleted file mode 100644
index 11bc0b35..00000000
--- a/internal/handler/admin/employee/updateemployeehandler.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package employee
-
-import (
- "net/http"
-
- "PowerX/internal/logic/admin/employee"
- "PowerX/internal/svc"
- "PowerX/internal/types"
- "github.com/zeromicro/go-zero/rest/httpx"
-)
-
-func UpdateEmployeeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
- var req types.UpdateEmployeeRequest
- if err := httpx.Parse(r, &req); err != nil {
- httpx.ErrorCtx(r.Context(), w, err)
- return
- }
-
- l := employee.NewUpdateEmployeeLogic(r.Context(), svcCtx)
- resp, err := l.UpdateEmployee(&req)
- if err != nil {
- httpx.ErrorCtx(r.Context(), w, err)
- } else {
- httpx.OkJsonCtx(r.Context(), w, resp)
- }
- }
-}
diff --git a/internal/handler/admin/permission/setroleemployeeshandler.go b/internal/handler/admin/permission/getroleusershandler.go
similarity index 67%
rename from internal/handler/admin/permission/setroleemployeeshandler.go
rename to internal/handler/admin/permission/getroleusershandler.go
index 8937714c..6547733d 100644
--- a/internal/handler/admin/permission/setroleemployeeshandler.go
+++ b/internal/handler/admin/permission/getroleusershandler.go
@@ -9,16 +9,16 @@ import (
"github.com/zeromicro/go-zero/rest/httpx"
)
-func SetRoleEmployeesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func GetRoleUsersHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.SetRoleEmployeesRequest
+ var req types.GetRoleUsersReqeust
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := permission.NewSetRoleEmployeesLogic(r.Context(), svcCtx)
- resp, err := l.SetRoleEmployees(&req)
+ l := permission.NewGetRoleUsersLogic(r.Context(), svcCtx)
+ resp, err := l.GetRoleUsers(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/permission/getroleemployeeshandler.go b/internal/handler/admin/permission/setroleusershandler.go
similarity index 67%
rename from internal/handler/admin/permission/getroleemployeeshandler.go
rename to internal/handler/admin/permission/setroleusershandler.go
index a0434b78..f400003a 100644
--- a/internal/handler/admin/permission/getroleemployeeshandler.go
+++ b/internal/handler/admin/permission/setroleusershandler.go
@@ -9,16 +9,16 @@ import (
"github.com/zeromicro/go-zero/rest/httpx"
)
-func GetRoleEmployeesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func SetRoleUsersHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.GetRoleEmployeesReqeust
+ var req types.SetRoleUsersRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := permission.NewGetRoleEmployeesLogic(r.Context(), svcCtx)
- resp, err := l.GetRoleEmployees(&req)
+ l := permission.NewSetRoleUsersLogic(r.Context(), svcCtx)
+ resp, err := l.SetRoleUsers(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/scrm/organization/listweworkemployeepagehandler.go b/internal/handler/admin/scrm/organization/listweworkuserpagehandler.go
similarity index 65%
rename from internal/handler/admin/scrm/organization/listweworkemployeepagehandler.go
rename to internal/handler/admin/scrm/organization/listweworkuserpagehandler.go
index 7fcbb57f..2301e9c4 100644
--- a/internal/handler/admin/scrm/organization/listweworkemployeepagehandler.go
+++ b/internal/handler/admin/scrm/organization/listweworkuserpagehandler.go
@@ -9,16 +9,16 @@ import (
"github.com/zeromicro/go-zero/rest/httpx"
)
-func ListWeWorkEmployeePageHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func ListWeWorkUserPageHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.ListWeWorkEmployeeReqeust
+ var req types.ListWeWorkUserReqeust
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := organization.NewListWeWorkEmployeePageLogic(r.Context(), svcCtx)
- resp, err := l.ListWeWorkEmployeePage(&req)
+ l := organization.NewListWeWorkUserPageLogic(r.Context(), svcCtx)
+ resp, err := l.ListWeWorkUserPage(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/scrm/organization/syncweworkemployeehandler.go b/internal/handler/admin/scrm/organization/syncweworkuserhandler.go
similarity index 64%
rename from internal/handler/admin/scrm/organization/syncweworkemployeehandler.go
rename to internal/handler/admin/scrm/organization/syncweworkuserhandler.go
index 13bd6e69..bc0a6054 100644
--- a/internal/handler/admin/scrm/organization/syncweworkemployeehandler.go
+++ b/internal/handler/admin/scrm/organization/syncweworkuserhandler.go
@@ -8,10 +8,10 @@ import (
"github.com/zeromicro/go-zero/rest/httpx"
)
-func SyncWeWorkEmployeeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func SyncWeWorkUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- l := organization.NewSyncWeWorkEmployeeLogic(r.Context(), svcCtx)
- resp, err := l.SyncWeWorkEmployee()
+ l := organization.NewSyncWeWorkUserLogic(r.Context(), svcCtx)
+ resp, err := l.SyncWeWorkUser()
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/employee/getemployeehandler.go b/internal/handler/admin/user/createuserhandler.go
similarity index 60%
rename from internal/handler/admin/employee/getemployeehandler.go
rename to internal/handler/admin/user/createuserhandler.go
index 924d7e6e..73943dd4 100644
--- a/internal/handler/admin/employee/getemployeehandler.go
+++ b/internal/handler/admin/user/createuserhandler.go
@@ -1,24 +1,24 @@
-package employee
+package user
import (
"net/http"
- "PowerX/internal/logic/admin/employee"
+ "PowerX/internal/logic/admin/user"
"PowerX/internal/svc"
"PowerX/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)
-func GetEmployeeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func CreateUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.GetEmployeeRequest
+ var req types.CreateUserRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := employee.NewGetEmployeeLogic(r.Context(), svcCtx)
- resp, err := l.GetEmployee(&req)
+ l := user.NewCreateUserLogic(r.Context(), svcCtx)
+ resp, err := l.CreateUser(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/employee/syncemployeeshandler.go b/internal/handler/admin/user/deleteuserhandler.go
similarity index 59%
rename from internal/handler/admin/employee/syncemployeeshandler.go
rename to internal/handler/admin/user/deleteuserhandler.go
index 0f02e89e..76400a8b 100644
--- a/internal/handler/admin/employee/syncemployeeshandler.go
+++ b/internal/handler/admin/user/deleteuserhandler.go
@@ -1,24 +1,24 @@
-package employee
+package user
import (
"net/http"
- "PowerX/internal/logic/admin/employee"
+ "PowerX/internal/logic/admin/user"
"PowerX/internal/svc"
"PowerX/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)
-func SyncEmployeesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func DeleteUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.SyncEmployeesRequest
+ var req types.DeleteUserRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := employee.NewSyncEmployeesLogic(r.Context(), svcCtx)
- resp, err := l.SyncEmployees(&req)
+ l := user.NewDeleteUserLogic(r.Context(), svcCtx)
+ resp, err := l.DeleteUser(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/employee/listemployeeshandler.go b/internal/handler/admin/user/getuserhandler.go
similarity index 59%
rename from internal/handler/admin/employee/listemployeeshandler.go
rename to internal/handler/admin/user/getuserhandler.go
index c0ea3be5..d255ad63 100644
--- a/internal/handler/admin/employee/listemployeeshandler.go
+++ b/internal/handler/admin/user/getuserhandler.go
@@ -1,24 +1,24 @@
-package employee
+package user
import (
"net/http"
- "PowerX/internal/logic/admin/employee"
+ "PowerX/internal/logic/admin/user"
"PowerX/internal/svc"
"PowerX/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)
-func ListEmployeesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func GetUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.ListEmployeesRequest
+ var req types.GetUserRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := employee.NewListEmployeesLogic(r.Context(), svcCtx)
- resp, err := l.ListEmployees(&req)
+ l := user.NewGetUserLogic(r.Context(), svcCtx)
+ resp, err := l.GetUser(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/employee/deleteemployeehandler.go b/internal/handler/admin/user/listusershandler.go
similarity index 59%
rename from internal/handler/admin/employee/deleteemployeehandler.go
rename to internal/handler/admin/user/listusershandler.go
index 0ada02c1..c7d5b14d 100644
--- a/internal/handler/admin/employee/deleteemployeehandler.go
+++ b/internal/handler/admin/user/listusershandler.go
@@ -1,24 +1,24 @@
-package employee
+package user
import (
"net/http"
- "PowerX/internal/logic/admin/employee"
+ "PowerX/internal/logic/admin/user"
"PowerX/internal/svc"
"PowerX/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)
-func DeleteEmployeeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+func ListUsersHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- var req types.DeleteEmployeeRequest
+ var req types.ListUsersRequest
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
- l := employee.NewDeleteEmployeeLogic(r.Context(), svcCtx)
- resp, err := l.DeleteEmployee(&req)
+ l := user.NewListUsersLogic(r.Context(), svcCtx)
+ resp, err := l.ListUsers(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
diff --git a/internal/handler/admin/employee/resetpasswordhandler.go b/internal/handler/admin/user/resetpasswordhandler.go
similarity index 82%
rename from internal/handler/admin/employee/resetpasswordhandler.go
rename to internal/handler/admin/user/resetpasswordhandler.go
index 9c7545ed..3a1a2b20 100644
--- a/internal/handler/admin/employee/resetpasswordhandler.go
+++ b/internal/handler/admin/user/resetpasswordhandler.go
@@ -1,9 +1,9 @@
-package employee
+package user
import (
"net/http"
- "PowerX/internal/logic/admin/employee"
+ "PowerX/internal/logic/admin/user"
"PowerX/internal/svc"
"PowerX/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
@@ -17,7 +17,7 @@ func ResetPasswordHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return
}
- l := employee.NewResetPasswordLogic(r.Context(), svcCtx)
+ l := user.NewResetPasswordLogic(r.Context(), svcCtx)
resp, err := l.ResetPassword(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
diff --git a/internal/handler/admin/user/syncusershandler.go b/internal/handler/admin/user/syncusershandler.go
new file mode 100644
index 00000000..693abe97
--- /dev/null
+++ b/internal/handler/admin/user/syncusershandler.go
@@ -0,0 +1,28 @@
+package user
+
+import (
+ "net/http"
+
+ "PowerX/internal/logic/admin/user"
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+ "github.com/zeromicro/go-zero/rest/httpx"
+)
+
+func SyncUsersHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+ return func(w http.ResponseWriter, r *http.Request) {
+ var req types.SyncUsersRequest
+ if err := httpx.Parse(r, &req); err != nil {
+ httpx.ErrorCtx(r.Context(), w, err)
+ return
+ }
+
+ l := user.NewSyncUsersLogic(r.Context(), svcCtx)
+ resp, err := l.SyncUsers(&req)
+ if err != nil {
+ httpx.ErrorCtx(r.Context(), w, err)
+ } else {
+ httpx.OkJsonCtx(r.Context(), w, resp)
+ }
+ }
+}
diff --git a/internal/handler/admin/user/updateuserhandler.go b/internal/handler/admin/user/updateuserhandler.go
new file mode 100644
index 00000000..577ab2ef
--- /dev/null
+++ b/internal/handler/admin/user/updateuserhandler.go
@@ -0,0 +1,28 @@
+package user
+
+import (
+ "net/http"
+
+ "PowerX/internal/logic/admin/user"
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+ "github.com/zeromicro/go-zero/rest/httpx"
+)
+
+func UpdateUserHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+ return func(w http.ResponseWriter, r *http.Request) {
+ var req types.UpdateUserRequest
+ if err := httpx.Parse(r, &req); err != nil {
+ httpx.ErrorCtx(r.Context(), w, err)
+ return
+ }
+
+ l := user.NewUpdateUserLogic(r.Context(), svcCtx)
+ resp, err := l.UpdateUser(&req)
+ 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 c80c3170..836167fc 100644
--- a/internal/handler/routes.go
+++ b/internal/handler/routes.go
@@ -31,7 +31,7 @@ import (
admincrmtradewarehouse "PowerX/internal/handler/admin/crm/trade/warehouse"
admindepartment "PowerX/internal/handler/admin/department"
admindictionary "PowerX/internal/handler/admin/dictionary"
- adminemployee "PowerX/internal/handler/admin/employee"
+ 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"
@@ -89,17 +89,17 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeNoPermJWTAuth},
+ []rest.Middleware{serverCtx.UserNoPermJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
- Path: "/options/employees",
- Handler: admincommon.GetEmployeeOptionsHandler(serverCtx),
+ Path: "/options/users",
+ Handler: admincommon.GetUserOptionsHandler(serverCtx),
},
{
Method: http.MethodGet,
- Path: "/options/employee-query",
- Handler: admincommon.GetEmployeeQueryOptionsHandler(serverCtx),
+ Path: "/options/user-query",
+ Handler: admincommon.GetUserQueryOptionsHandler(serverCtx),
},
{
Method: http.MethodGet,
@@ -118,7 +118,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -152,7 +152,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodPost,
@@ -186,51 +186,51 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodPost,
- Path: "/employees/actions/sync",
- Handler: adminemployee.SyncEmployeesHandler(serverCtx),
+ Path: "/users/actions/sync",
+ Handler: adminuser.SyncUsersHandler(serverCtx),
},
{
Method: http.MethodGet,
- Path: "/employees/:id",
- Handler: adminemployee.GetEmployeeHandler(serverCtx),
+ Path: "/users/:id",
+ Handler: adminuser.GetUserHandler(serverCtx),
},
{
Method: http.MethodGet,
- Path: "/employees",
- Handler: adminemployee.ListEmployeesHandler(serverCtx),
+ Path: "/users",
+ Handler: adminuser.ListUsersHandler(serverCtx),
},
{
Method: http.MethodPost,
- Path: "/employees",
- Handler: adminemployee.CreateEmployeeHandler(serverCtx),
+ Path: "/users",
+ Handler: adminuser.CreateUserHandler(serverCtx),
},
{
Method: http.MethodPatch,
- Path: "/employees/:id",
- Handler: adminemployee.UpdateEmployeeHandler(serverCtx),
+ Path: "/users/:id",
+ Handler: adminuser.UpdateUserHandler(serverCtx),
},
{
Method: http.MethodDelete,
- Path: "/employees/:id",
- Handler: adminemployee.DeleteEmployeeHandler(serverCtx),
+ Path: "/users/:id",
+ Handler: adminuser.DeleteUserHandler(serverCtx),
},
{
Method: http.MethodPost,
- Path: "/employees/actions/reset-password",
- Handler: adminemployee.ResetPasswordHandler(serverCtx),
+ Path: "/users/actions/reset-password",
+ Handler: adminuser.ResetPasswordHandler(serverCtx),
},
}...,
),
- rest.WithPrefix("/api/v1/admin/employee"),
+ rest.WithPrefix("/api/v1/admin/user"),
)
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -255,7 +255,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
{
Method: http.MethodGet,
Path: "/roles/:roleCode/users",
- Handler: adminpermission.GetRoleEmployeesHandler(serverCtx),
+ Handler: adminpermission.GetRoleUsersHandler(serverCtx),
},
{
Method: http.MethodPost,
@@ -269,8 +269,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
},
{
Method: http.MethodPost,
- Path: "/roles/:roleCode/actions/set-employees",
- Handler: adminpermission.SetRoleEmployeesHandler(serverCtx),
+ Path: "/roles/:roleCode/actions/set-users",
+ Handler: adminpermission.SetRoleUsersHandler(serverCtx),
},
{
Method: http.MethodPost,
@@ -300,7 +300,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -364,7 +364,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -388,7 +388,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -427,7 +427,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -466,7 +466,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -500,8 +500,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
},
{
Method: http.MethodPost,
- Path: "/leads/:id/actions/employees",
- Handler: admincrmcustomerdomainleader.AssignLeadToEmployeeHandler(serverCtx),
+ Path: "/leads/:id/actions/users",
+ Handler: admincrmcustomerdomainleader.AssignLeadToUserHandler(serverCtx),
},
}...,
),
@@ -510,7 +510,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -544,8 +544,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
},
{
Method: http.MethodPost,
- Path: "/customers/:id/actions/employees",
- Handler: admincrmcustomerdomaincustomer.AssignCustomerToEmployeeHandler(serverCtx),
+ Path: "/customers/:id/actions/users",
+ Handler: admincrmcustomerdomaincustomer.AssignCustomerToUserHandler(serverCtx),
},
}...,
),
@@ -554,7 +554,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -598,7 +598,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -612,7 +612,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -646,7 +646,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -685,7 +685,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -719,7 +719,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -733,8 +733,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
},
{
Method: http.MethodPut,
- Path: "/opportunities/:id/assign-employee",
- Handler: admincrmbusinessopportunity.AssignEmployeeToOpportunityHandler(serverCtx),
+ Path: "/opportunities/:id/assign-user",
+ Handler: admincrmbusinessopportunity.AssignUserToOpportunityHandler(serverCtx),
},
{
Method: http.MethodPut,
@@ -753,7 +753,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -782,7 +782,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -831,7 +831,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -865,7 +865,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -904,7 +904,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -948,7 +948,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -992,7 +992,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1026,7 +1026,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1065,7 +1065,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1104,7 +1104,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1143,7 +1143,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1182,7 +1182,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1221,7 +1221,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1260,7 +1260,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1299,17 +1299,17 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodPost,
- Path: "/employee/page",
- Handler: adminscrmorganization.ListWeWorkEmployeePageHandler(serverCtx),
+ Path: "/user/page",
+ Handler: adminscrmorganization.ListWeWorkUserPageHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/sync",
- Handler: adminscrmorganization.SyncWeWorkEmployeeHandler(serverCtx),
+ Handler: adminscrmorganization.SyncWeWorkUserHandler(serverCtx),
},
}...,
),
@@ -1318,7 +1318,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodPost,
@@ -1332,7 +1332,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1356,7 +1356,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1375,7 +1375,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodPost,
@@ -1389,7 +1389,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodPost,
@@ -1408,7 +1408,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodPost,
@@ -1427,7 +1427,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodPost,
@@ -1441,7 +1441,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodPost,
@@ -1460,7 +1460,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodPost,
@@ -1504,7 +1504,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1563,7 +1563,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1592,7 +1592,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodPost,
@@ -1794,7 +1794,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1917,7 +1917,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
@@ -1966,7 +1966,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
- []rest.Middleware{serverCtx.EmployeeJWTAuth},
+ []rest.Middleware{serverCtx.UserJWTAuth},
[]rest.Route{
{
Method: http.MethodGet,
diff --git a/internal/logic/admin/auth/loginlogic.go b/internal/logic/admin/auth/loginlogic.go
index bb8a3e4f..c1b6f862 100644
--- a/internal/logic/admin/auth/loginlogic.go
+++ b/internal/logic/admin/auth/loginlogic.go
@@ -32,30 +32,30 @@ func (l *LoginLogic) Login(req *types.LoginRequest) (resp *types.LoginReply, err
if err != nil {
panic(err)
}
- opt := option.EmployeeLoginOption{
+ opt := option.UserLoginOption{
Account: req.UserName,
PhoneNumber: req.PhoneNumber,
Email: req.Email,
}
- employee, err := l.svcCtx.PowerX.Organization.FindOneEmployeeByLoginOption(l.ctx, &opt)
+ user, err := l.svcCtx.PowerX.Organization.FindOneUserByLoginOption(l.ctx, &opt)
if err != nil {
return nil, errorx.WithCause(errorx.ErrBadRequest, "账户或密码错误")
}
- if !l.svcCtx.PowerX.Organization.VerifyPassword(employee.Password, req.Password) {
+ if !l.svcCtx.PowerX.Organization.VerifyPassword(user.Password, req.Password) {
return nil, errorx.WithCause(errorx.ErrBadRequest, "账户或密码错误")
}
- roles, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetRolesForUser(employee.Account)
+ roles, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetRolesForUser(user.Account)
claims := types.TokenClaims{
- UID: employee.Id,
- Account: employee.Account,
+ UID: user.Id,
+ Account: user.Account,
Roles: roles,
RegisteredClaims: &jwt.RegisteredClaims{
Issuer: "powerx",
- Subject: employee.Account,
+ Subject: user.Account,
ExpiresAt: jwt.NewNumericDate(time.Now().Add(time.Hour * 72)),
IssuedAt: jwt.NewNumericDate(time.Now()),
},
diff --git a/internal/logic/admin/common/getemployeeoptionslogic.go b/internal/logic/admin/common/getemployeeoptionslogic.go
deleted file mode 100644
index d4cf3407..00000000
--- a/internal/logic/admin/common/getemployeeoptionslogic.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package common
-
-import (
- "PowerX/internal/model/option"
- "context"
-
- "PowerX/internal/svc"
- "PowerX/internal/types"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type GetEmployeeOptionsLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewGetEmployeeOptionsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetEmployeeOptionsLogic {
- return &GetEmployeeOptionsLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-func (l *GetEmployeeOptionsLogic) GetEmployeeOptions(req *types.GetEmployeeOptionsRequest) (resp *types.GetEmployeeOptionsReply, err error) {
- employeePage := l.svcCtx.PowerX.Organization.FindManyEmployeesPage(l.ctx, &option.FindManyEmployeesOption{
- LikeName: req.LikeName,
- LikeEmail: req.LikeEmail,
- LikePhoneNumber: req.LikePhoneNumber,
- })
-
- resp = &types.GetEmployeeOptionsReply{
- PageIndex: employeePage.PageIndex,
- PageSize: employeePage.PageSize,
- Total: employeePage.Total,
- }
-
- var list []types.EmployeeOption
- for _, employee := range employeePage.List {
- list = append(list, types.EmployeeOption{
- Id: employee.Id,
- Avatar: employee.Avatar,
- Account: employee.Account,
- Name: employee.Name,
- Email: employee.Email,
- PhoneNumber: employee.MobilePhone,
- })
- }
- resp.List = list
-
- return
-}
diff --git a/internal/logic/admin/common/getuseroptionslogic.go b/internal/logic/admin/common/getuseroptionslogic.go
new file mode 100644
index 00000000..a2aa45a8
--- /dev/null
+++ b/internal/logic/admin/common/getuseroptionslogic.go
@@ -0,0 +1,54 @@
+package common
+
+import (
+ "PowerX/internal/model/option"
+ "context"
+
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type GetUserOptionsLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+func NewGetUserOptionsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserOptionsLogic {
+ return &GetUserOptionsLogic{
+ Logger: logx.WithContext(ctx),
+ ctx: ctx,
+ svcCtx: svcCtx,
+ }
+}
+
+func (l *GetUserOptionsLogic) GetUserOptions(req *types.GetUserOptionsRequest) (resp *types.GetUserOptionsReply, err error) {
+ userPage := l.svcCtx.PowerX.Organization.FindManyUsersPage(l.ctx, &option.FindManyUsersOption{
+ LikeName: req.LikeName,
+ LikeEmail: req.LikeEmail,
+ LikePhoneNumber: req.LikePhoneNumber,
+ })
+
+ resp = &types.GetUserOptionsReply{
+ PageIndex: userPage.PageIndex,
+ PageSize: userPage.PageSize,
+ Total: userPage.Total,
+ }
+
+ var list []types.UserOption
+ for _, user := range userPage.List {
+ list = append(list, types.UserOption{
+ Id: user.Id,
+ Avatar: user.Avatar,
+ Account: user.Account,
+ Name: user.Name,
+ Email: user.Email,
+ PhoneNumber: user.MobilePhone,
+ })
+ }
+ resp.List = list
+
+ return
+}
diff --git a/internal/logic/admin/common/getemployeequeryoptionslogic.go b/internal/logic/admin/common/getuserqueryoptionslogic.go
similarity index 53%
rename from internal/logic/admin/common/getemployeequeryoptionslogic.go
rename to internal/logic/admin/common/getuserqueryoptionslogic.go
index d566a111..964741d7 100644
--- a/internal/logic/admin/common/getemployeequeryoptionslogic.go
+++ b/internal/logic/admin/common/getuserqueryoptionslogic.go
@@ -9,26 +9,26 @@ import (
"github.com/zeromicro/go-zero/core/logx"
)
-type GetEmployeeQueryOptionsLogic struct {
+type GetUserQueryOptionsLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
-func NewGetEmployeeQueryOptionsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetEmployeeQueryOptionsLogic {
- return &GetEmployeeQueryOptionsLogic{
+func NewGetUserQueryOptionsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserQueryOptionsLogic {
+ return &GetUserQueryOptionsLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
-func (l *GetEmployeeQueryOptionsLogic) GetEmployeeQueryOptions() (resp *types.GetEmployeeQueryOptionsReply, err error) {
- resp = &types.GetEmployeeQueryOptionsReply{}
+func (l *GetUserQueryOptionsLogic) GetUserQueryOptions() (resp *types.GetUserQueryOptionsReply, err error) {
+ resp = &types.GetUserQueryOptionsReply{}
roles := l.svcCtx.PowerX.AdminAuthorization.FindAllRoles(l.ctx)
for _, role := range roles {
- resp.Roles = append(resp.Roles, types.EmployeeQueryRoleOption{
+ resp.Roles = append(resp.Roles, types.UserQueryRoleOption{
RoleCode: role.RoleCode,
RoleName: role.Name,
})
@@ -36,7 +36,7 @@ func (l *GetEmployeeQueryOptionsLogic) GetEmployeeQueryOptions() (resp *types.Ge
deps := l.svcCtx.PowerX.Organization.FindAllDepartments(l.ctx)
for _, dep := range deps {
- resp.Departments = append(resp.Departments, types.EmployeeQueryDepartmentOption{
+ resp.Departments = append(resp.Departments, types.UserQueryDepartmentOption{
DepartmentId: dep.Id,
DepartmentName: dep.Name,
})
diff --git a/internal/logic/admin/crm/business/opportunity/assignemployeetoopportunitylogic.go b/internal/logic/admin/crm/business/opportunity/assignemployeetoopportunitylogic.go
deleted file mode 100644
index 7cb25a41..00000000
--- a/internal/logic/admin/crm/business/opportunity/assignemployeetoopportunitylogic.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package opportunity
-
-import (
- "context"
-
- "PowerX/internal/svc"
- "PowerX/internal/types"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type AssignEmployeeToOpportunityLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewAssignEmployeeToOpportunityLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AssignEmployeeToOpportunityLogic {
- return &AssignEmployeeToOpportunityLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-func (l *AssignEmployeeToOpportunityLogic) AssignEmployeeToOpportunity(req *types.AssignEmployeeToOpportunityRequest) (resp *types.AssignEmployeeToOpportunityReply, err error) {
- // todo: add your logic here and delete this line
-
- return
-}
diff --git a/internal/logic/admin/crm/business/opportunity/assignusertoopportunitylogic.go b/internal/logic/admin/crm/business/opportunity/assignusertoopportunitylogic.go
new file mode 100644
index 00000000..f2d6a221
--- /dev/null
+++ b/internal/logic/admin/crm/business/opportunity/assignusertoopportunitylogic.go
@@ -0,0 +1,30 @@
+package opportunity
+
+import (
+ "context"
+
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type AssignUserToOpportunityLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+func NewAssignUserToOpportunityLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AssignUserToOpportunityLogic {
+ return &AssignUserToOpportunityLogic{
+ Logger: logx.WithContext(ctx),
+ ctx: ctx,
+ svcCtx: svcCtx,
+ }
+}
+
+func (l *AssignUserToOpportunityLogic) AssignUserToOpportunity(req *types.AssignUserToOpportunityRequest) (resp *types.AssignUserToOpportunityReply, err error) {
+ // todo: add your logic here and delete this line
+
+ return
+}
diff --git a/internal/logic/admin/crm/customerdomain/customer/assigncustomertoemployeelogic.go b/internal/logic/admin/crm/customerdomain/customer/assigncustomertoemployeelogic.go
deleted file mode 100644
index b585c671..00000000
--- a/internal/logic/admin/crm/customerdomain/customer/assigncustomertoemployeelogic.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package customer
-
-import (
- "context"
-
- "PowerX/internal/svc"
- "PowerX/internal/types"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type AssignCustomerToEmployeeLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewAssignCustomerToEmployeeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AssignCustomerToEmployeeLogic {
- return &AssignCustomerToEmployeeLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-func (l *AssignCustomerToEmployeeLogic) AssignCustomerToEmployee(req *types.AssignCustomerToEmployeeRequest) (resp *types.AssignCustomerToEmployeeReply, err error) {
- // todo: add your logic here and delete this line
-
- return
-}
diff --git a/internal/logic/admin/crm/customerdomain/customer/assigncustomertouserlogic.go b/internal/logic/admin/crm/customerdomain/customer/assigncustomertouserlogic.go
new file mode 100644
index 00000000..70d37e5f
--- /dev/null
+++ b/internal/logic/admin/crm/customerdomain/customer/assigncustomertouserlogic.go
@@ -0,0 +1,30 @@
+package customer
+
+import (
+ "context"
+
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type AssignCustomerToUserLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+func NewAssignCustomerToUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AssignCustomerToUserLogic {
+ return &AssignCustomerToUserLogic{
+ Logger: logx.WithContext(ctx),
+ ctx: ctx,
+ svcCtx: svcCtx,
+ }
+}
+
+func (l *AssignCustomerToUserLogic) AssignCustomerToUser(req *types.AssignCustomerToUserRequest) (resp *types.AssignCustomerToUserReply, err error) {
+ // todo: add your logic here and delete this line
+
+ return
+}
diff --git a/internal/logic/admin/crm/customerdomain/leader/assignleadtoemployeelogic.go b/internal/logic/admin/crm/customerdomain/leader/assignleadtoemployeelogic.go
deleted file mode 100644
index 2b69580e..00000000
--- a/internal/logic/admin/crm/customerdomain/leader/assignleadtoemployeelogic.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package leader
-
-import (
- "context"
-
- "PowerX/internal/svc"
- "PowerX/internal/types"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type AssignLeadToEmployeeLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewAssignLeadToEmployeeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AssignLeadToEmployeeLogic {
- return &AssignLeadToEmployeeLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-func (l *AssignLeadToEmployeeLogic) AssignLeadToEmployee(req *types.AssignLeadToEmployeeRequest) (resp *types.AssignLeadToEmployeeReply, err error) {
- // todo: add your logic here and delete this line
-
- return
-}
diff --git a/internal/logic/admin/crm/customerdomain/leader/assignleadtouserlogic.go b/internal/logic/admin/crm/customerdomain/leader/assignleadtouserlogic.go
new file mode 100644
index 00000000..aa1da8ec
--- /dev/null
+++ b/internal/logic/admin/crm/customerdomain/leader/assignleadtouserlogic.go
@@ -0,0 +1,30 @@
+package leader
+
+import (
+ "context"
+
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type AssignLeadToUserLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+func NewAssignLeadToUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AssignLeadToUserLogic {
+ return &AssignLeadToUserLogic{
+ Logger: logx.WithContext(ctx),
+ ctx: ctx,
+ svcCtx: svcCtx,
+ }
+}
+
+func (l *AssignLeadToUserLogic) AssignLeadToUser(req *types.AssignLeadToUserRequest) (resp *types.AssignLeadToUserReply, err error) {
+ // todo: add your logic here and delete this line
+
+ return
+}
diff --git a/internal/logic/admin/crm/market/store/createstorelogic.go b/internal/logic/admin/crm/market/store/createstorelogic.go
index 46ec690c..4649cdaa 100644
--- a/internal/logic/admin/crm/market/store/createstorelogic.go
+++ b/internal/logic/admin/crm/market/store/createstorelogic.go
@@ -53,16 +53,16 @@ func TransformRequestToStore(storeRequest *types.Store) (mdlStore *market.Store)
startWork := carbon.ParseByFormat(storeRequest.StartWork, carbonx.TimeFormat)
endWork := carbon.ParseByFormat(storeRequest.EndWork, carbonx.TimeFormat)
return &market.Store{
- StoreEmployeeId: storeRequest.StoreEmployeeId,
- Name: storeRequest.Name,
- ContactNumber: storeRequest.ContactNumber,
- CoverImageId: storeRequest.CoverImageId,
- Email: storeRequest.Email,
- Address: storeRequest.Address,
- Description: storeRequest.Description,
- Longitude: storeRequest.Longitude,
- Latitude: storeRequest.Latitude,
- StartWork: startWork.ToStdTime(),
- EndWork: endWork.ToStdTime(),
+ StoreUserId: storeRequest.StoreUserId,
+ Name: storeRequest.Name,
+ ContactNumber: storeRequest.ContactNumber,
+ CoverImageId: storeRequest.CoverImageId,
+ Email: storeRequest.Email,
+ Address: storeRequest.Address,
+ Description: storeRequest.Description,
+ Longitude: storeRequest.Longitude,
+ Latitude: storeRequest.Latitude,
+ StartWork: startWork.ToStdTime(),
+ EndWork: endWork.ToStdTime(),
}
}
diff --git a/internal/logic/admin/crm/market/store/getstorelogic.go b/internal/logic/admin/crm/market/store/getstorelogic.go
index d7cf0555..3289d8bb 100644
--- a/internal/logic/admin/crm/market/store/getstorelogic.go
+++ b/internal/logic/admin/crm/market/store/getstorelogic.go
@@ -49,7 +49,7 @@ func TransformArtisansToShopArtisans(artisans []*product2.Artisan) []*types.Stor
func TransformArtisanToShopArtisan(artisan *product2.Artisan) *types.StoreArtisan {
return &types.StoreArtisan{
- EmployeeId: artisan.EmployeeId,
+ UserId: artisan.UserId,
Name: artisan.Name,
Level: artisan.Level,
Gender: artisan.Gender,
diff --git a/internal/logic/admin/crm/market/store/liststorespagelogic.go b/internal/logic/admin/crm/market/store/liststorespagelogic.go
index 63e85ccd..75d4c7d7 100644
--- a/internal/logic/admin/crm/market/store/liststorespagelogic.go
+++ b/internal/logic/admin/crm/market/store/liststorespagelogic.go
@@ -63,21 +63,21 @@ func TransformStoresToReply(stores []*product2.Store) []*types.Store {
func TransformStoreToReply(store *product2.Store) *types.Store {
arrayDetailImageIds, _ := media.GetImageIds(store.PivotDetailImages)
return &types.Store{
- Id: store.Id,
- Name: store.Name,
- StoreEmployeeId: store.StoreEmployeeId,
- ContactNumber: store.ContactNumber,
- Address: store.Address,
- Description: store.Description,
- Longitude: store.Longitude,
- Latitude: store.Latitude,
- StartWork: store.StartWork.String(),
- EndWork: store.EndWork.String(),
- CreatedAt: store.CreatedAt.String(),
- CoverImageId: store.CoverImageId,
- CoverImage: mediaresource.TransformMediaResourceToReply(store.CoverImage),
- DetailImageIds: arrayDetailImageIds,
- DetailImages: mediaresource.TransformMediaResourcesToReply(store.PivotDetailImages),
- Artisans: TransformArtisansToShopArtisans(store.Artisans),
+ Id: store.Id,
+ Name: store.Name,
+ StoreUserId: store.StoreUserId,
+ ContactNumber: store.ContactNumber,
+ Address: store.Address,
+ Description: store.Description,
+ Longitude: store.Longitude,
+ Latitude: store.Latitude,
+ StartWork: store.StartWork.String(),
+ EndWork: store.EndWork.String(),
+ CreatedAt: store.CreatedAt.String(),
+ CoverImageId: store.CoverImageId,
+ CoverImage: mediaresource.TransformMediaResourceToReply(store.CoverImage),
+ DetailImageIds: arrayDetailImageIds,
+ DetailImages: mediaresource.TransformMediaResourcesToReply(store.PivotDetailImages),
+ Artisans: TransformArtisansToShopArtisans(store.Artisans),
}
}
diff --git a/internal/logic/admin/crm/product/artisan/createartisanlogic.go b/internal/logic/admin/crm/product/artisan/createartisanlogic.go
index 68201ac1..4b432d21 100644
--- a/internal/logic/admin/crm/product/artisan/createartisanlogic.go
+++ b/internal/logic/admin/crm/product/artisan/createartisanlogic.go
@@ -52,7 +52,7 @@ func TransformRequestToArtisan(artisanRequest *types.Artisan) (mdlArtisan *produ
birthday := carbon.Parse(artisanRequest.Birthday)
return &product.Artisan{
- EmployeeId: artisanRequest.EmployeeId,
+ UserId: artisanRequest.UserId,
Name: artisanRequest.Name,
Level: artisanRequest.Level,
Gender: artisanRequest.Gender,
diff --git a/internal/logic/admin/crm/product/artisan/listartisanspagelogic.go b/internal/logic/admin/crm/product/artisan/listartisanspagelogic.go
index 445a0b08..03d905a1 100644
--- a/internal/logic/admin/crm/product/artisan/listartisanspagelogic.go
+++ b/internal/logic/admin/crm/product/artisan/listartisanspagelogic.go
@@ -64,7 +64,7 @@ func TransformArtisanToReply(artisan *product.Artisan) *types.Artisan {
arrayDetailImageIds, _ := media.GetImageIds(artisan.PivotDetailImages)
return &types.Artisan{
Id: artisan.Id,
- EmployeeId: artisan.EmployeeId,
+ UserId: artisan.UserId,
Name: artisan.Name,
Level: artisan.Level,
Gender: artisan.Gender,
diff --git a/internal/logic/admin/department/deletedepartmentlogic.go b/internal/logic/admin/department/deletedepartmentlogic.go
index e7be66f2..00d6500b 100644
--- a/internal/logic/admin/department/deletedepartmentlogic.go
+++ b/internal/logic/admin/department/deletedepartmentlogic.go
@@ -35,7 +35,7 @@ func (l *DeleteDepartmentLogic) DeleteDepartment(req *types.DeleteDepartmentRequ
depIds = append(depIds, department.Id)
}
- if l.svcCtx.PowerX.Organization.CountEmployeeInDepartmentByIds(l.ctx, depIds) > 0 {
+ if l.svcCtx.PowerX.Organization.CountUserInDepartmentByIds(l.ctx, depIds) > 0 {
return nil, errorx.WithCause(errorx.ErrBadRequest, "删除失败, 要删除的部门下还有用户")
}
diff --git a/internal/logic/admin/employee/deleteemployeelogic.go b/internal/logic/admin/employee/deleteemployeelogic.go
deleted file mode 100644
index 8c929063..00000000
--- a/internal/logic/admin/employee/deleteemployeelogic.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package employee
-
-import (
- "context"
-
- "PowerX/internal/svc"
- "PowerX/internal/types"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type DeleteEmployeeLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewDeleteEmployeeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteEmployeeLogic {
- return &DeleteEmployeeLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-func (l *DeleteEmployeeLogic) DeleteEmployee(req *types.DeleteEmployeeRequest) (resp *types.DeleteEmployeeReply, err error) {
- err = l.svcCtx.PowerX.Organization.DeleteEmployeeById(l.ctx, req.Id)
- if err != nil {
- return nil, err
- }
- return &types.DeleteEmployeeReply{
- Id: req.Id,
- }, nil
-}
diff --git a/internal/logic/admin/employee/getemployeelogic.go b/internal/logic/admin/employee/getemployeelogic.go
deleted file mode 100644
index fb7e0258..00000000
--- a/internal/logic/admin/employee/getemployeelogic.go
+++ /dev/null
@@ -1,79 +0,0 @@
-package employee
-
-import (
- "PowerX/internal/model/origanzation"
- "PowerX/internal/model/permission"
- "PowerX/pkg/slicex"
- "context"
- "time"
-
- "PowerX/internal/svc"
- "PowerX/internal/types"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type GetEmployeeLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewGetEmployeeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetEmployeeLogic {
- return &GetEmployeeLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-func (l *GetEmployeeLogic) GetEmployee(req *types.GetEmployeeRequest) (resp *types.GetEmployeeReply, err error) {
- employee, err := l.svcCtx.PowerX.Organization.FindOneEmployeeById(l.ctx, req.Id)
- if err != nil {
- return nil, err
- }
-
- roles, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetRolesForUser(employee.Account)
-
- var dep *types.EmployeeDepartment
- if employee.Department != nil {
- dep = &types.EmployeeDepartment{
- DepId: employee.Department.Id,
- DepName: employee.Department.Name,
- }
- }
-
- vo := types.Employee{
- Id: employee.Id,
- Account: employee.Account,
- Name: employee.Name,
- Email: employee.Email,
- MobilePhone: employee.MobilePhone,
- Gender: employee.Gender,
- NickName: employee.NickName,
- Desc: employee.NickName,
- Avatar: employee.Avatar,
- ExternalEmail: employee.ExternalEmail,
- Department: dep,
- Roles: roles,
- JobTitle: employee.JobTitle,
- IsEnabled: employee.Status == origanzation.EmployeeStatusEnabled,
- CreatedAt: employee.CreatedAt.Format(time.RFC3339),
- }
- if employee.Position != nil {
- codes := slicex.SlicePluck(employee.Position.Roles, func(item *permission.AdminRole) string {
- return item.RoleCode
- })
- vo.Position = &types.Position{
- Id: employee.Position.Id,
- Name: employee.Position.Name,
- Desc: employee.Position.Desc,
- Level: employee.Position.Level,
- RoleCodes: codes,
- }
- vo.PositionId = employee.Position.Id
- }
- return &types.GetEmployeeReply{
- Employee: &vo,
- }, nil
-}
diff --git a/internal/logic/admin/employee/listemployeeslogic.go b/internal/logic/admin/employee/listemployeeslogic.go
deleted file mode 100644
index 06e34705..00000000
--- a/internal/logic/admin/employee/listemployeeslogic.go
+++ /dev/null
@@ -1,115 +0,0 @@
-package employee
-
-import (
- "PowerX/internal/model/option"
- "PowerX/internal/model/origanzation"
- "PowerX/internal/model/permission"
- "PowerX/pkg/slicex"
- "context"
- "time"
-
- "PowerX/internal/svc"
- "PowerX/internal/types"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type ListEmployeesLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewListEmployeesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListEmployeesLogic {
- return &ListEmployeesLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-func (l *ListEmployeesLogic) ListEmployees(req *types.ListEmployeesRequest) (resp *types.ListEmployeesReply, err error) {
- opt := option.FindManyEmployeesOption{
- Ids: req.Ids,
- LikeName: req.LikeName,
- LikeEmail: req.LikeEmail,
- DepIds: req.DepIds,
- PositionIDs: req.PositionIds,
- LikePhoneNumber: req.LikePhoneNumber,
- PageIndex: req.PageIndex,
- PageSize: req.PageSize,
- }
-
- if len(req.RoleCodes) > 0 {
- // bind roles opt, todo improve performance or remove it
- var accounts []string
- for _, code := range req.RoleCodes {
- as, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetUsersForRole(code)
- accounts = append(accounts, as...)
- }
- // 涉及角色查询, root账户会出现在所有角色筛选中
- accounts = append(accounts, "root")
- opt.Accounts = accounts
- }
- if req.IsEnabled != nil {
- if *req.IsEnabled {
- opt.Statuses = append(opt.Statuses, origanzation.EmployeeStatusEnabled)
- } else {
- opt.Statuses = append(opt.Statuses, origanzation.EmployeeStatusDisabled)
- }
- }
-
- employeePage := l.svcCtx.PowerX.Organization.FindManyEmployeesPage(l.ctx, &opt)
-
- // build vo
- var vos []types.Employee
- for _, employee := range employeePage.List {
- roles, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetRolesForUser(employee.Account)
- var dep *types.EmployeeDepartment
- if employee.Department != nil {
- dep = &types.EmployeeDepartment{
- DepId: employee.Department.Id,
- DepName: employee.Department.Name,
- }
- }
- vo := types.Employee{
- Id: employee.Id,
- Account: employee.Account,
- Name: employee.Name,
- Email: employee.Email,
- MobilePhone: employee.MobilePhone,
- Gender: employee.Gender,
- NickName: employee.NickName,
- Desc: employee.Desc,
- Avatar: employee.Avatar,
- ExternalEmail: employee.ExternalEmail,
- Department: dep,
- Roles: roles,
- JobTitle: employee.JobTitle,
- IsEnabled: employee.Status == origanzation.EmployeeStatusEnabled,
- CreatedAt: employee.CreatedAt.Format(time.RFC3339),
- }
- if employee.Position != nil {
- codes := slicex.SlicePluck(employee.Position.Roles, func(item *permission.AdminRole) string {
- return item.RoleCode
- })
- vo.Position = &types.Position{
- Id: employee.Position.Id,
- Name: employee.Position.Name,
- Desc: employee.Position.Desc,
- Level: employee.Position.Level,
- RoleCodes: codes,
- }
- vo.PositionId = employee.Position.Id
- }
-
- vos = append(vos, vo)
- }
-
- return &types.ListEmployeesReply{
- List: vos,
- PageIndex: employeePage.PageIndex,
- PageSize: employeePage.PageSize,
- Total: employeePage.Total,
- }, nil
-}
diff --git a/internal/logic/admin/employee/syncemployeeslogic.go b/internal/logic/admin/employee/syncemployeeslogic.go
deleted file mode 100644
index b3387fcd..00000000
--- a/internal/logic/admin/employee/syncemployeeslogic.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package employee
-
-import (
- "context"
-
- "PowerX/internal/svc"
- "PowerX/internal/types"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type SyncEmployeesLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewSyncEmployeesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SyncEmployeesLogic {
- return &SyncEmployeesLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-func (sync *SyncEmployeesLogic) SyncEmployees(req *types.SyncEmployeesRequest) (resp *types.SyncEmployeesReply, err error) {
- // todo: add your logic here and delete this line
-
- return
-}
diff --git a/internal/logic/admin/employee/updateemployeelogic.go b/internal/logic/admin/employee/updateemployeelogic.go
deleted file mode 100644
index 9ef69a12..00000000
--- a/internal/logic/admin/employee/updateemployeelogic.go
+++ /dev/null
@@ -1,93 +0,0 @@
-package employee
-
-import (
- "PowerX/internal/model/origanzation"
- "PowerX/internal/types"
- "context"
- "github.com/pkg/errors"
- "time"
-
- "PowerX/internal/model"
- "PowerX/internal/svc"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type UpdateEmployeeLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewUpdateEmployeeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateEmployeeLogic {
- return &UpdateEmployeeLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-func (l *UpdateEmployeeLogic) UpdateEmployee(req *types.UpdateEmployeeRequest) (resp *types.UpdateEmployeeReply, err error) {
- employee := origanzation.Employee{
- Model: model.Model{
- Id: req.Id,
- },
- Name: req.Name,
- NickName: req.NickName,
- Desc: req.Desc,
- PositionID: req.PositionId,
- JobTitle: req.JobTitle,
- DepartmentId: req.DepId,
- MobilePhone: req.MobilePhone,
- Gender: req.Gender,
- Email: req.Email,
- ExternalEmail: req.ExternalEmail,
- Avatar: req.Avatar,
- Password: req.Password,
- Status: req.Status,
- }
-
- if err = employee.HashPassword(); err != nil {
- panic(errors.Wrap(err, "create employee hash password failed"))
- }
-
- if err := l.svcCtx.PowerX.Organization.UpdateEmployeeById(l.ctx, &employee, req.Id); err != nil {
- return nil, err
- }
-
- // 根据职位更新角色
- if employee.PositionID != 0 {
- codes, err := l.svcCtx.PowerX.Organization.FindEmployeePositionRoleCodes(l.ctx, employee.Id)
- if err != nil {
- panic(err)
- }
- if _, err := l.svcCtx.PowerX.AdminAuthorization.Casbin.DeleteRolesForUser(employee.Account); err != nil {
- panic(err)
- }
- if _, err := l.svcCtx.PowerX.AdminAuthorization.Casbin.AddRolesForUser(employee.Account, codes); err != nil {
- panic(err)
- }
- }
-
- roles, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetRolesForUser(employee.Account)
-
- return &types.UpdateEmployeeReply{
- Employee: &types.Employee{
- Id: employee.Id,
- Account: employee.Account,
- Name: employee.Name,
- Email: employee.Email,
- MobilePhone: employee.MobilePhone,
- Gender: employee.Gender,
- NickName: employee.NickName,
- Desc: employee.Desc,
- Avatar: employee.Avatar,
- ExternalEmail: employee.ExternalEmail,
- Roles: roles,
- PositionId: employee.PositionID,
- JobTitle: employee.JobTitle,
- IsEnabled: employee.Status == origanzation.EmployeeStatusEnabled,
- CreatedAt: employee.CreatedAt.Format(time.RFC3339),
- },
- }, nil
-}
diff --git a/internal/logic/admin/permission/getroleemployeeslogic.go b/internal/logic/admin/permission/getroleemployeeslogic.go
deleted file mode 100644
index d710de15..00000000
--- a/internal/logic/admin/permission/getroleemployeeslogic.go
+++ /dev/null
@@ -1,72 +0,0 @@
-package permission
-
-import (
- "PowerX/internal/model/option"
- "context"
-
- "PowerX/internal/svc"
- "PowerX/internal/types"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type GetRoleEmployeesLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewGetRoleEmployeesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetRoleEmployeesLogic {
- return &GetRoleEmployeesLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-func (l *GetRoleEmployeesLogic) GetRoleEmployees(req *types.GetRoleEmployeesReqeust) (resp *types.GetRoleEmployeesReply, err error) {
- accounts, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetUsersForRole(req.RoleCode)
- if len(accounts) == 0 {
- return &types.GetRoleEmployeesReply{
- PageIndex: req.PageIndex,
- PageSize: req.PageSize,
- Total: 0,
- List: make([]types.RoleEmployee, 0),
- }, nil
- }
-
- employeePage := l.svcCtx.PowerX.Organization.FindManyEmployeesPage(l.ctx, &option.FindManyEmployeesOption{
- Accounts: accounts,
- PageIndex: req.PageIndex,
- PageSize: req.PageSize,
- })
-
- resp = &types.GetRoleEmployeesReply{
- PageIndex: employeePage.PageIndex,
- PageSize: employeePage.PageSize,
- Total: employeePage.Total,
- }
-
- var list []types.RoleEmployee
- for _, employee := range employeePage.List {
- var dep *types.RoleEmployeeDepartment
- if employee.Department != nil {
- dep = &types.RoleEmployeeDepartment{
- Id: employee.Department.Id,
- Name: employee.Department.Name,
- }
- }
- list = append(list, types.RoleEmployee{
- Id: employee.Id,
- Name: employee.Name,
- Nickname: employee.NickName,
- Account: employee.Account,
- PhoneNumber: employee.MobilePhone,
- Department: dep,
- Email: employee.Email,
- })
- }
- resp.List = list
-
- return resp, nil
-}
diff --git a/internal/logic/admin/permission/getroleuserslogic.go b/internal/logic/admin/permission/getroleuserslogic.go
new file mode 100644
index 00000000..75c816f7
--- /dev/null
+++ b/internal/logic/admin/permission/getroleuserslogic.go
@@ -0,0 +1,72 @@
+package permission
+
+import (
+ "PowerX/internal/model/option"
+ "context"
+
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type GetRoleUsersLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+func NewGetRoleUsersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetRoleUsersLogic {
+ return &GetRoleUsersLogic{
+ Logger: logx.WithContext(ctx),
+ ctx: ctx,
+ svcCtx: svcCtx,
+ }
+}
+
+func (l *GetRoleUsersLogic) GetRoleUsers(req *types.GetRoleUsersReqeust) (resp *types.GetRoleUsersReply, err error) {
+ accounts, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetUsersForRole(req.RoleCode)
+ if len(accounts) == 0 {
+ return &types.GetRoleUsersReply{
+ PageIndex: req.PageIndex,
+ PageSize: req.PageSize,
+ Total: 0,
+ List: make([]types.RoleUser, 0),
+ }, nil
+ }
+
+ userPage := l.svcCtx.PowerX.Organization.FindManyUsersPage(l.ctx, &option.FindManyUsersOption{
+ Accounts: accounts,
+ PageIndex: req.PageIndex,
+ PageSize: req.PageSize,
+ })
+
+ resp = &types.GetRoleUsersReply{
+ PageIndex: userPage.PageIndex,
+ PageSize: userPage.PageSize,
+ Total: userPage.Total,
+ }
+
+ var list []types.RoleUser
+ for _, user := range userPage.List {
+ var dep *types.RoleUserDepartment
+ if user.Department != nil {
+ dep = &types.RoleUserDepartment{
+ Id: user.Department.Id,
+ Name: user.Department.Name,
+ }
+ }
+ list = append(list, types.RoleUser{
+ Id: user.Id,
+ Name: user.Name,
+ Nickname: user.NickName,
+ Account: user.Account,
+ PhoneNumber: user.MobilePhone,
+ Department: dep,
+ Email: user.Email,
+ })
+ }
+ resp.List = list
+
+ return resp, nil
+}
diff --git a/internal/logic/admin/permission/setroleemployeeslogic.go b/internal/logic/admin/permission/setroleemployeeslogic.go
deleted file mode 100644
index 7a2ec0f4..00000000
--- a/internal/logic/admin/permission/setroleemployeeslogic.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package permission
-
-import (
- "context"
-
- "PowerX/internal/svc"
- "PowerX/internal/types"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type SetRoleEmployeesLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewSetRoleEmployeesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SetRoleEmployeesLogic {
- return &SetRoleEmployeesLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-func (l *SetRoleEmployeesLogic) SetRoleEmployees(req *types.SetRoleEmployeesRequest) (resp *types.SetRoleEmployeesReply, err error) {
- err = l.svcCtx.PowerX.AdminAuthorization.SetRoleEmployeesByRoleCode(l.ctx, req.EmployeeIds, req.RoleCode)
- if err != nil {
- return nil, err
- }
- return &types.SetRoleEmployeesReply{
- Status: "ok",
- }, nil
-}
diff --git a/internal/logic/admin/permission/setroleuserslogic.go b/internal/logic/admin/permission/setroleuserslogic.go
new file mode 100644
index 00000000..4b54aa16
--- /dev/null
+++ b/internal/logic/admin/permission/setroleuserslogic.go
@@ -0,0 +1,34 @@
+package permission
+
+import (
+ "context"
+
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type SetRoleUsersLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+func NewSetRoleUsersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SetRoleUsersLogic {
+ return &SetRoleUsersLogic{
+ Logger: logx.WithContext(ctx),
+ ctx: ctx,
+ svcCtx: svcCtx,
+ }
+}
+
+func (l *SetRoleUsersLogic) SetRoleUsers(req *types.SetRoleUsersRequest) (resp *types.SetRoleUsersReply, err error) {
+ err = l.svcCtx.PowerX.AdminAuthorization.SetRoleUsersByRoleCode(l.ctx, req.UserIds, req.RoleCode)
+ if err != nil {
+ return nil, err
+ }
+ return &types.SetRoleUsersReply{
+ Status: "ok",
+ }, nil
+}
diff --git a/internal/logic/admin/permission/setuserroleslogic.go b/internal/logic/admin/permission/setuserroleslogic.go
index bbcf3365..53bb1892 100644
--- a/internal/logic/admin/permission/setuserroleslogic.go
+++ b/internal/logic/admin/permission/setuserroleslogic.go
@@ -24,17 +24,17 @@ func NewSetUserRolesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SetU
}
func (l *SetUserRolesLogic) SetUserRoles(req *types.SetUserRolesRequest) (resp *types.SetUserRolesReply, err error) {
- employee, err := l.svcCtx.PowerX.Organization.FindOneEmployeeById(l.ctx, req.UserId)
+ user, err := l.svcCtx.PowerX.Organization.FindOneUserById(l.ctx, req.UserId)
if err != nil {
return nil, err
}
- _, err = l.svcCtx.PowerX.AdminAuthorization.Casbin.DeleteRolesForUser(employee.Account)
+ _, err = l.svcCtx.PowerX.AdminAuthorization.Casbin.DeleteRolesForUser(user.Account)
if err != nil {
return nil, err
}
- _, err = l.svcCtx.PowerX.AdminAuthorization.Casbin.AddRolesForUser(employee.Account, req.RoleCodes)
+ _, err = l.svcCtx.PowerX.AdminAuthorization.Casbin.AddRolesForUser(user.Account, req.RoleCodes)
if err != nil {
return nil, err
}
diff --git a/internal/logic/admin/position/deletepositionlogic.go b/internal/logic/admin/position/deletepositionlogic.go
index a92356b9..b68b1829 100644
--- a/internal/logic/admin/position/deletepositionlogic.go
+++ b/internal/logic/admin/position/deletepositionlogic.go
@@ -26,10 +26,10 @@ func NewDeletePositionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *De
}
func (l *DeletePositionLogic) DeletePosition(req *types.DeletePositionRequest) (resp *types.DeletePositionReply, err error) {
- employeePage := l.svcCtx.PowerX.Organization.FindManyEmployeesPage(l.ctx, &option.FindManyEmployeesOption{
+ userPage := l.svcCtx.PowerX.Organization.FindManyUsersPage(l.ctx, &option.FindManyUsersOption{
PositionIDs: []int64{req.Id},
})
- if employeePage.Total > 0 {
+ if userPage.Total > 0 {
return nil, errorx.WithCause(errorx.ErrBadRequest, "该职位下存在员工,无法删除")
}
err = l.svcCtx.PowerX.Organization.DeletePosition(l.ctx, req.Id)
diff --git a/internal/logic/admin/position/patchpositionlogic.go b/internal/logic/admin/position/patchpositionlogic.go
index e09080d8..43c2c004 100644
--- a/internal/logic/admin/position/patchpositionlogic.go
+++ b/internal/logic/admin/position/patchpositionlogic.go
@@ -50,17 +50,17 @@ func (l *PatchPositionLogic) PatchPosition(req *types.PatchPositionRequest) (res
}
// 查询该职位的员工
- page := l.svcCtx.PowerX.Organization.FindManyEmployeesPage(l.ctx, &option.FindManyEmployeesOption{
+ page := l.svcCtx.PowerX.Organization.FindManyUsersPage(l.ctx, &option.FindManyUsersOption{
PositionIDs: []int64{req.Id},
})
- // pluck employee id
- employeeIDs := slicex.SlicePluck(page.List, func(item *origanzation.Employee) int64 {
+ // pluck user id
+ userIDs := slicex.SlicePluck(page.List, func(item *origanzation.User) int64 {
return item.Id
})
// 更新员工的角色
- for _, id := range employeeIDs {
- err = l.svcCtx.PowerX.AdminAuthorization.ReplaceEmployeeRoles(l.ctx, id, req.RoleCodes)
+ for _, id := range userIDs {
+ err = l.svcCtx.PowerX.AdminAuthorization.ReplaceUserRoles(l.ctx, id, req.RoleCodes)
if err != nil {
return
}
diff --git a/internal/logic/admin/scrm/app/detailweworkapplogic.go b/internal/logic/admin/scrm/app/detailweworkapplogic.go
index ef27616b..1ee4af6b 100644
--- a/internal/logic/admin/scrm/app/detailweworkapplogic.go
+++ b/internal/logic/admin/scrm/app/detailweworkapplogic.go
@@ -72,7 +72,7 @@ func (app *DetailWeWorkAppLogic) allowUserInfos(infos response.ResponseAgentAllo
for _, user := range infos.User {
infox.User = append(infox.User, types.User{
- Userid: user.UserID,
+ Account: user.UserID,
})
}
return infox
diff --git a/internal/logic/admin/scrm/organization/listweworkemployeepagelogic.go b/internal/logic/admin/scrm/organization/listweworkemployeepagelogic.go
deleted file mode 100644
index 330215d9..00000000
--- a/internal/logic/admin/scrm/organization/listweworkemployeepagelogic.go
+++ /dev/null
@@ -1,133 +0,0 @@
-package organization
-
-import (
- "PowerX/internal/model/scrm/organization"
- "PowerX/internal/uc/powerx/scrm/wechat"
- "context"
-
- "PowerX/internal/svc"
- "PowerX/internal/types"
-
- "github.com/zeromicro/go-zero/core/logx"
-)
-
-type ListWeWorkEmployeePageLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
-}
-
-func NewListWeWorkEmployeePageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListWeWorkEmployeePageLogic {
- return &ListWeWorkEmployeePageLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
-}
-
-//
-// ListWeWorkEmployeePage
-// @Description: 员工列表
-// @receiver employee
-// @param opt
-// @return resp
-// @return err
-//
-func (employee *ListWeWorkEmployeePageLogic) ListWeWorkEmployeePage(opt *types.ListWeWorkEmployeeReqeust) (resp *types.ListWeWorkEmployeeReply, err error) {
- data, err := employee.svcCtx.PowerX.SCRM.Wechat.FindManyWechatEmployeesPage(employee.ctx, employee.OPT(opt))
-
- return &types.ListWeWorkEmployeeReply{
- List: employee.DTO(data.List),
- PageIndex: data.PageIndex,
- PageSize: data.PageSize,
- Total: data.Total,
- }, err
-}
-
-//
-// OPT
-// @Description:
-// @receiver employee
-// @param opt
-// @return *types.PageOption[wechat.FindManyWechatEmployeesOption]
-//
-func (employee *ListWeWorkEmployeePageLogic) OPT(opt *types.ListWeWorkEmployeeReqeust) *types.PageOption[wechat.FindManyWechatEmployeesOption] {
-
- option := types.PageOption[wechat.FindManyWechatEmployeesOption]{
- Option: wechat.FindManyWechatEmployeesOption{},
- PageIndex: opt.PageIndex,
- PageSize: opt.PageSize,
- }
- if opt.Id > 0 {
- option.Option.Ids = []int64{opt.Id}
- }
- if opt.Name != `` {
- option.Option.Names = []string{opt.Name}
- }
- if opt.Alias != `` {
- option.Option.Alias = []string{opt.Alias}
- }
- if opt.Email != `` {
- option.Option.Emails = []string{opt.Email}
- }
- if opt.Mobile != `` {
- option.Option.Mobile = []string{opt.Mobile}
- }
- if opt.OpenUserId != `` {
- option.Option.OpenUserId = []string{opt.OpenUserId}
- }
- if opt.WeWorkMainDepartmentId > 0 {
- option.Option.WeWorkMainDepartmentId = []int64{opt.WeWorkMainDepartmentId}
- }
- if opt.Status > 0 {
- option.Option.Status = []int{opt.Status}
- }
- option.DefaultPageIfNotSet()
-
- return &option
-
-}
-
-//
-// DTO
-// @Description:
-// @receiver employee
-// @param data
-// @return employees
-//
-func (employee *ListWeWorkEmployeePageLogic) DTO(data []*organization.WeWorkEmployee) (employees []*types.WechatEmployee) {
-
- for _, val := range data {
- employees = append(employees, employee.dto(val))
- }
- return employees
-
-}
-
-//
-// dto
-// @Description:
-// @receiver employee
-// @param val
-// @return *types.WechatEmployee
-//
-func (employee *ListWeWorkEmployeePageLogic) dto(val *organization.WeWorkEmployee) *types.WechatEmployee {
- return &types.WechatEmployee{
- WeWorkUserId: val.WeWorkUserId,
- Name: val.Name,
- Position: val.Position,
- Mobile: val.Mobile,
- Gender: val.Gender,
- Email: val.Email,
- BizMail: val.BizMail,
- Avatar: val.Avatar,
- ThumbAvatar: val.ThumbAvatar,
- Telephone: val.Telephone,
- Alias: val.Alias,
- Address: val.Address,
- OpenUserId: val.OpenUserId,
- WeWorkMainDepartmentId: val.WeWorkMainDepartmentId,
- Status: val.Status,
- QrCode: val.QrCode,
- }
-}
diff --git a/internal/logic/admin/scrm/organization/listweworkuserpagelogic.go b/internal/logic/admin/scrm/organization/listweworkuserpagelogic.go
new file mode 100644
index 00000000..40d18ece
--- /dev/null
+++ b/internal/logic/admin/scrm/organization/listweworkuserpagelogic.go
@@ -0,0 +1,129 @@
+package organization
+
+import (
+ "PowerX/internal/model/scrm/organization"
+ "PowerX/internal/uc/powerx/scrm/wechat"
+ "context"
+
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type ListWeWorkUserPageLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+func NewListWeWorkUserPageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListWeWorkUserPageLogic {
+ return &ListWeWorkUserPageLogic{
+ Logger: logx.WithContext(ctx),
+ ctx: ctx,
+ svcCtx: svcCtx,
+ }
+}
+
+// ListWeWorkUserPage
+//
+// @Description: 员工列表
+// @receiver user
+// @param opt
+// @return resp
+// @return err
+func (user *ListWeWorkUserPageLogic) ListWeWorkUserPage(opt *types.ListWeWorkUserReqeust) (resp *types.ListWeWorkUserReply, err error) {
+ data, err := user.svcCtx.PowerX.SCRM.Wechat.FindManyWechatUsersPage(user.ctx, user.OPT(opt))
+
+ return &types.ListWeWorkUserReply{
+ List: user.DTO(data.List),
+ PageIndex: data.PageIndex,
+ PageSize: data.PageSize,
+ Total: data.Total,
+ }, err
+}
+
+// OPT
+//
+// @Description:
+// @receiver user
+// @param opt
+// @return *types.PageOption[wechat.FindManyWechatUsersOption]
+func (user *ListWeWorkUserPageLogic) OPT(opt *types.ListWeWorkUserReqeust) *types.PageOption[wechat.FindManyWechatUsersOption] {
+
+ option := types.PageOption[wechat.FindManyWechatUsersOption]{
+ Option: wechat.FindManyWechatUsersOption{},
+ PageIndex: opt.PageIndex,
+ PageSize: opt.PageSize,
+ }
+ if opt.Id > 0 {
+ option.Option.Ids = []int64{opt.Id}
+ }
+ if opt.Name != `` {
+ option.Option.Names = []string{opt.Name}
+ }
+ if opt.Alias != `` {
+ option.Option.Alias = []string{opt.Alias}
+ }
+ if opt.Email != `` {
+ option.Option.Emails = []string{opt.Email}
+ }
+ if opt.Mobile != `` {
+ option.Option.Mobile = []string{opt.Mobile}
+ }
+ if opt.OpenUserId != `` {
+ option.Option.OpenUserId = []string{opt.OpenUserId}
+ }
+ if opt.WeWorkMainDepartmentId > 0 {
+ option.Option.WeWorkMainDepartmentId = []int64{opt.WeWorkMainDepartmentId}
+ }
+ if opt.Status > 0 {
+ option.Option.Status = []int{opt.Status}
+ }
+ option.DefaultPageIfNotSet()
+
+ return &option
+
+}
+
+// DTO
+//
+// @Description:
+// @receiver user
+// @param data
+// @return users
+func (user *ListWeWorkUserPageLogic) DTO(data []*organization.WeWorkUser) (users []*types.WechatUser) {
+
+ for _, val := range data {
+ users = append(users, user.dto(val))
+ }
+ return users
+
+}
+
+// dto
+//
+// @Description:
+// @receiver user
+// @param val
+// @return *types.WechatUser
+func (user *ListWeWorkUserPageLogic) dto(val *organization.WeWorkUser) *types.WechatUser {
+ return &types.WechatUser{
+ WeWorkUserId: val.WeWorkUserId,
+ Name: val.Name,
+ Position: val.Position,
+ Mobile: val.Mobile,
+ Gender: val.Gender,
+ Email: val.Email,
+ BizMail: val.BizMail,
+ Avatar: val.Avatar,
+ ThumbAvatar: val.ThumbAvatar,
+ Telephone: val.Telephone,
+ Alias: val.Alias,
+ Address: val.Address,
+ OpenUserId: val.OpenUserId,
+ WeWorkMainDepartmentId: val.WeWorkMainDepartmentId,
+ Status: val.Status,
+ QrCode: val.QrCode,
+ }
+}
diff --git a/internal/logic/admin/scrm/organization/syncweworkemployeelogic.go b/internal/logic/admin/scrm/organization/syncweworkuserlogic.go
similarity index 52%
rename from internal/logic/admin/scrm/organization/syncweworkemployeelogic.go
rename to internal/logic/admin/scrm/organization/syncweworkuserlogic.go
index 27c353fd..106396f4 100644
--- a/internal/logic/admin/scrm/organization/syncweworkemployeelogic.go
+++ b/internal/logic/admin/scrm/organization/syncweworkuserlogic.go
@@ -9,29 +9,29 @@ import (
"github.com/zeromicro/go-zero/core/logx"
)
-type SyncWeWorkEmployeeLogic struct {
+type SyncWeWorkUserLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
-func NewSyncWeWorkEmployeeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SyncWeWorkEmployeeLogic {
- return &SyncWeWorkEmployeeLogic{
+func NewSyncWeWorkUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SyncWeWorkUserLogic {
+ return &SyncWeWorkUserLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
-// SyncWeWorkEmployee
+// SyncWeWorkUser
//
// @Description: 更新组织架构
// @receiver sync
// @return resp
// @return err
-func (sync *SyncWeWorkEmployeeLogic) SyncWeWorkEmployee() (resp *types.SyncWeWorkOrganizationReply, err error) {
+func (sync *SyncWeWorkUserLogic) SyncWeWorkUser() (resp *types.SyncWeWorkOrganizationReply, err error) {
- err = sync.svcCtx.PowerX.SCRM.Wechat.PullSyncDepartmentsAndEmployeesRequest(sync.ctx)
+ err = sync.svcCtx.PowerX.SCRM.Wechat.PullSyncDepartmentsAndUsersRequest(sync.ctx)
return &types.SyncWeWorkOrganizationReply{
Status: `success`,
diff --git a/internal/logic/admin/employee/createemployeelogic.go b/internal/logic/admin/user/createuserlogic.go
similarity index 52%
rename from internal/logic/admin/employee/createemployeelogic.go
rename to internal/logic/admin/user/createuserlogic.go
index baf81fdc..4c4f9a97 100644
--- a/internal/logic/admin/employee/createemployeelogic.go
+++ b/internal/logic/admin/user/createuserlogic.go
@@ -1,4 +1,4 @@
-package employee
+package user
import (
"PowerX/internal/model/origanzation"
@@ -11,22 +11,22 @@ import (
"github.com/zeromicro/go-zero/core/logx"
)
-type CreateEmployeeLogic struct {
+type CreateUserLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
-func NewCreateEmployeeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateEmployeeLogic {
- return &CreateEmployeeLogic{
+func NewCreateUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateUserLogic {
+ return &CreateUserLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
-func (l *CreateEmployeeLogic) CreateEmployee(req *types.CreateEmployeeRequest) (resp *types.CreateEmployeeReply, err error) {
- employee := origanzation.Employee{
+func (l *CreateUserLogic) CreateUser(req *types.CreateUserRequest) (resp *types.CreateUserReply, err error) {
+ user := origanzation.User{
Account: req.Account,
Name: req.Name,
NickName: req.NickName,
@@ -39,30 +39,30 @@ func (l *CreateEmployeeLogic) CreateEmployee(req *types.CreateEmployeeRequest) (
ExternalEmail: req.ExternalEmail,
Avatar: req.Avatar,
Password: "123456",
- Status: origanzation.EmployeeStatusEnabled,
+ Status: origanzation.UserStatusEnabled,
}
- if err = employee.HashPassword(); err != nil {
- panic(errors.Wrap(err, "create employee hash password failed"))
+ if err = user.HashPassword(); err != nil {
+ panic(errors.Wrap(err, "create user hash password failed"))
}
- if err = l.svcCtx.PowerX.Organization.CreateEmployee(l.ctx, &employee); err != nil {
+ if err = l.svcCtx.PowerX.Organization.CreateUser(l.ctx, &user); err != nil {
return nil, err
}
// 根据职位更新角色
- if employee.PositionID != 0 {
- codes, err := l.svcCtx.PowerX.Organization.FindEmployeePositionRoleCodes(l.ctx, employee.Id)
+ if user.PositionID != 0 {
+ codes, err := l.svcCtx.PowerX.Organization.FindUserPositionRoleCodes(l.ctx, user.Id)
if err != nil {
panic(err)
}
- if _, err := l.svcCtx.PowerX.AdminAuthorization.Casbin.DeleteRolesForUser(employee.Account); err != nil {
+ if _, err := l.svcCtx.PowerX.AdminAuthorization.Casbin.DeleteRolesForUser(user.Account); err != nil {
panic(err)
}
- if _, err := l.svcCtx.PowerX.AdminAuthorization.Casbin.AddRolesForUser(employee.Account, codes); err != nil {
+ if _, err := l.svcCtx.PowerX.AdminAuthorization.Casbin.AddRolesForUser(user.Account, codes); err != nil {
panic(err)
}
}
- return &types.CreateEmployeeReply{
- Id: employee.Id,
+ return &types.CreateUserReply{
+ Id: user.Id,
}, nil
}
diff --git a/internal/logic/admin/user/deleteuserlogic.go b/internal/logic/admin/user/deleteuserlogic.go
new file mode 100644
index 00000000..492a544f
--- /dev/null
+++ b/internal/logic/admin/user/deleteuserlogic.go
@@ -0,0 +1,34 @@
+package user
+
+import (
+ "context"
+
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type DeleteUserLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+func NewDeleteUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteUserLogic {
+ return &DeleteUserLogic{
+ Logger: logx.WithContext(ctx),
+ ctx: ctx,
+ svcCtx: svcCtx,
+ }
+}
+
+func (l *DeleteUserLogic) DeleteUser(req *types.DeleteUserRequest) (resp *types.DeleteUserReply, err error) {
+ err = l.svcCtx.PowerX.Organization.DeleteUserById(l.ctx, req.Id)
+ if err != nil {
+ return nil, err
+ }
+ return &types.DeleteUserReply{
+ Id: req.Id,
+ }, nil
+}
diff --git a/internal/logic/admin/user/getuserlogic.go b/internal/logic/admin/user/getuserlogic.go
new file mode 100644
index 00000000..4e6c4eed
--- /dev/null
+++ b/internal/logic/admin/user/getuserlogic.go
@@ -0,0 +1,79 @@
+package user
+
+import (
+ "PowerX/internal/model/origanzation"
+ "PowerX/internal/model/permission"
+ "PowerX/pkg/slicex"
+ "context"
+ "time"
+
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type GetUserLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+func NewGetUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserLogic {
+ return &GetUserLogic{
+ Logger: logx.WithContext(ctx),
+ ctx: ctx,
+ svcCtx: svcCtx,
+ }
+}
+
+func (l *GetUserLogic) GetUser(req *types.GetUserRequest) (resp *types.GetUserReply, err error) {
+ user, err := l.svcCtx.PowerX.Organization.FindOneUserById(l.ctx, req.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ roles, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetRolesForUser(user.Account)
+
+ var dep *types.UserDepartment
+ if user.Department != nil {
+ dep = &types.UserDepartment{
+ DepId: user.Department.Id,
+ DepName: user.Department.Name,
+ }
+ }
+
+ vo := types.User{
+ Id: user.Id,
+ Account: user.Account,
+ Name: user.Name,
+ Email: user.Email,
+ MobilePhone: user.MobilePhone,
+ Gender: user.Gender,
+ NickName: user.NickName,
+ Desc: user.NickName,
+ Avatar: user.Avatar,
+ ExternalEmail: user.ExternalEmail,
+ Department: dep,
+ Roles: roles,
+ JobTitle: user.JobTitle,
+ IsEnabled: user.Status == origanzation.UserStatusEnabled,
+ CreatedAt: user.CreatedAt.Format(time.RFC3339),
+ }
+ if user.Position != nil {
+ codes := slicex.SlicePluck(user.Position.Roles, func(item *permission.AdminRole) string {
+ return item.RoleCode
+ })
+ vo.Position = &types.Position{
+ Id: user.Position.Id,
+ Name: user.Position.Name,
+ Desc: user.Position.Desc,
+ Level: user.Position.Level,
+ RoleCodes: codes,
+ }
+ vo.PositionId = user.Position.Id
+ }
+ return &types.GetUserReply{
+ User: &vo,
+ }, nil
+}
diff --git a/internal/logic/admin/user/listuserlogic.go b/internal/logic/admin/user/listuserlogic.go
new file mode 100644
index 00000000..c36b1767
--- /dev/null
+++ b/internal/logic/admin/user/listuserlogic.go
@@ -0,0 +1,115 @@
+package user
+
+import (
+ "PowerX/internal/model/option"
+ "PowerX/internal/model/origanzation"
+ "PowerX/internal/model/permission"
+ "PowerX/pkg/slicex"
+ "context"
+ "time"
+
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type ListUsersLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+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) {
+ opt := option.FindManyUsersOption{
+ Ids: req.Ids,
+ LikeName: req.LikeName,
+ LikeEmail: req.LikeEmail,
+ DepIds: req.DepIds,
+ PositionIDs: req.PositionIds,
+ LikePhoneNumber: req.LikePhoneNumber,
+ PageIndex: req.PageIndex,
+ PageSize: req.PageSize,
+ }
+
+ if len(req.RoleCodes) > 0 {
+ // bind roles opt, todo improve performance or remove it
+ var accounts []string
+ for _, code := range req.RoleCodes {
+ as, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetUsersForRole(code)
+ accounts = append(accounts, as...)
+ }
+ // 涉及角色查询, root账户会出现在所有角色筛选中
+ accounts = append(accounts, "root")
+ opt.Accounts = accounts
+ }
+ if req.IsEnabled != nil {
+ if *req.IsEnabled {
+ opt.Statuses = append(opt.Statuses, origanzation.UserStatusEnabled)
+ } else {
+ opt.Statuses = append(opt.Statuses, origanzation.UserStatusDisabled)
+ }
+ }
+
+ userPage := l.svcCtx.PowerX.Organization.FindManyUsersPage(l.ctx, &opt)
+
+ // build vo
+ var vos []types.User
+ for _, user := range userPage.List {
+ roles, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetRolesForUser(user.Account)
+ var dep *types.UserDepartment
+ if user.Department != nil {
+ dep = &types.UserDepartment{
+ DepId: user.Department.Id,
+ DepName: user.Department.Name,
+ }
+ }
+ vo := types.User{
+ Id: user.Id,
+ Account: user.Account,
+ Name: user.Name,
+ Email: user.Email,
+ MobilePhone: user.MobilePhone,
+ Gender: user.Gender,
+ NickName: user.NickName,
+ Desc: user.Desc,
+ Avatar: user.Avatar,
+ ExternalEmail: user.ExternalEmail,
+ Department: dep,
+ Roles: roles,
+ JobTitle: user.JobTitle,
+ IsEnabled: user.Status == origanzation.UserStatusEnabled,
+ CreatedAt: user.CreatedAt.Format(time.RFC3339),
+ }
+ if user.Position != nil {
+ codes := slicex.SlicePluck(user.Position.Roles, func(item *permission.AdminRole) string {
+ return item.RoleCode
+ })
+ vo.Position = &types.Position{
+ Id: user.Position.Id,
+ Name: user.Position.Name,
+ Desc: user.Position.Desc,
+ Level: user.Position.Level,
+ RoleCodes: codes,
+ }
+ vo.PositionId = user.Position.Id
+ }
+
+ vos = append(vos, vo)
+ }
+
+ return &types.ListUsersReply{
+ List: vos,
+ PageIndex: userPage.PageIndex,
+ PageSize: userPage.PageSize,
+ Total: userPage.Total,
+ }, nil
+}
diff --git a/internal/logic/admin/employee/resetpasswordlogic.go b/internal/logic/admin/user/resetpasswordlogic.go
similarity index 76%
rename from internal/logic/admin/employee/resetpasswordlogic.go
rename to internal/logic/admin/user/resetpasswordlogic.go
index 79211671..ba41334c 100644
--- a/internal/logic/admin/employee/resetpasswordlogic.go
+++ b/internal/logic/admin/user/resetpasswordlogic.go
@@ -1,4 +1,4 @@
-package employee
+package user
import (
"PowerX/internal/model/origanzation"
@@ -27,19 +27,19 @@ func NewResetPasswordLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Res
}
func (l *ResetPasswordLogic) ResetPassword(req *types.ResetPasswordRequest) (resp *types.ResetPasswordReply, err error) {
- employee := origanzation.Employee{
+ user := origanzation.User{
Model: model.Model{
Id: req.UserId,
},
Password: "123456",
}
- err = employee.HashPassword()
+ err = user.HashPassword()
if err != nil {
- panic(errors.Wrap(err, "create employee hash password failed"))
+ panic(errors.Wrap(err, "create user hash password failed"))
}
- if err := l.svcCtx.PowerX.Organization.UpdateEmployeeById(l.ctx, &employee, req.UserId); err != nil {
+ if err := l.svcCtx.PowerX.Organization.UpdateUserById(l.ctx, &user, req.UserId); err != nil {
return nil, err
}
diff --git a/internal/logic/admin/user/syncuserslogic.go b/internal/logic/admin/user/syncuserslogic.go
new file mode 100644
index 00000000..ef177c7f
--- /dev/null
+++ b/internal/logic/admin/user/syncuserslogic.go
@@ -0,0 +1,30 @@
+package user
+
+import (
+ "context"
+
+ "PowerX/internal/svc"
+ "PowerX/internal/types"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type SyncUsersLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+func NewSyncUsersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SyncUsersLogic {
+ return &SyncUsersLogic{
+ Logger: logx.WithContext(ctx),
+ ctx: ctx,
+ svcCtx: svcCtx,
+ }
+}
+
+func (sync *SyncUsersLogic) SyncUsers(req *types.SyncUsersRequest) (resp *types.SyncUsersReply, err error) {
+ // todo: add your logic here and delete this line
+
+ return
+}
diff --git a/internal/logic/admin/user/updateuserlogic.go b/internal/logic/admin/user/updateuserlogic.go
new file mode 100644
index 00000000..286f6d85
--- /dev/null
+++ b/internal/logic/admin/user/updateuserlogic.go
@@ -0,0 +1,93 @@
+package user
+
+import (
+ "PowerX/internal/model/origanzation"
+ "PowerX/internal/types"
+ "context"
+ "github.com/pkg/errors"
+ "time"
+
+ "PowerX/internal/model"
+ "PowerX/internal/svc"
+
+ "github.com/zeromicro/go-zero/core/logx"
+)
+
+type UpdateUserLogic struct {
+ logx.Logger
+ ctx context.Context
+ svcCtx *svc.ServiceContext
+}
+
+func NewUpdateUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserLogic {
+ return &UpdateUserLogic{
+ Logger: logx.WithContext(ctx),
+ ctx: ctx,
+ svcCtx: svcCtx,
+ }
+}
+
+func (l *UpdateUserLogic) UpdateUser(req *types.UpdateUserRequest) (resp *types.UpdateUserReply, err error) {
+ user := origanzation.User{
+ Model: model.Model{
+ Id: req.Id,
+ },
+ Name: req.Name,
+ NickName: req.NickName,
+ Desc: req.Desc,
+ PositionID: req.PositionId,
+ JobTitle: req.JobTitle,
+ DepartmentId: req.DepId,
+ MobilePhone: req.MobilePhone,
+ Gender: req.Gender,
+ Email: req.Email,
+ ExternalEmail: req.ExternalEmail,
+ Avatar: req.Avatar,
+ Password: req.Password,
+ Status: req.Status,
+ }
+
+ if err = user.HashPassword(); err != nil {
+ panic(errors.Wrap(err, "create user hash password failed"))
+ }
+
+ if err := l.svcCtx.PowerX.Organization.UpdateUserById(l.ctx, &user, req.Id); err != nil {
+ return nil, err
+ }
+
+ // 根据职位更新角色
+ if user.PositionID != 0 {
+ codes, err := l.svcCtx.PowerX.Organization.FindUserPositionRoleCodes(l.ctx, user.Id)
+ if err != nil {
+ panic(err)
+ }
+ if _, err := l.svcCtx.PowerX.AdminAuthorization.Casbin.DeleteRolesForUser(user.Account); err != nil {
+ panic(err)
+ }
+ if _, err := l.svcCtx.PowerX.AdminAuthorization.Casbin.AddRolesForUser(user.Account, codes); err != nil {
+ panic(err)
+ }
+ }
+
+ roles, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetRolesForUser(user.Account)
+
+ return &types.UpdateUserReply{
+ User: &types.User{
+ Id: user.Id,
+ Account: user.Account,
+ Name: user.Name,
+ Email: user.Email,
+ MobilePhone: user.MobilePhone,
+ Gender: user.Gender,
+ NickName: user.NickName,
+ Desc: user.Desc,
+ Avatar: user.Avatar,
+ ExternalEmail: user.ExternalEmail,
+ Roles: roles,
+ PositionId: user.PositionID,
+ JobTitle: user.JobTitle,
+ IsEnabled: user.Status == origanzation.UserStatusEnabled,
+ CreatedAt: user.CreatedAt.Format(time.RFC3339),
+ },
+ }, nil
+}
diff --git a/internal/logic/admin/userinfo/getuserinfologic.go b/internal/logic/admin/userinfo/getuserinfologic.go
index 2620aa48..67c5373c 100644
--- a/internal/logic/admin/userinfo/getuserinfologic.go
+++ b/internal/logic/admin/userinfo/getuserinfologic.go
@@ -32,36 +32,36 @@ func (l *GetUserInfoLogic) GetUserInfo() (resp *types.GetUserInfoReply, err erro
panic(errors.Wrap(err, "get user metadata failed"))
}
- employee, err := l.svcCtx.PowerX.Organization.FindOneEmployeeById(l.ctx, cred.UID)
+ user, err := l.svcCtx.PowerX.Organization.FindOneUserById(l.ctx, cred.UID)
if err != nil {
return nil, err
}
- roles, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetRolesForUser(employee.Account)
+ roles, _ := l.svcCtx.PowerX.AdminAuthorization.Casbin.GetRolesForUser(user.Account)
resp = &types.GetUserInfoReply{
- Id: employee.Id,
- Account: employee.Account,
- Name: employee.Name,
- Email: employee.Email,
- MobilePhone: employee.MobilePhone,
- Gender: employee.Gender,
- NickName: employee.NickName,
- Desc: employee.NickName,
- Avatar: employee.Avatar,
- ExternalEmail: employee.ExternalEmail,
+ Id: user.Id,
+ Account: user.Account,
+ Name: user.Name,
+ Email: user.Email,
+ MobilePhone: user.MobilePhone,
+ Gender: user.Gender,
+ NickName: user.NickName,
+ Desc: user.NickName,
+ Avatar: user.Avatar,
+ ExternalEmail: user.ExternalEmail,
Roles: roles,
- JobTitle: employee.JobTitle,
- CreatedAt: employee.CreatedAt.Format(time.RFC3339),
+ JobTitle: user.JobTitle,
+ CreatedAt: user.CreatedAt.Format(time.RFC3339),
}
- if employee.Position != nil {
- resp.Position = employee.Position.Name
+ if user.Position != nil {
+ resp.Position = user.Position.Name
}
- if employee.Department != nil {
- resp.DepName = employee.Department.Name
+ if user.Department != nil {
+ resp.DepName = user.Department.Name
}
- if employee.Status == origanzation.EmployeeStatusEnabled {
+ if user.Status == origanzation.UserStatusEnabled {
resp.IsEnabled = true
}
return
diff --git a/internal/logic/admin/userinfo/modifyuserpasswordlogic.go b/internal/logic/admin/userinfo/modifyuserpasswordlogic.go
index 009d50f4..0674aedd 100644
--- a/internal/logic/admin/userinfo/modifyuserpasswordlogic.go
+++ b/internal/logic/admin/userinfo/modifyuserpasswordlogic.go
@@ -31,7 +31,7 @@ func (l *ModifyUserPasswordLogic) ModifyUserPassword(req *types.ModifyPasswordRe
panic(errors.Wrap(err, "get user metadata failed"))
}
- err = l.svcCtx.PowerX.Organization.PatchEmployeeByUserId(l.ctx, &origanzation.Employee{Password: req.Password}, cred.UID)
+ err = l.svcCtx.PowerX.Organization.PatchUserByUserId(l.ctx, &origanzation.User{Password: req.Password}, cred.UID)
if err != nil {
return err
}
diff --git a/internal/middleware/employeejwtauthmiddleware.go b/internal/middleware/userjwtauthmiddleware.go
similarity index 91%
rename from internal/middleware/employeejwtauthmiddleware.go
rename to internal/middleware/userjwtauthmiddleware.go
index 03d7e74b..defbd5c0 100644
--- a/internal/middleware/employeejwtauthmiddleware.go
+++ b/internal/middleware/userjwtauthmiddleware.go
@@ -15,7 +15,7 @@ import (
"strings"
)
-type EmployeeJWTAuthMiddleware struct {
+type UserJWTAuthMiddleware struct {
conf *config.Config
px *uc.PowerXUseCase
opt option
@@ -49,20 +49,20 @@ func DisableToken(b bool) func(opt *option) {
}
}
-func NewEmployeeJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...optionFunc) *EmployeeJWTAuthMiddleware {
+func NewUserJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...optionFunc) *UserJWTAuthMiddleware {
opt := option{}
for _, o := range opts {
o(&opt)
}
- return &EmployeeJWTAuthMiddleware{
+ return &UserJWTAuthMiddleware{
conf: conf,
px: px,
opt: opt,
}
}
-func (m *EmployeeJWTAuthMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
+func (m *UserJWTAuthMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
secret := m.conf.JWT.JWTSecret
unAuth := errorx.ErrUnAuthorization.(*errorx.Error)
unKnow := errorx.ErrUnKnow.(*errorx.Error)
diff --git a/internal/middleware/employeenopermjwtauthmiddleware.go b/internal/middleware/usernopermjwtauthmiddleware.go
similarity index 85%
rename from internal/middleware/employeenopermjwtauthmiddleware.go
rename to internal/middleware/usernopermjwtauthmiddleware.go
index a1c64cc3..fe2195e0 100644
--- a/internal/middleware/employeenopermjwtauthmiddleware.go
+++ b/internal/middleware/usernopermjwtauthmiddleware.go
@@ -7,26 +7,26 @@ import (
"net/http"
)
-type EmployeeNoPermJWTAuthMiddleware struct {
+type UserNoPermJWTAuthMiddleware struct {
conf *config.Config
px *uc.PowerXUseCase
opt option
}
-func NewEmployeeNoPermJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...optionFunc) *EmployeeJWTAuthMiddleware {
+func NewUserNoPermJWTAuthMiddleware(conf *config.Config, px *uc.PowerXUseCase, opts ...optionFunc) *UserJWTAuthMiddleware {
opt := option{}
for _, o := range opts {
o(&opt)
}
- return &EmployeeJWTAuthMiddleware{
+ return &UserJWTAuthMiddleware{
conf: conf,
px: px,
opt: opt,
}
}
-func (m *EmployeeNoPermJWTAuthMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
+func (m *UserNoPermJWTAuthMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
//secret := m.conf.JWTSecret
//unAuth := errorx.ErrUnAuthorization.(*errorx.Error)
//unKnow := errorx.ErrUnKnow.(*errorx.Error)
diff --git a/internal/model/crm/market/store.go b/internal/model/crm/market/store.go
index a53ee2ae..b4da9f8d 100644
--- a/internal/model/crm/market/store.go
+++ b/internal/model/crm/market/store.go
@@ -15,17 +15,17 @@ type Store struct {
PivotDetailImages []*media.PivotMediaResourceToObject `gorm:"polymorphic:Object;polymorphicValue:stores" json:"pivotDetailImages"`
CoverImage *media.MediaResource `gorm:"foreignKey:CoverImageId;references:Id" json:"coverImage"`
- StoreEmployeeId int64 `gorm:"comment:店长Id" json:"storeEmployeeId"`
- Name string `gorm:"comment:店铺名称" json:"name"`
- ContactNumber string `gorm:"comment:手机号码" json:"contactNumber"`
- CoverImageId int64 `gorm:"comment:封面图Id" json:"coverImageId"`
- Email string `gorm:"comment:邮箱地址" json:"email"`
- Address string `gorm:"comment:工作地址" json:"address"`
- Description string `gorm:"comment:店铺描述" json:"description"`
- Longitude float32 `gorm:"comment:经度" json:"longitude"`
- Latitude float32 `gorm:"comment:纬度" json:"latitude"`
- StartWork time.Time `gorm:"comment:开始工作时间" json:"startWork"`
- EndWork time.Time `gorm:"comment:结束工作时间" json:"endWork"`
+ StoreUserId int64 `gorm:"comment:店长Id" json:"storeUserId"`
+ Name string `gorm:"comment:店铺名称" json:"name"`
+ ContactNumber string `gorm:"comment:手机号码" json:"contactNumber"`
+ CoverImageId int64 `gorm:"comment:封面图Id" json:"coverImageId"`
+ Email string `gorm:"comment:邮箱地址" json:"email"`
+ Address string `gorm:"comment:工作地址" json:"address"`
+ Description string `gorm:"comment:店铺描述" json:"description"`
+ Longitude float32 `gorm:"comment:经度" json:"longitude"`
+ Latitude float32 `gorm:"comment:纬度" json:"latitude"`
+ StartWork time.Time `gorm:"comment:开始工作时间" json:"startWork"`
+ EndWork time.Time `gorm:"comment:结束工作时间" json:"endWork"`
}
const TableNameStore = "stores"
diff --git a/internal/model/crm/product/artisan.go b/internal/model/crm/product/artisan.go
index 62db1ff7..884bf79b 100644
--- a/internal/model/crm/product/artisan.go
+++ b/internal/model/crm/product/artisan.go
@@ -18,7 +18,7 @@ type Artisan struct {
CoverImage *media.MediaResource `gorm:"foreignKey:CoverImageId;references:Id" json:"coverImage"`
PivotStoreToArtisans []*PivotStoreToArtisan `gorm:"foreignKey:ArtisanId;references:Id" json:"pivotStoreToArtisans"`
- EmployeeId int64 `gorm:"comment:员工Id" json:"employeeId"`
+ UserId int64 `gorm:"comment:员工Id" json:"userId"`
Name string `gorm:"comment:Artisan名称" json:"name"`
Level int8 `gorm:"comment:级别" json:"level"`
Gender bool `gorm:"comment:性别" json:"gender"`
diff --git a/internal/model/crm/product/product.go b/internal/model/crm/product/product.go
index b2a231ea..763395ee 100644
--- a/internal/model/crm/product/product.go
+++ b/internal/model/crm/product/product.go
@@ -80,7 +80,7 @@ func (mdl *Product) GetForeignReferValue() int64 {
return mdl.Id
}
-// -- pivot employees
+// -- pivot users
func (mdl *Product) LoadPivotSalesChannels(db *gorm.DB, conditions *map[string]interface{}, withClauseAssociations bool) ([]*model.PivotDataDictionaryToObject, error) {
items := []*model.PivotDataDictionaryToObject{}
if conditions == nil {
diff --git a/internal/model/option/option.go b/internal/model/option/option.go
index 479bc7aa..f1a81229 100644
--- a/internal/model/option/option.go
+++ b/internal/model/option/option.go
@@ -1,6 +1,6 @@
package option
-type EmployeeLoginOption struct {
+type UserLoginOption struct {
Account string
PhoneNumber string
Email string
@@ -14,7 +14,7 @@ type FindManyDepartmentsOption struct {
type FindManyPositionsOption struct {
LikeName string
}
-type FindManyEmployeesOption struct {
+type FindManyUsersOption struct {
Ids []int64
Accounts []string
Names []string
diff --git a/internal/model/origanzation/department.go b/internal/model/origanzation/department.go
index 5f68f7cc..c22643f9 100644
--- a/internal/model/origanzation/department.go
+++ b/internal/model/origanzation/department.go
@@ -9,7 +9,7 @@ import (
type Department struct {
model.Model
PDep *Department `gorm:"foreignKey:PId"`
- Leader *Employee `gorm:"foreignKey:LeaderId"`
+ Leader *User `gorm:"foreignKey:LeaderId"`
Ancestors []*Department `gorm:"many2many:department_ancestors;"`
Name string `gorm:"comment:部门名称;column:name" json:"name"`
PId int64 `gorm:"comment:部门名ID;column:pid" json:"pid"`
diff --git a/internal/model/origanzation/employee.go b/internal/model/origanzation/user.go
similarity index 59%
rename from internal/model/origanzation/employee.go
rename to internal/model/origanzation/user.go
index fa732bbf..bb6f0747 100644
--- a/internal/model/origanzation/employee.go
+++ b/internal/model/origanzation/user.go
@@ -8,32 +8,33 @@ import (
"gorm.io/gorm/clause"
)
-type Employee struct {
+type User struct {
model.Model
- Account string `gorm:"comment:账户;column:account;unique" json:"account"`
- Name string `gorm:"comment:名称;column:name" json:"name"`
- NickName string `gorm:"comment:别称;column:nick_name" json:"nick_name"`
+ UUID string `json:"comment:唯一标识;column:uuid;unique;type:uuid" json:"uuid"`
+ Account string `gorm:"comment:账户;column:account unique;type:varchar" json:"account"`
+ Name string `gorm:"comment:名称;column:name;type:varchar" json:"name"`
+ NickName string `gorm:"comment:别称;column:nick_name;type:varchar" json:"nick_name"`
Desc string `gorm:"comment:描述;column:desc" json:"desc"`
PositionID int64 `gorm:"comment:职位ID;column:position_id" json:"position_id"`
Position *Position
- JobTitle string `gorm:"comment:职务;column:job_title" json:"job_title"`
+ JobTitle string `gorm:"comment:职务;column:job_title;type:varchar" json:"job_title"`
DepartmentId int64 `gorm:"comment:部门ID;column:department_id" json:"department_id"`
- MobilePhone string `gorm:"comment:电话;column:mobile_phone" json:"mobile_phone"`
- Gender string `gorm:"comment:性别;column:gender" json:"gender"`
- Email string `gorm:"comment:内部邮箱;column:email" json:"email"`
- ExternalEmail string `gorm:"comment:外部邮箱;column:external_email" json:"external_email"`
- Avatar string `gorm:"comment:图标;column:avatar" json:"avatar"`
- Password string `gorm:"comment:密码;column:password" json:"password"`
- Status string `gorm:"comment:状态;column:status;index" json:"status"`
+ MobilePhone string `gorm:"comment:电话;column:mobile_phone;type:varchar" json:"mobile_phone"`
+ Gender string `gorm:"comment:性别;column:gender;type:varchar" json:"gender"`
+ Email string `gorm:"comment:内部邮箱;column:email;type:varchar" json:"email"`
+ ExternalEmail string `gorm:"comment:外部邮箱;column:external_email;type:varchar" json:"external_email"`
+ Avatar string `gorm:"comment:图标;column:avatar;type:varchar" json:"avatar"`
+ Password string `gorm:"comment:密码;column:password;type:varchar" json:"password"`
+ Status string `gorm:"comment:状态;column:status;index;type:varchar" json:"status"`
IsReserved bool `gorm:"comment:保留字段;column:is_reserved" json:"is_reserved"`
IsActivated bool `gorm:"comment:活跃;column:is_activated" json:"is_activated"`
Department *Department
// comment f9280798048e034c1f4118a2220ade5f847d94b4 该字段不能设置为unique,否则没有关联企业微信账户的员工将会添加失败(null duplicate key)
- WeWorkUserId string `gorm:"comment:微信账户;column:we_work_user_id" json:"we_work_user_id"`
+ WeWorkUserId string `gorm:"comment:微信账户;column:we_work_user_id;type:varchar" json:"we_work_user_id"`
}
-func (e *Employee) HashPassword() (err error) {
+func (e *User) HashPassword() (err error) {
if e.Password != "" {
e.Password, err = HashPassword(e.Password)
}
@@ -47,8 +48,8 @@ const (
)
const (
- EmployeeStatusDisabled = "disabled"
- EmployeeStatusEnabled = "enabled"
+ UserStatusDisabled = "disabled"
+ UserStatusEnabled = "enabled"
)
const defaultCost = bcrypt.MinCost
@@ -68,11 +69,11 @@ func VerifyPassword(hashedPwd string, pwd string) bool {
return err == nil
}
-func (e *Employee) TableName() string {
- return `employees`
+func (e *User) TableName() string {
+ return `users`
}
-func (e *Employee) Action(db *gorm.DB, employees []*Employee) {
+func (e *User) Action(db *gorm.DB, users []*User) {
err := db.Table(e.TableName()).
//Debug().
@@ -80,7 +81,7 @@ func (e *Employee) Action(db *gorm.DB, employees []*Employee) {
clause.OnConflict{Columns: []clause.Column{{Name: `we_work_user_id`}},
DoUpdates: clause.AssignmentColumns([]string{
`name`, `nick_name`, `desc`, `position`, `department_id`, `mobile_phone`, `gender`, `email`, `external_email`, `avatar`}),
- }).CreateInBatches(&employees, 100).Error
+ }).CreateInBatches(&users, 100).Error
if err != nil {
panic(err)
}
diff --git a/internal/model/origanzation/employee_test.go b/internal/model/origanzation/user_test.go
similarity index 100%
rename from internal/model/origanzation/employee_test.go
rename to internal/model/origanzation/user_test.go
diff --git a/internal/model/permission/permission.go b/internal/model/permission/permission.go
index e99c4627..91073f25 100644
--- a/internal/model/permission/permission.go
+++ b/internal/model/permission/permission.go
@@ -8,7 +8,7 @@ type AdminAuthMetadata struct {
UID int64
}
-type EmployeeCasbinPolicy struct {
+type UserCasbinPolicy struct {
ID int64 `gorm:"primarykey"`
PType string
V0 string
diff --git a/internal/model/scrm/organization/weworkdepartment.go b/internal/model/scrm/organization/weworkdepartment.go
index e2b65431..f688010b 100644
--- a/internal/model/scrm/organization/weworkdepartment.go
+++ b/internal/model/scrm/organization/weworkdepartment.go
@@ -8,7 +8,7 @@ import (
type WeWorkDepartment struct {
model.Model
- // Leader *WeWorkEmployee `gorm:"foreignKey:LeaderId"`
+ // Leader *WeWorkUser `gorm:"foreignKey:LeaderId"`
WeWorkDepId int `gorm:"comment:部门ID;column:we_work_dep_id;unique" json:"we_work_dep_id"`
Name string `gorm:"comment:部门名称;column:name" json:"name"`
NameEn string `gorm:"comment:部门英文名称;column:name_en" json:"name_en"`
diff --git a/internal/model/scrm/organization/weworkemployee.go b/internal/model/scrm/organization/weworkuser.go
similarity index 77%
rename from internal/model/scrm/organization/weworkemployee.go
rename to internal/model/scrm/organization/weworkuser.go
index 4a79d8c4..02cec8c0 100644
--- a/internal/model/scrm/organization/weworkemployee.go
+++ b/internal/model/scrm/organization/weworkuser.go
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm/clause"
)
-type WeWorkEmployee struct {
+type WeWorkUser struct {
model.Model
WeWorkUserId string `gorm:"comment:员工ID;column:we_work_user_id;unique" json:"we_work_user_id"`
@@ -26,7 +26,7 @@ type WeWorkEmployee struct {
Status int `gorm:"comment:状态;column:status" json:"status"`
QrCode string `gorm:"comment:二维码;column:qr_code" json:"qr_code"`
Department string `gorm:"comment:部门;column:department" json:"department"`
- RefEmployeeId int64 `gorm:"comment:RefEmployeeId;column:ref_employee_id" json:"ref_employee_id"`
+ RefUserId int64 `gorm:"comment:RefUserId;column:ref_user_id" json:"ref_user_id"`
}
// Table
@@ -34,12 +34,12 @@ type WeWorkEmployee struct {
// @Description:
// @receiver e
// @return string
-func (e WeWorkEmployee) TableName() string {
- return `we_work_employees`
+func (e WeWorkUser) TableName() string {
+ return `we_work_users`
}
type (
- AdapterEmployeeSliceUserIDs func(employee []*WeWorkEmployee) (ids []string)
+ AdapterUserSliceUserIDs func(user []*WeWorkUser) (ids []string)
)
// Query
@@ -47,14 +47,14 @@ type (
// @Description:
// @receiver this
// @param db
-// @return employees
-func (e WeWorkEmployee) Query(db *gorm.DB) (employees []*WeWorkEmployee) {
+// @return users
+func (e WeWorkUser) Query(db *gorm.DB) (users []*WeWorkUser) {
- err := db.Model(e).Find(&employees).Error
+ err := db.Model(e).Find(&users).Error
if err != nil {
panic(err)
}
- return employees
+ return users
}
@@ -63,12 +63,12 @@ func (e WeWorkEmployee) Query(db *gorm.DB) (employees []*WeWorkEmployee) {
// @Description:
// @receiver e
// @param db
-// @param employees
-func (e WeWorkEmployee) Action(db *gorm.DB, employees []*WeWorkEmployee) {
+// @param users
+func (e WeWorkUser) Action(db *gorm.DB, users []*WeWorkUser) {
err := db.Table(e.TableName()).
//Debug().
- Clauses(clause.OnConflict{Columns: []clause.Column{{Name: "we_work_user_id"}}, UpdateAll: true}).CreateInBatches(&employees, 100).Error
+ Clauses(clause.OnConflict{Columns: []clause.Column{{Name: "we_work_user_id"}}, UpdateAll: true}).CreateInBatches(&users, 100).Error
if err != nil {
panic(err)
}
diff --git a/internal/svc/servicecontext.go b/internal/svc/servicecontext.go
index 4778779c..6a239fc5 100644
--- a/internal/svc/servicecontext.go
+++ b/internal/svc/servicecontext.go
@@ -13,12 +13,12 @@ type ServiceContext struct {
PowerX *uc.PowerXUseCase
Custom *uc.CustomUseCase
- MPCustomerJWTAuth rest.Middleware
- MPCustomerGet rest.Middleware
- WebCustomerJWTAuth rest.Middleware
- WebCustomerGet rest.Middleware
- EmployeeJWTAuth rest.Middleware
- EmployeeNoPermJWTAuth rest.Middleware
+ MPCustomerJWTAuth rest.Middleware
+ MPCustomerGet rest.Middleware
+ WebCustomerJWTAuth rest.Middleware
+ WebCustomerGet rest.Middleware
+ UserJWTAuth rest.Middleware
+ UserNoPermJWTAuth rest.Middleware
Plugin *pluginx.Manager
}
@@ -28,15 +28,15 @@ func NewServiceContext(c config.Config, opts ...Option) *ServiceContext {
custom, _ := uc.NewCustomUseCase(&c, powerx)
svcCtx := ServiceContext{
- Config: c,
- PowerX: powerx,
- MPCustomerJWTAuth: middleware.NewMPCustomerJWTAuthMiddleware(&c, powerx).Handle,
- MPCustomerGet: middleware.NewMPCustomerGetMiddleware(&c, powerx).Handle,
- WebCustomerJWTAuth: middleware.NewWebCustomerJWTAuthMiddleware(&c, powerx).Handle,
- WebCustomerGet: middleware.NewWebCustomerGetMiddleware(&c, powerx).Handle,
- EmployeeJWTAuth: middleware.NewEmployeeJWTAuthMiddleware(&c, powerx).Handle,
- EmployeeNoPermJWTAuth: middleware.NewEmployeeNoPermJWTAuthMiddleware(&c, powerx).Handle,
- Custom: custom,
+ Config: c,
+ PowerX: powerx,
+ 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,
+ Custom: custom,
}
for _, opt := range opts {
diff --git a/internal/types/types.go b/internal/types/types.go
index e6ebaeec..50fb4b9f 100644
--- a/internal/types/types.go
+++ b/internal/types/types.go
@@ -7,7 +7,7 @@ type GetHomeReply struct {
Version string `json:"version,optional"`
}
-type GetEmployeeOptionsRequest struct {
+type GetUserOptionsRequest struct {
LikeName string `form:"likeName,optional"`
LikeEmail string `form:"likeEmail,optional"`
LikePhoneNumber string `form:"likePhoneNumber,optional"`
@@ -15,7 +15,7 @@ type GetEmployeeOptionsRequest struct {
PageSize int `form:"pageSize,optional"`
}
-type EmployeeOption struct {
+type UserOption struct {
Id int64 `json:"id"`
Avatar string `json:"avatar"`
Account string `json:"account"`
@@ -24,26 +24,26 @@ type EmployeeOption struct {
PhoneNumber string `json:"phoneNumber"`
}
-type GetEmployeeOptionsReply struct {
- List []EmployeeOption `json:"list"`
- PageIndex int `json:"pageIndex"`
- PageSize int `json:"pageSize"`
- Total int64 `json:"total"`
+type GetUserOptionsReply struct {
+ List []UserOption `json:"list"`
+ PageIndex int `json:"pageIndex"`
+ PageSize int `json:"pageSize"`
+ Total int64 `json:"total"`
}
-type EmployeeQueryRoleOption struct {
+type UserQueryRoleOption struct {
RoleCode string `json:"roleCode"`
RoleName string `json:"roleName"`
}
-type EmployeeQueryDepartmentOption struct {
+type UserQueryDepartmentOption struct {
DepartmentId int64 `json:"departmentId"`
DepartmentName string `json:"departmentName"`
}
-type GetEmployeeQueryOptionsReply struct {
- Roles []EmployeeQueryRoleOption `json:"roles"`
- Departments []EmployeeQueryDepartmentOption `json:"departments"`
+type GetUserQueryOptionsReply struct {
+ Roles []UserQueryRoleOption `json:"roles"`
+ Departments []UserQueryDepartmentOption `json:"departments"`
}
type GetDepartmentOptionsRequest struct {
@@ -208,15 +208,15 @@ type GetPositionReply struct {
*Position
}
-type GetEmployeeRequest struct {
+type GetUserRequest struct {
Id int64 `path:"id"`
}
-type GetEmployeeReply struct {
- *Employee
+type GetUserReply struct {
+ *User
}
-type ListEmployeesRequest struct {
+type ListUsersRequest struct {
Ids []int64 `form:"ids,optional"`
LikeName string `form:"likeName,optional"`
LikeEmail string `form:"likeEmail,optional"`
@@ -229,48 +229,48 @@ type ListEmployeesRequest struct {
PageSize int `form:"pageSize,optional"`
}
-type EmployeeDepartment struct {
+type UserDepartment struct {
DepId int64 `json:"depId"`
DepName string `json:"depName"`
}
-type Employee 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 *EmployeeDepartment `json:"department"`
- Position *Position `json:"position"`
- PositionId int64 `json:"positionId"`
- JobTitle string `json:"jobTitle"`
- IsEnabled bool `json:"isEnabled"`
- CreatedAt string `json:"createdAt"`
-}
-
-type ListEmployeesReply struct {
- List []Employee `json:"list"`
- PageIndex int `json:"pageIndex"`
- PageSize int `json:"pageSize"`
- Total int64 `json:"total"`
+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 ListUsersReply struct {
+ List []User `json:"list"`
+ PageIndex int `json:"pageIndex"`
+ PageSize int `json:"pageSize"`
+ Total int64 `json:"total"`
}
-type SyncEmployeesRequest struct {
+type SyncUsersRequest struct {
Source string `json:"source"`
Target string `json:"target"`
}
-type SyncEmployeesReply struct {
+type SyncUsersReply struct {
Status bool `json:"status"`
}
-type CreateEmployeeRequest struct {
+type CreateUserRequest struct {
Account string `json:"account"`
Name string `json:"name"`
NickName string `json:"nickName,optional"`
@@ -286,11 +286,11 @@ type CreateEmployeeRequest struct {
Password string `json:"password,optional"`
}
-type CreateEmployeeReply struct {
+type CreateUserReply struct {
Id int64 `json:"id"`
}
-type UpdateEmployeeRequest struct {
+type UpdateUserRequest struct {
Id int64 `path:"id"`
Name string `json:"name,optional"`
NickName string `json:"nickName,optional"`
@@ -307,15 +307,15 @@ type UpdateEmployeeRequest struct {
Status string `json:"status,optional,options=enabled|disabled"`
}
-type UpdateEmployeeReply struct {
- *Employee
+type UpdateUserReply struct {
+ *User
}
-type DeleteEmployeeRequest struct {
+type DeleteUserRequest struct {
Id int64 `path:"id"`
}
-type DeleteEmployeeReply struct {
+type DeleteUserReply struct {
Id int64 `json:"id"`
}
@@ -391,12 +391,12 @@ type SetRolePermissionsReply struct {
Status string `json:"status"`
}
-type SetRoleEmployeesRequest struct {
- RoleCode string `path:"roleCode"`
- EmployeeIds []int64 `json:"employeeIds"`
+type SetRoleUsersRequest struct {
+ RoleCode string `path:"roleCode"`
+ UserIds []int64 `json:"userIds"`
}
-type SetRoleEmployeesReply struct {
+type SetRoleUsersReply struct {
Status string `json:"status"`
}
@@ -408,32 +408,32 @@ type ListAPIReply struct {
List []AdminAPI `json:"list"`
}
-type GetRoleEmployeesReqeust struct {
+type GetRoleUsersReqeust struct {
RoleCode string `path:"roleCode"`
PageIndex int `form:"pageIndex"`
PageSize int `form:"pageSize"`
}
-type RoleEmployeeDepartment struct {
+type RoleUserDepartment struct {
Id int64 `json:"id"`
Name string `json:"name"`
}
-type RoleEmployee struct {
- Id int64 `json:"id"`
- Name string `json:"name"`
- Nickname string `json:"nickname"`
- Account string `json:"account"`
- PhoneNumber string `json:"phoneNumber"`
- Department *RoleEmployeeDepartment `json:"department"`
- Email string `json:"email"`
+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 GetRoleEmployeesReply struct {
- List []RoleEmployee `json:"list"`
- PageIndex int `json:"pageIndex"`
- PageSize int `json:"pageSize"`
- Total int64 `json:"total"`
+type GetRoleUsersReply struct {
+ List []RoleUser `json:"list"`
+ PageIndex int `json:"pageIndex"`
+ PageSize int `json:"pageSize"`
+ Total int64 `json:"total"`
}
type SetUserRolesRequest struct {
@@ -851,12 +851,12 @@ type DeleteLeadReply struct {
LeadId int64 `json:"id"`
}
-type AssignLeadToEmployeeRequest struct {
- Id string `path:"id"`
- EmployeeId int64 `json:"employeeId"`
+type AssignLeadToUserRequest struct {
+ Id string `path:"id"`
+ UserId int64 `json:"userId"`
}
-type AssignLeadToEmployeeReply struct {
+type AssignLeadToUserReply struct {
LeadId int64 `json:"leadId"`
}
@@ -953,12 +953,12 @@ type DeleteCustomerReply struct {
CustomerId int64 `json:"id"`
}
-type AssignCustomerToEmployeeRequest struct {
- Id string `path:"id"`
- EmployeeId int64 `json:"employeeId"`
+type AssignCustomerToUserRequest struct {
+ Id string `path:"id"`
+ UserId int64 `json:"userId"`
}
-type AssignCustomerToEmployeeReply struct {
+type AssignCustomerToUserReply struct {
CustomerId int64 `json:"customerId"`
}
@@ -1042,12 +1042,12 @@ type DeleteRegisterCodeReply struct {
RegisterCodeId int64 `json:"id"`
}
-type AssignRegisterCodeToEmployeeRequest struct {
- Id string `path:"id"`
- EmployeeId int64 `json:"employeeId"`
+type AssignRegisterCodeToUserRequest struct {
+ Id string `path:"id"`
+ UserId int64 `json:"userId"`
}
-type AssignRegisterCodeToEmployeeReply struct {
+type AssignRegisterCodeToUserReply struct {
RegisterCodeId int64 `json:"customerId"`
}
@@ -1142,7 +1142,7 @@ type StoreArtisanSpecific struct {
}
type StoreArtisan struct {
- EmployeeId int64 `json:"employeeId,optional"`
+ UserId int64 `json:"userId,optional"`
Name string `json:"name,optional"`
Level int8 `json:"level,optional"`
Gender bool `json:"gender,optional"`
@@ -1159,23 +1159,23 @@ type StoreArtisan struct {
}
type Store struct {
- Id int64 `json:"id,optional"`
- Name string `json:"name"`
- StoreEmployeeId int64 `json:"storeEmployeeId,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"`
+ 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 ListStoresPageRequest struct {
@@ -1227,8 +1227,8 @@ type DeleteStoreReply struct {
}
type AssignStoreManagerRequest struct {
- Id int64 `path:"id"`
- EmployeeId int64 `json:"employeeId"`
+ Id int64 `path:"id"`
+ UserId int64 `json:"userId"`
}
type AssignStoreManagerReply struct {
@@ -1310,7 +1310,7 @@ type Opportunity struct {
Probability float32 `json:"probability"`
Source string `json:"source"`
Type string `json:"type"`
- EmployeeId int64 `json:"employeeId"`
+ UserId int64 `json:"userId"`
Stage string `json:"stage"`
ClosedDate string `json:"closedDate"`
CreatedAt string `json:"createdAt"`
@@ -1331,7 +1331,7 @@ type CreateOpportunityRequest struct {
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"`
- EmployeeId int64 `json:"employeeId"`
+ UserId int64 `json:"userId"`
Stage string `json:"stage"`
}
@@ -1339,12 +1339,12 @@ type CreateOpportunityReply struct {
Id int64 `json:"id"`
}
-type AssignEmployeeToOpportunityRequest struct {
- Id int64 `path:"id"`
- EmployeeId int64 `json:"employeeId"`
+type AssignUserToOpportunityRequest struct {
+ Id int64 `path:"id"`
+ UserId int64 `json:"userId"`
}
-type AssignEmployeeToOpportunityReply struct {
+type AssignUserToOpportunityReply struct {
Id int64 `json:"id"`
}
@@ -1356,7 +1356,7 @@ type UpdateOpportunityRequest struct {
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"`
- EmployeeId int64 `json:"employeeId,optional"`
+ UserId int64 `json:"userId,optional"`
Stage string `json:"stage,optional"`
ClosedDate string `json:"closedDate,optional"`
}
@@ -1935,7 +1935,7 @@ type DeletePriceBookEntryReply struct {
type Artisan struct {
Id int64 `json:"id,optional"`
- EmployeeId int64 `json:"employeeId,optional"`
+ UserId int64 `json:"userId,optional"`
Name string `json:"name,optional"`
Level int8 `json:"level"`
Gender bool `json:"gender,optional"`
@@ -2324,12 +2324,12 @@ type GetContractWayGroupListReply struct {
}
type GetContractWaysRequest struct {
- EmployeeId int64 `form:"employeeId,optional"`
- Name string `form:"name,optional"`
- StartDate string `form:"startDate,optional"`
- EndDate string `form:"endDate,optional"`
- PageIndex int `form:"pageIndex"`
- PageSize int `form:"pageSize"`
+ 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 GetContractWaysReply struct {
@@ -2412,7 +2412,7 @@ type SyncWeWorkOrganizationReply struct {
Status string `json:"status"`
}
-type ListWeWorkEmployeeReqeust struct {
+type ListWeWorkUserReqeust struct {
Id int64 `json:"id,optional"` // 微信员工ID
Name string `json:"name,optional"` // 微信员工名称
Alias string `json:"alias,optional"` // 微信员工别称
@@ -2425,14 +2425,14 @@ type ListWeWorkEmployeeReqeust struct {
PageSize int `form:"pageSize,optional"`
}
-type ListWeWorkEmployeeReply struct {
- List []*WechatEmployee `json:"list"`
- PageIndex int `json:"pageIndex"`
- PageSize int `json:"pageSize"`
- Total int64 `json:"total"`
+type ListWeWorkUserReply struct {
+ List []*WechatUser `json:"list"`
+ PageIndex int `json:"pageIndex"`
+ PageSize int `json:"pageSize"`
+ Total int64 `json:"total"`
}
-type WechatEmployee struct {
+type WechatUser struct {
WeWorkUserId string `json:"weWorkUserId"`
Name string `json:"name"`
Position string `json:"position"`
@@ -2536,9 +2536,9 @@ type AllowUserinfos struct {
User []User `json:"user"`
}
-type User struct {
- Userid string `json:"userId"`
-}
+//type User struct {
+// Userid string `json:"userId"`
+//}
type AllowPartys struct {
Partyid []int `json:"partyId"`
diff --git a/internal/uc/powerx/authorizationadmin.go b/internal/uc/powerx/authorizationadmin.go
index 95d6ccac..d8ec9fac 100644
--- a/internal/uc/powerx/authorizationadmin.go
+++ b/internal/uc/powerx/authorizationadmin.go
@@ -12,6 +12,7 @@ import (
sqladapter "github.com/Blank-Xu/sql-adapter"
"github.com/casbin/casbin/v2"
fileadapter "github.com/casbin/casbin/v2/persist/file-adapter"
+ "github.com/google/uuid"
"github.com/pkg/errors"
"gorm.io/gorm"
"gorm.io/gorm/clause"
@@ -26,10 +27,10 @@ type AdminPermsUseCase struct {
Casbin *casbin.Enforcer
sqlAdapter *sqladapter.Adapter
fileAdapter *fileadapter.Adapter
- employee *OrganizationUseCase
+ user *OrganizationUseCase
}
-func NewAdminPermsUseCase(conf *config.Config, db *gorm.DB, employee *OrganizationUseCase) *AdminPermsUseCase {
+func NewAdminPermsUseCase(conf *config.Config, db *gorm.DB, user *OrganizationUseCase) *AdminPermsUseCase {
//casbin适配器
sqlDB, _ := db.DB()
a, err := sqladapter.NewAdapter(sqlDB, conf.PowerXDatabase.Driver, "casbin_policies")
@@ -47,7 +48,7 @@ func NewAdminPermsUseCase(conf *config.Config, db *gorm.DB, employee *Organizati
Casbin: e,
sqlAdapter: a,
fileAdapter: f,
- employee: employee,
+ user: user,
}
}
@@ -143,7 +144,7 @@ func (uc *AdminPermsUseCase) Init() {
}
// 初始化用户
- if err := uc.db.Model(&origanzation.Employee{}).Count(&count).Error; err != nil {
+ if err := uc.db.Model(&origanzation.User{}).Count(&count).Error; err != nil {
panic(errors.Wrap(err, "init role failed"))
}
if count == 0 {
@@ -160,21 +161,22 @@ func (uc *AdminPermsUseCase) Init() {
if rooName == "" {
rooName = "超级管理员"
}
- root := origanzation.Employee{
+ root := origanzation.User{
+ UUID: uuid.New().String(),
Account: rooAccount,
Password: rooPass,
Name: rooName,
- Status: origanzation.EmployeeStatusEnabled,
+ Status: origanzation.UserStatusEnabled,
IsReserved: true,
}
root.HashPassword()
- if err := uc.db.Model(&origanzation.Employee{}).Create(&root).Error; err != nil {
+ if err := uc.db.Model(&origanzation.User{}).Create(&root).Error; err != nil {
panic(errors.Wrap(err, "init root failed"))
}
}
//// 初始化casbin策略
- //if err := uc.db.Model(&permission.EmployeeCasbinPolicy{}).Count(&count).Error; err != nil {
+ //if err := uc.db.Model(&permission.UserCasbinPolicy{}).Count(&count).Error; err != nil {
// panic(errors.Wrap(err, "init casbin policy failed"))
//}
//if count == 0 {
@@ -203,7 +205,7 @@ func (uc *AdminPermsUseCase) Init() {
AdminAPI: apis,
IsReserved: true,
}, &permission.AdminRole{
- RoleCode: "common_employee",
+ RoleCode: "common_user",
Name: "普通员工",
Desc: "普通员工",
IsReserved: true,
@@ -398,13 +400,13 @@ func (uc *AdminPermsUseCase) CreateAPIGroup(ctx context.Context, group *permissi
return
}
-func (uc *AdminPermsUseCase) SetRoleEmployeesByRoleCode(ctx context.Context, employeeIds []int64, roleCode string) error {
+func (uc *AdminPermsUseCase) SetRoleUsersByRoleCode(ctx context.Context, userIds []int64, roleCode string) error {
_, err := uc.FindOneRoleByRoleCode(ctx, roleCode)
if err != nil {
return err
}
- accounts := uc.employee.FindAccountsByIds(ctx, employeeIds)
+ accounts := uc.user.FindAccountsByIds(ctx, userIds)
if len(accounts) == 0 {
return nil
}
@@ -423,19 +425,19 @@ func (uc *AdminPermsUseCase) SetRoleEmployeesByRoleCode(ctx context.Context, emp
return nil
}
-// ReplaceEmployeeRoles Replace 员工角色
-func (uc *AdminPermsUseCase) ReplaceEmployeeRoles(ctx context.Context, employeeId int64, roleCodes []string) error {
- employee, err := uc.employee.FindOneEmployeeById(ctx, employeeId)
+// ReplaceUserRoles Replace 员工角色
+func (uc *AdminPermsUseCase) ReplaceUserRoles(ctx context.Context, userId int64, roleCodes []string) error {
+ user, err := uc.user.FindOneUserById(ctx, userId)
if err != nil {
return err
}
var policies [][]string
for _, roleCode := range roleCodes {
- policies = append(policies, []string{employee.Account, roleCode})
+ policies = append(policies, []string{user.Account, roleCode})
}
- if _, err := uc.Casbin.RemoveFilteredGroupingPolicy(0, employee.Account); err != nil {
+ if _, err := uc.Casbin.RemoveFilteredGroupingPolicy(0, user.Account); err != nil {
panic(err)
}
if _, err := uc.Casbin.AddGroupingPolicies(policies); err != nil {
diff --git a/internal/uc/powerx/organization.go b/internal/uc/powerx/organization.go
index faae110a..cab52800 100644
--- a/internal/uc/powerx/organization.go
+++ b/internal/uc/powerx/organization.go
@@ -31,8 +31,8 @@ func (uc *OrganizationUseCase) VerifyPassword(hashedPwd string, pwd string) bool
return origanzation.VerifyPassword(hashedPwd, pwd)
}
-func (uc *OrganizationUseCase) CreateEmployee(ctx context.Context, employee *origanzation.Employee) (err error) {
- if err := uc.db.WithContext(ctx).Create(&employee).Error; err != nil {
+func (uc *OrganizationUseCase) CreateUser(ctx context.Context, user *origanzation.User) (err error) {
+ if err := uc.db.WithContext(ctx).Create(&user).Error; err != nil {
// todo use errors.Is() when gorm update ErrDuplicatedKey
if strings.Contains(err.Error(), "duplicate key value violates unique constraint") {
return errorx.WithCause(errorx.ErrBadRequest, "账号已存在")
@@ -42,16 +42,16 @@ func (uc *OrganizationUseCase) CreateEmployee(ctx context.Context, employee *ori
return nil
}
-func (uc *OrganizationUseCase) FindAccountsByIds(ctx context.Context, employeeIds []int64) (accounts []string) {
- err := uc.db.WithContext(ctx).Model(&origanzation.Employee{}).Where("id in ?", employeeIds).Pluck("account", &accounts).Error
+func (uc *OrganizationUseCase) FindAccountsByIds(ctx context.Context, userIds []int64) (accounts []string) {
+ err := uc.db.WithContext(ctx).Model(&origanzation.User{}).Where("id in ?", userIds).Pluck("account", &accounts).Error
if err != nil {
panic(errors.Wrap(err, "find accounts by ids failed"))
}
return accounts
}
-func (uc *OrganizationUseCase) PatchEmployeeByUserId(ctx context.Context, employee *origanzation.Employee, employeeId int64) error {
- result := uc.db.WithContext(ctx).Model(&origanzation.Employee{}).Where(employee.Id).Updates(&employee)
+func (uc *OrganizationUseCase) PatchUserByUserId(ctx context.Context, user *origanzation.User, userId int64) error {
+ result := uc.db.WithContext(ctx).Model(&origanzation.User{}).Where(user.Id).Updates(&user)
if result.Error != nil {
panic(result.Error)
}
@@ -61,7 +61,7 @@ func (uc *OrganizationUseCase) PatchEmployeeByUserId(ctx context.Context, employ
return nil
}
-func buildFindManyEmployeesQueryNoPage(query *gorm.DB, opt *option.FindManyEmployeesOption) *gorm.DB {
+func buildFindManyUsersQueryNoPage(query *gorm.DB, opt *option.FindManyUsersOption) *gorm.DB {
if len(opt.Ids) > 0 {
query.Where("id in ?", opt.Ids)
}
@@ -95,14 +95,14 @@ func buildFindManyEmployeesQueryNoPage(query *gorm.DB, opt *option.FindManyEmplo
return query
}
-func (uc *OrganizationUseCase) FindManyEmployeesPage(ctx context.Context, opt *option.FindManyEmployeesOption) types.Page[*origanzation.Employee] {
- var employees []*origanzation.Employee
+func (uc *OrganizationUseCase) FindManyUsersPage(ctx context.Context, opt *option.FindManyUsersOption) types.Page[*origanzation.User] {
+ var users []*origanzation.User
var count int64
- query := uc.db.WithContext(ctx).Model(&origanzation.Employee{})
+ query := uc.db.WithContext(ctx).Model(&origanzation.User{})
- query = buildFindManyEmployeesQueryNoPage(query, opt)
+ query = buildFindManyUsersQueryNoPage(query, opt)
if err := query.Count(&count).Error; err != nil {
- panic(errors.Wrap(err, "find employees failed"))
+ panic(errors.Wrap(err, "find users failed"))
}
if opt.PageIndex == 0 {
@@ -116,34 +116,34 @@ func (uc *OrganizationUseCase) FindManyEmployeesPage(ctx context.Context, opt *o
query.Offset((opt.PageIndex - 1) * opt.PageSize).Limit(opt.PageSize)
}
- if err := query.Find(&employees).Error; err != nil {
- panic(errors.Wrap(err, "find employees failed"))
+ if err := query.Find(&users).Error; err != nil {
+ panic(errors.Wrap(err, "find users failed"))
}
- return types.Page[*origanzation.Employee]{
- List: employees,
+ return types.Page[*origanzation.User]{
+ List: users,
PageIndex: opt.PageIndex,
PageSize: opt.PageSize,
Total: count,
}
}
-func (uc *OrganizationUseCase) FindOneEmployeeByLoginOption(ctx context.Context, opt *option.EmployeeLoginOption) (employee *origanzation.Employee, err error) {
- if *opt == (option.EmployeeLoginOption{}) {
+func (uc *OrganizationUseCase) FindOneUserByLoginOption(ctx context.Context, opt *option.UserLoginOption) (user *origanzation.User, err error) {
+ if *opt == (option.UserLoginOption{}) {
panic(errors.New("option empty"))
}
- var queryEmployee origanzation.Employee
+ var queryUser origanzation.User
if opt.Account != "" {
- queryEmployee.Account = opt.Account
+ queryUser.Account = opt.Account
}
if opt.Email != "" {
- queryEmployee.Email = opt.Email
+ queryUser.Email = opt.Email
}
if opt.PhoneNumber != "" {
- queryEmployee.MobilePhone = opt.PhoneNumber
+ queryUser.MobilePhone = opt.PhoneNumber
}
- if err = uc.db.WithContext(ctx).Model(&origanzation.Employee{}).Where(&queryEmployee).First(&employee).Error; err != nil {
+ if err = uc.db.WithContext(ctx).Model(&origanzation.User{}).Where(&queryUser).First(&user).Error; err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
return nil, errorx.WithCause(errorx.ErrBadRequest, "用户不存在, 请检查登录信息")
}
@@ -152,8 +152,8 @@ func (uc *OrganizationUseCase) FindOneEmployeeByLoginOption(ctx context.Context,
return
}
-func (uc *OrganizationUseCase) FindOneEmployeeById(ctx context.Context, id int64) (employee *origanzation.Employee, err error) {
- if err = uc.db.WithContext(ctx).Where(id).Preload("Department").Preload("Position").First(&employee).Error; err != nil {
+func (uc *OrganizationUseCase) FindOneUserById(ctx context.Context, id int64) (user *origanzation.User, err error) {
+ if err = uc.db.WithContext(ctx).Where(id).Preload("Department").Preload("Position").First(&user).Error; err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
return nil, errorx.WithCause(errorx.ErrBadRequest, "用户不存在")
}
@@ -162,29 +162,29 @@ func (uc *OrganizationUseCase) FindOneEmployeeById(ctx context.Context, id int64
return
}
-func (uc *OrganizationUseCase) UpdateEmployeeById(ctx context.Context, employee *origanzation.Employee, employeeId int64) error {
- whereCase := origanzation.Employee{
+func (uc *OrganizationUseCase) UpdateUserById(ctx context.Context, user *origanzation.User, userId int64) error {
+ whereCase := origanzation.User{
Model: model.Model{
- Id: employeeId,
+ Id: userId,
},
IsReserved: false,
}
- result := uc.db.WithContext(ctx).Where(whereCase, "is_reserved").Clauses(&clause.Returning{}).Updates(employee)
+ result := uc.db.WithContext(ctx).Where(whereCase, "is_reserved").Clauses(&clause.Returning{}).Updates(user)
if result.RowsAffected == 0 {
return errorx.WithCause(errorx.ErrBadRequest, "更新失败, 用户保留或不存在")
}
err := result.Error
if err != nil {
- panic(errors.Wrap(err, "delete employee failed"))
+ panic(errors.Wrap(err, "delete user failed"))
}
return nil
}
-func (uc *OrganizationUseCase) DeleteEmployeeById(ctx context.Context, id int64) error {
- result := uc.db.WithContext(ctx).Where(origanzation.Employee{IsReserved: false}, "is_reserved").Delete(&origanzation.Employee{}, id)
+func (uc *OrganizationUseCase) DeleteUserById(ctx context.Context, id int64) error {
+ result := uc.db.WithContext(ctx).Where(origanzation.User{IsReserved: false}, "is_reserved").Delete(&origanzation.User{}, id)
err := result.Error
if err != nil {
- panic(errors.Wrap(err, "delete employee failed"))
+ panic(errors.Wrap(err, "delete user failed"))
}
if result.RowsAffected == 0 {
return errorx.WithCause(errorx.ErrBadRequest, "删除失败")
@@ -192,16 +192,16 @@ func (uc *OrganizationUseCase) DeleteEmployeeById(ctx context.Context, id int64)
return nil
}
-// FindEmployeePositionRoleCodes 获取员工的职位的角色代码
-func (uc *OrganizationUseCase) FindEmployeePositionRoleCodes(ctx context.Context, employeeId int64) (roleCodes []string, err error) {
- var employee origanzation.Employee
- if err = uc.db.WithContext(ctx).Preload("Position.Roles").First(&employee, employeeId).Error; err != nil {
+// FindUserPositionRoleCodes 获取员工的职位的角色代码
+func (uc *OrganizationUseCase) FindUserPositionRoleCodes(ctx context.Context, userId int64) (roleCodes []string, err error) {
+ var user origanzation.User
+ if err = uc.db.WithContext(ctx).Preload("Position.Roles").First(&user, userId).Error; err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
return nil, errorx.WithCause(errorx.ErrBadRequest, "用户不存在")
}
panic(err)
}
- roleCodes = slicex.SlicePluck(employee.Position.Roles, func(item *permission.AdminRole) string {
+ roleCodes = slicex.SlicePluck(user.Position.Roles, func(item *permission.AdminRole) string {
return item.RoleCode
})
return
@@ -293,8 +293,8 @@ func (uc *OrganizationUseCase) FindAllDepartments(ctx context.Context) (departme
return
}
-func (uc *OrganizationUseCase) CountEmployeeInDepartmentByIds(ctx context.Context, depIds []int64) (count int64) {
- if err := uc.db.WithContext(ctx).Model(origanzation.Employee{}).Where("department_id in ?", depIds).Count(&count).Error; err != nil {
+func (uc *OrganizationUseCase) CountUserInDepartmentByIds(ctx context.Context, depIds []int64) (count int64) {
+ if err := uc.db.WithContext(ctx).Model(origanzation.User{}).Where("department_id in ?", depIds).Count(&count).Error; err != nil {
panic(err)
}
return count
diff --git a/internal/uc/powerx/scrm/scene/scene.go b/internal/uc/powerx/scrm/scene/scene.go
index 8b64c765..8b944b14 100644
--- a/internal/uc/powerx/scrm/scene/scene.go
+++ b/internal/uc/powerx/scrm/scene/scene.go
@@ -26,7 +26,7 @@ type (
// @Description:
// @param db
// @param wework
-// @return iEmployeeInterface
+// @return iUserInterface
func Repo(db *gorm.DB, kv *redis.Redis) IsceneInterface {
return &sceneUseCase{
diff --git a/internal/uc/powerx/scrm/wechat/interface.go b/internal/uc/powerx/scrm/wechat/interface.go
index 0e476147..e6ad5147 100644
--- a/internal/uc/powerx/scrm/wechat/interface.go
+++ b/internal/uc/powerx/scrm/wechat/interface.go
@@ -34,9 +34,9 @@ type IWechatInterface interface {
iWeWorkDepartmentInterface
//
- // @Description: Employee
+ // @Description: User
//
- iWeWorkEmployeeInterface
+ iWeWorkUserInterface
//
// @Description: Customer
@@ -95,24 +95,24 @@ type iWeWorkDepartmentInterface interface {
FindManyWeWorkDepartmentsPage(ctx context.Context, option *types.PageOption[FindManyWechatDepartmentsOption]) (*types.Page[*organization.WeWorkDepartment], error)
}
-// iWeWorkEmployeeInterface
+// iWeWorkUserInterface
// @Description: 员工
-type iWeWorkEmployeeInterface interface {
+type iWeWorkUserInterface interface {
//
- // PullSyncDepartmentsAndEmployeesRequest
+ // PullSyncDepartmentsAndUsersRequest
// @Description: 同步组织架构
// @param ctx
// @return error
//
- PullSyncDepartmentsAndEmployeesRequest(ctx context.Context) error
+ PullSyncDepartmentsAndUsersRequest(ctx context.Context) error
//
- // FindManyWechatEmployeesPage
+ // FindManyWechatUsersPage
// @Description: 查询员工
// @param ctx
// @param opt
- // @return *types.Page[*organization.WeWorkEmployee]
+ // @return *types.Page[*organization.WeWorkUser]
//
- FindManyWechatEmployeesPage(ctx context.Context, opt *types.PageOption[FindManyWechatEmployeesOption]) (*types.Page[*organization.WeWorkEmployee], error)
+ FindManyWechatUsersPage(ctx context.Context, opt *types.PageOption[FindManyWechatUsersOption]) (*types.Page[*organization.WeWorkUser], error)
}
// iWeWorkCustomerInterface
@@ -267,10 +267,8 @@ type iCommonInterface interface {
FindWeWorkResourceListFromLocalPage(opt *types.ListWeWorkResourceImageRequest) (*types.Page[*resource.WeWorkResource], error)
}
-//
-// iQrcodeInterface
-// @Description: 活码
-//
+// iQrcodeInterface
+// @Description: 活码
type iQrcodeInterface interface {
//
@@ -315,10 +313,8 @@ type iQrcodeInterface interface {
UpdateSceneQrcodeLink(qid string, link string) error
}
-//
-// iTagInterface
-// @Description: TAG
-//
+// iTagInterface
+// @Description: TAG
type iTagInterface interface {
//
// FindListWeWorkTagGroupOption
diff --git a/internal/uc/powerx/scrm/wechat/wechat.go b/internal/uc/powerx/scrm/wechat/wechat.go
index 669014c5..1eff5726 100644
--- a/internal/uc/powerx/scrm/wechat/wechat.go
+++ b/internal/uc/powerx/scrm/wechat/wechat.go
@@ -95,14 +95,14 @@ type (
help struct{}
hash power.HashMap
modelOrganization struct {
- employee origanzation.Employee
+ user origanzation.User
department origanzation.Department
}
modelWeworkApp struct {
group app.WeWorkAppGroup
}
modelWeworkOrganization struct {
- employee organization.WeWorkEmployee
+ user organization.WeWorkUser
department organization.WeWorkDepartment
}
modelWeworkResource struct {
@@ -125,7 +125,7 @@ type (
// @Description:
// @param db
// @param wework
-// @return iEmployeeInterface
+// @return iUserInterface
func Repo(db *gorm.DB, wework *work.Work, kv *redis.Redis) IWechatInterface {
return &wechatUseCase{
@@ -160,9 +160,9 @@ type FindManyWechatDepartmentsOption struct {
Name string
}
-// FindManyWechatEmployeesOption
+// FindManyWechatUsersOption
// @Description:
-type FindManyWechatEmployeesOption struct {
+type FindManyWechatUsersOption struct {
WeWorkUserId string `json:"we_work_user_id"` //员工唯一ID
Ids []int64
Names []string
diff --git a/internal/uc/powerx/scrm/wechat/weworkcustomer.go b/internal/uc/powerx/scrm/wechat/weworkcustomer.go
index 9bdee373..8f964dd2 100644
--- a/internal/uc/powerx/scrm/wechat/weworkcustomer.go
+++ b/internal/uc/powerx/scrm/wechat/weworkcustomer.go
@@ -16,16 +16,15 @@ import (
"strings"
)
-//
// FindManyWeWorkCustomerPage
-// @Description:
-// @receiver this
-// @param ctx
-// @param opt
-// @param sync
-// @return *types.Page[*customer.WeWorkExternalContacts]
-// @return error
//
+// @Description:
+// @receiver this
+// @param ctx
+// @param opt
+// @param sync
+// @return *types.Page[*customer.WeWorkExternalContacts]
+// @return error
func (this wechatUseCase) FindManyWeWorkCustomerPage(ctx context.Context, opt *types.PageOption[FindManyWechatCustomerOption], sync int) (*types.Page[*customer.WeWorkExternalContacts], error) {
if sync > 0 {
@@ -62,13 +61,12 @@ func (this wechatUseCase) FindManyWeWorkCustomerPage(ctx context.Context, opt *t
}, err
}
-//
// buildFindManyCustomerQueryNoPage
-// @Description:
-// @param query
-// @param opt
-// @return *gorm.DB
//
+// @Description:
+// @param query
+// @param opt
+// @return *gorm.DB
func buildFindManyCustomerQueryNoPage(query *gorm.DB, opt *FindManyWechatCustomerOption) *gorm.DB {
if v := opt.UserId; v != `` {
@@ -85,14 +83,13 @@ func buildFindManyCustomerQueryNoPage(query *gorm.DB, opt *FindManyWechatCustome
return query
}
-//
// PullListWeWorkCustomerRequest
-// @Description:
-// @receiver this
-// @param userID
-// @return []*response.ResponseExternalContact
-// @return error
//
+// @Description:
+// @receiver this
+// @param userID
+// @return []*response.ResponseExternalContact
+// @return error
func (this wechatUseCase) PullListWeWorkCustomerRequest(userID ...string) ([]*response.ResponseExternalContact, error) {
var err error
@@ -139,12 +136,11 @@ func (this wechatUseCase) PullListWeWorkCustomerRequest(userID ...string) ([]*re
}
-//
// transferExternalContactToModel
-// @Description:
-// @param contact
-// @return *customer.WeWorkExternalContacts
//
+// @Description:
+// @param contact
+// @return *customer.WeWorkExternalContacts
func transferExternalContactToModel(contact *models.ExternalContact, userID string) customer.WeWorkExternalContacts {
return customer.WeWorkExternalContacts{
@@ -168,13 +164,12 @@ func transferExternalContactToModel(contact *models.ExternalContact, userID stri
}
}
-//
// transferExternalContactFollowToModel
-// @Description:
-// @param follow
-// @param externalUserID
-// @return customer.WeWorkExternalContactFollow
//
+// @Description:
+// @param follow
+// @param externalUserID
+// @return customer.WeWorkExternalContactFollow
func transferExternalContactFollowToModel(follow *models.FollowUser, externalUserID string) customer.WeWorkExternalContactFollow {
tags, _ := json.Marshal(follow.Tags)
@@ -196,22 +191,21 @@ func transferExternalContactFollowToModel(follow *models.FollowUser, externalUse
}
}
-//
// pullSyncWeWorkCustomer
-// @Description: 全量/增量同步客户信息
-// @receiver this
-// @param ids
//
+// @Description: 全量/增量同步客户信息
+// @receiver this
+// @param ids
func (this *wechatUseCase) pullSyncWeWorkCustomerRequest(ids ...string) {
if len(ids) > 0 && ids[0] == `` {
- workEmployees := this.modelWeworkOrganization.employee.Query(this.db)
- ids = organization.AdapterEmployeeSliceUserIDs(func(employees []*organization.WeWorkEmployee) (ids []string) {
- for _, employee := range employees {
- ids = append(ids, employee.WeWorkUserId)
+ workUsers := this.modelWeworkOrganization.user.Query(this.db)
+ ids = organization.AdapterUserSliceUserIDs(func(users []*organization.WeWorkUser) (ids []string) {
+ for _, user := range users {
+ ids = append(ids, user.WeWorkUserId)
}
return ids
- })(workEmployees)
+ })(workUsers)
}
_, _ = this.PullListWeWorkCustomerRequest(ids...)
diff --git a/internal/uc/powerx/scrm/wechat/weworkemployee.go b/internal/uc/powerx/scrm/wechat/weworkuser.go
similarity index 51%
rename from internal/uc/powerx/scrm/wechat/weworkemployee.go
rename to internal/uc/powerx/scrm/wechat/weworkuser.go
index f22ec146..dbeb15d7 100644
--- a/internal/uc/powerx/scrm/wechat/weworkemployee.go
+++ b/internal/uc/powerx/scrm/wechat/weworkuser.go
@@ -12,82 +12,82 @@ import (
"strings"
)
-// CreateWeWorkEmployeeRequest
+// CreateWeWorkUserRequest
//
// @Description:
// @receiver uc
// @param ctx
// @param dep
// @return error
-func (this *wechatUseCase) CreateWeWorkEmployeeRequest(ctx context.Context, employee *organization.WeWorkEmployee) (err error) {
+func (this *wechatUseCase) CreateWeWorkUserRequest(ctx context.Context, user *organization.WeWorkUser) (err error) {
- create, err := this.wework.User.Create(ctx, this.employeeModelToWeWorkRequest(employee))
+ create, err := this.wework.User.Create(ctx, this.userModelToWeWorkRequest(user))
if err != nil {
panic(err)
} else {
- err = this.help.error(`scrm.create.wework.employee.error`, *create)
+ err = this.help.error(`scrm.create.wework.user.error`, *create)
}
if err == nil {
- this.modelWeworkOrganization.employee.Action(this.db, []*organization.WeWorkEmployee{employee})
+ this.modelWeworkOrganization.user.Action(this.db, []*organization.WeWorkUser{user})
}
return err
}
-// UpdateWeWorkEmployeeRequest
+// UpdateWeWorkUserRequest
//
// @Description:
// @receiver this
// @param ctx
// @param dep
// @return err
-func (this *wechatUseCase) UpdateWeWorkEmployeeRequest(ctx context.Context, employee *organization.WeWorkEmployee) (err error) {
+func (this *wechatUseCase) UpdateWeWorkUserRequest(ctx context.Context, user *organization.WeWorkUser) (err error) {
- update, err := this.wework.User.Update(ctx, this.employeeModelToWeWorkRequest(employee))
+ update, err := this.wework.User.Update(ctx, this.userModelToWeWorkRequest(user))
if err != nil {
panic(err)
} else {
- err = this.help.error(`scrm.update.wework.organization.employee.error`, *update)
+ err = this.help.error(`scrm.update.wework.organization.user.error`, *update)
}
if err == nil {
- this.modelWeworkOrganization.employee.Action(this.db, []*organization.WeWorkEmployee{employee})
+ this.modelWeworkOrganization.user.Action(this.db, []*organization.WeWorkUser{user})
}
return err
}
-// employeeModelToWeWorkRequest
+// userModelToWeWorkRequest
//
// @Description:
-// @param employee
+// @param user
// @return *request.RequestUserDetail
-func (this *wechatUseCase) employeeModelToWeWorkRequest(employee *organization.WeWorkEmployee) *request.RequestUserDetail {
+func (this *wechatUseCase) userModelToWeWorkRequest(user *organization.WeWorkUser) *request.RequestUserDetail {
return &request.RequestUserDetail{
- Userid: employee.WeWorkUserId,
- Name: employee.Name,
- Alias: employee.Alias,
- Mobile: employee.Mobile,
- Position: employee.Position,
- Email: employee.Email,
- BizMail: employee.BizMail,
- Telephone: employee.Telephone,
- Address: employee.Address,
- MainDepartment: employee.WeWorkMainDepartmentId,
+ Userid: user.WeWorkUserId,
+ Name: user.Name,
+ Alias: user.Alias,
+ Mobile: user.Mobile,
+ Position: user.Position,
+ Email: user.Email,
+ BizMail: user.BizMail,
+ Telephone: user.Telephone,
+ Address: user.Address,
+ MainDepartment: user.WeWorkMainDepartmentId,
}
}
-// PullSyncDepartmentsAndEmployeesRequest
+// PullSyncDepartmentsAndUsersRequest
//
// @Description:
// @receiver uc
// @param ctx
// @return error
-func (this *wechatUseCase) PullSyncDepartmentsAndEmployeesRequest(ctx context.Context) error {
+func (this *wechatUseCase) PullSyncDepartmentsAndUsersRequest(ctx context.Context) error {
list, err := this.wework.Department.SimpleList(ctx, 1)
if err != nil {
@@ -105,7 +105,7 @@ func (this *wechatUseCase) PullSyncDepartmentsAndEmployeesRequest(ctx context.Co
go func(val response.DepartmentID) {
defer this.gLock.Done()
this.deparment(val)
- this.employee(val)
+ this.user(val)
}(val)
@@ -145,12 +145,12 @@ func (this *wechatUseCase) deparment(val response.DepartmentID) {
}
-// employee
+// user
//
// @Description:
// @receiver this
// @param val
-func (this *wechatUseCase) employee(val response.DepartmentID) {
+func (this *wechatUseCase) user(val response.DepartmentID) {
users, err := this.wework.User.GetDetailedDepartmentUsers(this.ctx, val.ID, 0)
if err != nil {
@@ -160,40 +160,40 @@ func (this *wechatUseCase) employee(val response.DepartmentID) {
}
if err == nil && len(users.UserList) > 0 {
- employees := []*organization.WeWorkEmployee{}
- for _, user := range users.UserList {
+ users := []*organization.WeWorkUser{}
+ for _, user := range users {
if user != nil {
- open, _ := this.wework.User.UserIdToOpenID(this.ctx, user.UserID)
- employees = append(employees, &organization.WeWorkEmployee{
- WeWorkUserId: user.UserID,
+ open, _ := this.wework.User.UserIdToOpenID(this.ctx, user.WeWorkUserId)
+ users = append(users, &organization.WeWorkUser{
+ WeWorkUserId: user.WeWorkUserId,
Name: user.Name,
Position: user.Position,
- Mobile: user.UserID,
+ Mobile: user.WeWorkUserId,
Email: user.Email,
Alias: user.Alias,
OpenUserId: open.OpenID,
- WeWorkMainDepartmentId: user.MainDepartment,
+ WeWorkMainDepartmentId: user.WeWorkMainDepartmentId,
Status: user.Status,
QrCode: user.QrCode,
- RefEmployeeId: 0,
+ RefUserId: 0,
})
}
}
- this.modelWeworkOrganization.employee.Action(this.db, employees)
+ this.modelWeworkOrganization.user.Action(this.db, users)
// sync to local
- //this.modelOrganization.employee.Action(this.db, this.employeeFromWeWorkSyncToLocal(employees))
+ //this.modelOrganization.user.Action(this.db, this.userFromWeWorkSyncToLocal(users))
}
}
-// buildFindManyEmployeesQueryNoPage
+// buildFindManyUsersQueryNoPage
//
// @Description:
// @param query
// @param opt
// @return *gorm.DB
-func buildFindManyEmployeesQueryNoPage(query *gorm.DB, opt *FindManyWechatEmployeesOption) *gorm.DB {
+func buildFindManyUsersQueryNoPage(query *gorm.DB, opt *FindManyWechatUsersOption) *gorm.DB {
if len(opt.Ids) > 0 {
query.Where("id in ?", opt.Ids)
}
@@ -221,20 +221,20 @@ func buildFindManyEmployeesQueryNoPage(query *gorm.DB, opt *FindManyWechatEmploy
return query
}
-// FindManyWechatEmployeesPage
+// FindManyWechatUsersPage
//
// @Description:
// @receiver uc
// @param ctx
// @param opt
-// @return *types.Page[*organization.WeWorkEmployee]
+// @return *types.Page[*organization.WeWorkUser]
// @return error
-func (this *wechatUseCase) FindManyWechatEmployeesPage(ctx context.Context, opt *types.PageOption[FindManyWechatEmployeesOption]) (*types.Page[*organization.WeWorkEmployee], error) {
+func (this *wechatUseCase) FindManyWechatUsersPage(ctx context.Context, opt *types.PageOption[FindManyWechatUsersOption]) (*types.Page[*organization.WeWorkUser], error) {
- var employees []*organization.WeWorkEmployee
+ var users []*organization.WeWorkUser
var count int64
- query := this.db.WithContext(ctx).Table(this.modelWeworkOrganization.employee.TableName())
+ query := this.db.WithContext(ctx).Table(this.modelWeworkOrganization.user.TableName())
if opt.PageIndex == 0 {
opt.PageIndex = 1
@@ -242,7 +242,7 @@ func (this *wechatUseCase) FindManyWechatEmployeesPage(ctx context.Context, opt
if opt.PageSize == 0 {
opt.PageSize = powermodel.PageDefaultSize
}
- query = buildFindManyEmployeesQueryNoPage(query, &opt.Option)
+ query = buildFindManyUsersQueryNoPage(query, &opt.Option)
if err := query.Count(&count).Error; err != nil {
return nil, err
@@ -251,64 +251,64 @@ func (this *wechatUseCase) FindManyWechatEmployeesPage(ctx context.Context, opt
query.Offset((opt.PageIndex - 1) * opt.PageSize).Limit(opt.PageSize)
}
- err := query.Find(&employees).Error
+ err := query.Find(&users).Error
- return &types.Page[*organization.WeWorkEmployee]{
- List: employees,
+ return &types.Page[*organization.WeWorkUser]{
+ List: users,
PageIndex: opt.PageIndex,
PageSize: opt.PageSize,
Total: count,
}, err
}
-// getWechatEmployeeIDs
+// getWechatUserIDs
//
// @Description:
// @receiver uc
// @param ctx
// @param opt
-// @return *types.Page[*organization.WeWorkEmployee]
+// @return *types.Page[*organization.WeWorkUser]
// @return error
-func (this *wechatUseCase) getWechatEmployeeIDs(ctx context.Context) (ids []string, err error) {
+func (this *wechatUseCase) getWechatUserIDs(ctx context.Context) (ids []string, err error) {
- ids = organization.AdapterEmployeeSliceUserIDs(func(employees []*organization.WeWorkEmployee) (ids []string) {
- for _, employee := range employees {
- ids = append(ids, employee.WeWorkUserId)
+ ids = organization.AdapterUserSliceUserIDs(func(users []*organization.WeWorkUser) (ids []string) {
+ for _, user := range users {
+ ids = append(ids, user.WeWorkUserId)
}
return ids
- })(this.modelWeworkOrganization.employee.Query(this.db))
+ })(this.modelWeworkOrganization.user.Query(this.db))
return ids, err
}
-// employeeFromWeWorkSyncToLocal
+// userFromWeWorkSyncToLocal
//
// @Description:
// @receiver this
-// @param fromEmployee
-// @return toEmployee
-func (this *wechatUseCase) employeeFromWeWorkSyncToLocal(fromEmployee []*organization.WeWorkEmployee) (toEmployee []*origanzation.Employee) {
+// @param fromUser
+// @return toUser
+func (this *wechatUseCase) userFromWeWorkSyncToLocal(fromUser []*organization.WeWorkUser) (toUser []*origanzation.User) {
- if fromEmployee != nil {
+ if fromUser != nil {
password, _ := origanzation.HashPassword(`123456`)
- for _, employee := range fromEmployee {
- toEmployee = append(toEmployee, &origanzation.Employee{
- Account: employee.WeWorkUserId,
- Name: employee.Name,
- NickName: employee.Name,
+ for _, user := range fromUser {
+ toUser = append(toUser, &origanzation.User{
+ Account: user.WeWorkUserId,
+ Name: user.Name,
+ NickName: user.Name,
// todo Position 关联
- DepartmentId: int64(employee.WeWorkMainDepartmentId),
- MobilePhone: employee.Mobile,
- Gender: employee.Gender,
- Email: employee.Email,
- ExternalEmail: employee.Email,
- Avatar: employee.Avatar,
+ DepartmentId: int64(user.WeWorkMainDepartmentId),
+ MobilePhone: user.Mobile,
+ Gender: user.Gender,
+ Email: user.Email,
+ ExternalEmail: user.Email,
+ Avatar: user.Avatar,
Password: password,
- WeWorkUserId: employee.WeWorkUserId,
+ WeWorkUserId: user.WeWorkUserId,
})
}
}
- return toEmployee
+ return toUser
}
diff --git a/pkg/pluginx/loader.go b/pkg/pluginx/loader.go
index a901f486..67a25e76 100644
--- a/pkg/pluginx/loader.go
+++ b/pkg/pluginx/loader.go
@@ -64,6 +64,7 @@ type BuildPluginFrontendOptions struct {
ReDownload bool
}
+// BuildPluginFrontend 构建插件前端
func (l *Loader) BuildPluginFrontend(opts BuildPluginFrontendOptions) error {
// 检查是否workdir是否存在.download文件夹
isFirstDownload := false
diff --git a/pkg/pluginx/manager.go b/pkg/pluginx/manager.go
index 9fd1ee3f..f40b2c09 100644
--- a/pkg/pluginx/manager.go
+++ b/pkg/pluginx/manager.go
@@ -16,6 +16,7 @@ import (
"strings"
)
+// Manager 管理插件的加载、启动和关闭
type Manager struct {
r httpx.Router
@@ -32,6 +33,7 @@ type Manager struct {
frontendServer *PluginFrontendServer
}
+// NewManager 创建一个新的插件管理器实例
func NewManager(ctx context.Context, route httpx.Router, mainHost string) *Manager {
manager := &Manager{
r: route,
@@ -44,16 +46,19 @@ func NewManager(ctx context.Context, route httpx.Router, mainHost string) *Manag
return manager
}
+// ProxyHandleFunc 返回处理代理请求的 HTTP 处理函数
func (m *Manager) ProxyHandleFunc() http.HandlerFunc {
return func(writer http.ResponseWriter, request *http.Request) {
const prefix = "/api/plugin"
const unknownError = `{"error": "plugin backend request failed"}`
+ // 如果请求路径不以指定前缀开头,则返回未知错误
if !strings.HasPrefix(request.URL.Path, prefix) {
http.Error(writer, unknownError, http.StatusInternalServerError)
return
}
+ // 根据路径分割获取插件名称和路径
splitPaths := strings.Split(request.URL.Path, "/")
if len(splitPaths) < 4 {
http.Error(writer, unknownError, http.StatusInternalServerError)
@@ -63,6 +68,7 @@ func (m *Manager) ProxyHandleFunc() http.HandlerFunc {
name := splitPaths[3]
pluginPath := strings.Join(splitPaths[4:], "/")
+ // 根据插件名称查找插件
plugin, ok := m.pluginMap[name]
if !ok || !plugin.IsReady() {
logx.Errorf("Plugin %s not found", name)
@@ -70,11 +76,14 @@ func (m *Manager) ProxyHandleFunc() http.HandlerFunc {
return
}
+ // 构建目标 URL
targetURL := fmt.Sprintf("http://%s/%s", plugin.PluginHost, pluginPath)
fmt.Println(targetURL)
if request.URL.RawQuery != "" {
targetURL = targetURL + "?" + request.URL.RawQuery
}
+
+ // 读取请求体
var buf bytes.Buffer
if _, err := io.Copy(&buf, request.Body); err != nil {
logx.Errorf("Error reading request body: %v", err)
@@ -82,6 +91,7 @@ func (m *Manager) ProxyHandleFunc() http.HandlerFunc {
return
}
+ // 创建代理请求
proxyReq, err := http.NewRequest(request.Method, targetURL, &buf)
if err != nil {
@@ -90,8 +100,9 @@ func (m *Manager) ProxyHandleFunc() http.HandlerFunc {
return
}
+ // 复制请求头
copyHeaders(request.Header, proxyReq.Header)
-
+ // 发送代理请求
resp, err := http.DefaultClient.Do(proxyReq)
if err != nil {
logx.Errorf("Error sending proxy request: %v", err)
@@ -100,9 +111,11 @@ func (m *Manager) ProxyHandleFunc() http.HandlerFunc {
}
defer resp.Body.Close()
+ // 复制响应头
copyHeaders(resp.Header, writer.Header())
writer.WriteHeader(resp.StatusCode)
+ // 发送代理响应
if _, err = io.Copy(writer, resp.Body); err != nil {
logx.Errorf("Error sending proxy request: %v", err)
http.Error(writer, "Error sending proxy request", http.StatusBadGateway)
@@ -156,6 +169,7 @@ func (m *Manager) SetupPluginManager() {
return
}
+ // 定义重新构建插件的函数
rebuild := func() {
loader := NewLoader("./plugins", &BuildLoaderConfig{
MainAPIEndpoint: "/api/plugin",
diff --git a/swagger/common.json b/swagger/common.json
index 1afe0596..c25ebd0a 100644
--- a/swagger/common.json
+++ b/swagger/common.json
@@ -63,15 +63,15 @@
]
}
},
- "/api/v1/admin/common/options/employee-query": {
+ "/api/v1/admin/common/options/user-query": {
"get": {
"summary": "查询员工过滤条件",
- "operationId": "GetEmployeeQueryOptions",
+ "operationId": "GetUserQueryOptions",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/GetEmployeeQueryOptionsReply"
+ "$ref": "#/definitions/GetUserQueryOptionsReply"
}
}
},
@@ -81,15 +81,15 @@
]
}
},
- "/api/v1/admin/common/options/employees": {
+ "/api/v1/admin/common/options/users": {
"get": {
"summary": "员工Options远程搜索",
- "operationId": "GetEmployeeOptions",
+ "operationId": "GetUserOptions",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/GetEmployeeOptionsReply"
+ "$ref": "#/definitions/GetUserOptionsReply"
}
}
},
@@ -152,7 +152,7 @@
"name"
]
},
- "EmployeeOption": {
+ "UserOption": {
"type": "object",
"properties": {
"id": {
@@ -175,7 +175,7 @@
"type": "string"
}
},
- "title": "EmployeeOption",
+ "title": "UserOption",
"required": [
"id",
"avatar",
@@ -185,7 +185,7 @@
"phoneNumber"
]
},
- "EmployeeQueryDepartmentOption": {
+ "UserQueryDepartmentOption": {
"type": "object",
"properties": {
"departmentId": {
@@ -196,13 +196,13 @@
"type": "string"
}
},
- "title": "EmployeeQueryDepartmentOption",
+ "title": "UserQueryDepartmentOption",
"required": [
"departmentId",
"departmentName"
]
},
- "EmployeeQueryRoleOption": {
+ "UserQueryRoleOption": {
"type": "object",
"properties": {
"roleCode": {
@@ -212,7 +212,7 @@
"type": "string"
}
},
- "title": "EmployeeQueryRoleOption",
+ "title": "UserQueryRoleOption",
"required": [
"roleCode",
"roleName"
@@ -272,13 +272,13 @@
},
"title": "GetDepartmentOptionsRequest"
},
- "GetEmployeeOptionsReply": {
+ "GetUserOptionsReply": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
- "$ref": "#/definitions/EmployeeOption"
+ "$ref": "#/definitions/UserOption"
}
},
"pageIndex": {
@@ -294,7 +294,7 @@
"format": "int64"
}
},
- "title": "GetEmployeeOptionsReply",
+ "title": "GetUserOptionsReply",
"required": [
"list",
"pageIndex",
@@ -302,7 +302,7 @@
"total"
]
},
- "GetEmployeeOptionsRequest": {
+ "GetUserOptionsRequest": {
"type": "object",
"properties": {
"likeName": {
@@ -323,9 +323,9 @@
"format": "int32"
}
},
- "title": "GetEmployeeOptionsRequest"
+ "title": "GetUserOptionsRequest"
},
- "GetEmployeeQueryOptionsReply": {
+ "GetUserQueryOptionsReply": {
"type": "object",
"properties": {
"positions": {
@@ -337,17 +337,17 @@
"roles": {
"type": "array",
"items": {
- "$ref": "#/definitions/EmployeeQueryRoleOption"
+ "$ref": "#/definitions/UserQueryRoleOption"
}
},
"departments": {
"type": "array",
"items": {
- "$ref": "#/definitions/EmployeeQueryDepartmentOption"
+ "$ref": "#/definitions/UserQueryDepartmentOption"
}
}
},
- "title": "GetEmployeeQueryOptionsReply",
+ "title": "GetUserQueryOptionsReply",
"required": [
"positions",
"roles",
diff --git a/swagger/customer.json b/swagger/customer.json
index fd86c1b9..46e4ca08 100644
--- a/swagger/customer.json
+++ b/swagger/customer.json
@@ -190,15 +190,15 @@
]
}
},
- "/api/v1/admin/customer/customers/{id}/actions/employees": {
+ "/api/v1/admin/customer/customers/{id}/actions/users": {
"post": {
"summary": "为客户分配员工",
- "operationId": "AssignCustomerToEmployee",
+ "operationId": "AssignCustomerToUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/AssignCustomerToEmployeeReply"
+ "$ref": "#/definitions/AssignCustomerToUserReply"
}
}
},
@@ -214,7 +214,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/AssignCustomerToEmployeeRequest"
+ "$ref": "#/definitions/AssignCustomerToUserRequest"
}
}
],
@@ -226,7 +226,7 @@
}
},
"definitions": {
- "AssignCustomerToEmployeeReply": {
+ "AssignCustomerToUserReply": {
"type": "object",
"properties": {
"customerId": {
@@ -234,26 +234,26 @@
"format": "int64"
}
},
- "title": "AssignCustomerToEmployeeReply",
+ "title": "AssignCustomerToUserReply",
"required": [
"customerId"
]
},
- "AssignCustomerToEmployeeRequest": {
+ "AssignCustomerToUserRequest": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "employeeId": {
+ "userId": {
"type": "integer",
"format": "int64"
}
},
- "title": "AssignCustomerToEmployeeRequest",
+ "title": "AssignCustomerToUserRequest",
"required": [
"id",
- "employeeId"
+ "userId"
]
},
"CreateCustomerReply": {
diff --git a/swagger/lead.json b/swagger/lead.json
index 5d54a042..e9b542e9 100644
--- a/swagger/lead.json
+++ b/swagger/lead.json
@@ -152,15 +152,15 @@
]
}
},
- "/api/v1/admin/lead/leads/{id}/actions/assign-to-employee": {
+ "/api/v1/admin/lead/leads/{id}/actions/assign-to-user": {
"post": {
"summary": "分配线索给员工",
- "operationId": "AssignLeadToEmployee",
+ "operationId": "AssignLeadToUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/AssignLeadToEmployeeReply"
+ "$ref": "#/definitions/AssignLeadToUserReply"
}
}
},
@@ -176,7 +176,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/AssignLeadToEmployeeRequest"
+ "$ref": "#/definitions/AssignLeadToUserRequest"
}
}
],
@@ -188,31 +188,31 @@
}
},
"definitions": {
- "AssignLeadToEmployeeReply": {
+ "AssignLeadToUserReply": {
"type": "object",
"properties": {
"": {
"$ref": "#/definitions/Lead"
}
},
- "title": "AssignLeadToEmployeeReply"
+ "title": "AssignLeadToUserReply"
},
- "AssignLeadToEmployeeRequest": {
+ "AssignLeadToUserRequest": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
- "employeeId": {
+ "userId": {
"type": "integer",
"format": "int64"
}
},
- "title": "AssignLeadToEmployeeRequest",
+ "title": "AssignLeadToUserRequest",
"required": [
"id",
- "employeeId"
+ "userId"
]
},
"CreateLeadRecord": {
diff --git a/swagger/opportunity.json b/swagger/opportunity.json
index 15d6ee0c..48910f0d 100644
--- a/swagger/opportunity.json
+++ b/swagger/opportunity.json
@@ -172,15 +172,15 @@
]
}
},
- "/api/v1/admin/opportunity/opportunities/{id}/assign-employee": {
+ "/api/v1/admin/opportunity/opportunities/{id}/assign-user": {
"put": {
"summary": "为商机分配员工",
- "operationId": "AssignEmployeeToOpportunity",
+ "operationId": "AssignUserToOpportunity",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/AssignEmployeeToOpportunityReply"
+ "$ref": "#/definitions/AssignUserToOpportunityReply"
}
}
},
@@ -196,7 +196,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/AssignEmployeeToOpportunityRequest"
+ "$ref": "#/definitions/AssignUserToOpportunityRequest"
}
}
],
@@ -208,7 +208,7 @@
}
},
"definitions": {
- "AssignEmployeeToOpportunityReply": {
+ "AssignUserToOpportunityReply": {
"type": "object",
"properties": {
"id": {
@@ -216,27 +216,27 @@
"format": "int64"
}
},
- "title": "AssignEmployeeToOpportunityReply",
+ "title": "AssignUserToOpportunityReply",
"required": [
"id"
]
},
- "AssignEmployeeToOpportunityRequest": {
+ "AssignUserToOpportunityRequest": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
- "employeeId": {
+ "userId": {
"type": "integer",
"format": "int64"
}
},
- "title": "AssignEmployeeToOpportunityRequest",
+ "title": "AssignUserToOpportunityRequest",
"required": [
"id",
- "employeeId"
+ "userId"
]
},
"CreateOpportunityReply": {
@@ -275,7 +275,7 @@
"type": {
"type": "string"
},
- "employeeId": {
+ "userId": {
"type": "integer",
"format": "int64"
},
@@ -290,7 +290,7 @@
"customerId",
"source",
"type",
- "employeeId",
+ "userId",
"stage"
]
},
@@ -409,7 +409,7 @@
"type": {
"type": "string"
},
- "employeeId": {
+ "userId": {
"type": "integer",
"format": "int64"
},
@@ -435,7 +435,7 @@
"probability",
"source",
"type",
- "employeeId",
+ "userId",
"stage",
"closedDate",
"createdAt",
@@ -478,7 +478,7 @@
"type": {
"type": "string"
},
- "employeeId": {
+ "userId": {
"type": "integer",
"format": "int64"
},
diff --git a/swagger/permission.json b/swagger/permission.json
index cba236e4..22ad015e 100644
--- a/swagger/permission.json
+++ b/swagger/permission.json
@@ -145,15 +145,15 @@
]
}
},
- "/api/v1/admin/permission/roles/{roleCode}/actions/set-employees": {
+ "/api/v1/admin/permission/roles/{roleCode}/actions/set-users": {
"post": {
"summary": "为角色分配用户",
- "operationId": "SetRoleEmployees",
+ "operationId": "SetRoleUsers",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/SetRoleEmployeesReply"
+ "$ref": "#/definitions/SetRoleUsersReply"
}
}
},
@@ -169,7 +169,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/SetRoleEmployeesRequest"
+ "$ref": "#/definitions/SetRoleUsersRequest"
}
}
],
@@ -216,12 +216,12 @@
"/api/v1/admin/permission/roles/{roleCode}/users": {
"get": {
"summary": "获取角色的用户列表",
- "operationId": "GetRoleEmployees",
+ "operationId": "GetRoleUsers",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/GetRoleEmployeesReply"
+ "$ref": "#/definitions/GetRoleUsersReply"
}
}
},
@@ -413,13 +413,13 @@
"menuNames"
]
},
- "GetRoleEmployeesReply": {
+ "GetRoleUsersReply": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
- "$ref": "#/definitions/RoleEmployee"
+ "$ref": "#/definitions/RoleUser"
}
},
"pageIndex": {
@@ -435,7 +435,7 @@
"format": "int64"
}
},
- "title": "GetRoleEmployeesReply",
+ "title": "GetRoleUsersReply",
"required": [
"list",
"pageIndex",
@@ -443,7 +443,7 @@
"total"
]
},
- "GetRoleEmployeesReqeust": {
+ "GetRoleUsersReqeust": {
"type": "object",
"properties": {
"roleCode": {
@@ -458,7 +458,7 @@
"format": "int32"
}
},
- "title": "GetRoleEmployeesReqeust",
+ "title": "GetRoleUsersReqeust",
"required": [
"roleCode",
"pageIndex",
@@ -567,7 +567,7 @@
"name"
]
},
- "RoleEmployee": {
+ "RoleUser": {
"type": "object",
"properties": {
"id": {
@@ -587,13 +587,13 @@
"type": "string"
},
"department": {
- "$ref": "#/definitions/RoleEmployeeDepartment"
+ "$ref": "#/definitions/RoleUserDepartment"
},
"email": {
"type": "string"
}
},
- "title": "RoleEmployee",
+ "title": "RoleUser",
"required": [
"id",
"name",
@@ -604,7 +604,7 @@
"email"
]
},
- "RoleEmployeeDepartment": {
+ "RoleUserDepartment": {
"type": "object",
"properties": {
"id": {
@@ -615,31 +615,31 @@
"type": "string"
}
},
- "title": "RoleEmployeeDepartment",
+ "title": "RoleUserDepartment",
"required": [
"id",
"name"
]
},
- "SetRoleEmployeesReply": {
+ "SetRoleUsersReply": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
- "title": "SetRoleEmployeesReply",
+ "title": "SetRoleUsersReply",
"required": [
"status"
]
},
- "SetRoleEmployeesRequest": {
+ "SetRoleUsersRequest": {
"type": "object",
"properties": {
"roleCode": {
"type": "string"
},
- "employeeIds": {
+ "userIds": {
"type": "array",
"items": {
"type": "integer",
@@ -647,10 +647,10 @@
}
}
},
- "title": "SetRoleEmployeesRequest",
+ "title": "SetRoleUsersRequest",
"required": [
"roleCode",
- "employeeIds"
+ "userIds"
]
},
"SetRolePermissionsReply": {
diff --git a/swagger/employee.json b/swagger/user.json
similarity index 84%
rename from swagger/employee.json
rename to swagger/user.json
index 965b21ec..fd2a80e2 100644
--- a/swagger/employee.json
+++ b/swagger/user.json
@@ -16,15 +16,15 @@
"application/json"
],
"paths": {
- "/api/v1/admin/employee/employees": {
+ "/api/v1/admin/user/users": {
"get": {
"summary": "List员工",
- "operationId": "ListEmployees",
+ "operationId": "ListUsers",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/ListEmployeesReply"
+ "$ref": "#/definitions/ListUsersReply"
}
}
},
@@ -97,17 +97,17 @@
],
"requestBody": {},
"tags": [
- "admin/employee"
+ "admin/user"
]
},
"post": {
"summary": "创建员工",
- "operationId": "CreateEmployee",
+ "operationId": "CreateUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/CreateEmployeeReply"
+ "$ref": "#/definitions/CreateUserReply"
}
}
},
@@ -117,17 +117,17 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/CreateEmployeeRequest"
+ "$ref": "#/definitions/CreateUserRequest"
}
}
],
"requestBody": {},
"tags": [
- "admin/employee"
+ "admin/user"
]
}
},
- "/api/v1/admin/employee/employees/actions/reset-password": {
+ "/api/v1/admin/user/users/actions/reset-password": {
"post": {
"summary": "重设密码",
"operationId": "ResetPassword",
@@ -151,19 +151,19 @@
],
"requestBody": {},
"tags": [
- "admin/employee"
+ "admin/user"
]
}
},
- "/api/v1/admin/employee/employees/actions/sync": {
+ "/api/v1/admin/user/users/actions/sync": {
"post": {
"summary": "同步员工",
- "operationId": "SyncEmployees",
+ "operationId": "SyncUsers",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/SyncEmployeesReply"
+ "$ref": "#/definitions/SyncUsersReply"
}
}
},
@@ -173,25 +173,25 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/SyncEmployeesRequest"
+ "$ref": "#/definitions/SyncUsersRequest"
}
}
],
"requestBody": {},
"tags": [
- "admin/employee"
+ "admin/user"
]
}
},
- "/api/v1/admin/employee/employees/{id}": {
+ "/api/v1/admin/user/users/{id}": {
"get": {
"summary": "查询员工",
- "operationId": "GetEmployee",
+ "operationId": "GetUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/GetEmployeeReply"
+ "$ref": "#/definitions/GetUserReply"
}
}
},
@@ -205,17 +205,17 @@
],
"requestBody": {},
"tags": [
- "admin/employee"
+ "admin/user"
]
},
"delete": {
"summary": "删除员工",
- "operationId": "DeleteEmployee",
+ "operationId": "DeleteUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/DeleteEmployeeReply"
+ "$ref": "#/definitions/DeleteUserReply"
}
}
},
@@ -231,23 +231,23 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/DeleteEmployeeRequest"
+ "$ref": "#/definitions/DeleteUserRequest"
}
}
],
"requestBody": {},
"tags": [
- "admin/employee"
+ "admin/user"
]
},
"patch": {
"summary": "编辑员工信息",
- "operationId": "UpdateEmployee",
+ "operationId": "UpdateUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/UpdateEmployeeReply"
+ "$ref": "#/definitions/UpdateUserReply"
}
}
},
@@ -263,19 +263,19 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/UpdateEmployeeRequest"
+ "$ref": "#/definitions/UpdateUserRequest"
}
}
],
"requestBody": {},
"tags": [
- "admin/employee"
+ "admin/user"
]
}
}
},
"definitions": {
- "CreateEmployeeReply": {
+ "CreateUserReply": {
"type": "object",
"properties": {
"id": {
@@ -283,12 +283,12 @@
"format": "int64"
}
},
- "title": "CreateEmployeeReply",
+ "title": "CreateUserReply",
"required": [
"id"
]
},
- "CreateEmployeeRequest": {
+ "CreateUserRequest": {
"type": "object",
"properties": {
"account": {
@@ -332,7 +332,7 @@
"type": "string"
}
},
- "title": "CreateEmployeeRequest",
+ "title": "CreateUserRequest",
"required": [
"account",
"name",
@@ -341,7 +341,7 @@
"depId"
]
},
- "DeleteEmployeeReply": {
+ "DeleteUserReply": {
"type": "object",
"properties": {
"id": {
@@ -349,12 +349,12 @@
"format": "int64"
}
},
- "title": "DeleteEmployeeReply",
+ "title": "DeleteUserReply",
"required": [
"id"
]
},
- "DeleteEmployeeRequest": {
+ "DeleteUserRequest": {
"type": "object",
"properties": {
"id": {
@@ -362,12 +362,12 @@
"format": "int64"
}
},
- "title": "DeleteEmployeeRequest",
+ "title": "DeleteUserRequest",
"required": [
"id"
]
},
- "Employee": {
+ "User": {
"type": "object",
"properties": {
"id": {
@@ -408,7 +408,7 @@
}
},
"department": {
- "$ref": "#/definitions/EmployeeDepartment"
+ "$ref": "#/definitions/UserDepartment"
},
"position": {
"type": "string"
@@ -424,7 +424,7 @@
"type": "string"
}
},
- "title": "Employee",
+ "title": "User",
"required": [
"id",
"account",
@@ -440,7 +440,7 @@
"createdAt"
]
},
- "EmployeeDepartment": {
+ "UserDepartment": {
"type": "object",
"properties": {
"depId": {
@@ -451,22 +451,22 @@
"type": "string"
}
},
- "title": "EmployeeDepartment",
+ "title": "UserDepartment",
"required": [
"depId",
"depName"
]
},
- "GetEmployeeReply": {
+ "GetUserReply": {
"type": "object",
"properties": {
"": {
- "$ref": "#/definitions/Employee"
+ "$ref": "#/definitions/User"
}
},
- "title": "GetEmployeeReply"
+ "title": "GetUserReply"
},
- "GetEmployeeRequest": {
+ "GetUserRequest": {
"type": "object",
"properties": {
"id": {
@@ -474,18 +474,18 @@
"format": "int64"
}
},
- "title": "GetEmployeeRequest",
+ "title": "GetUserRequest",
"required": [
"id"
]
},
- "ListEmployeesReply": {
+ "ListUsersReply": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
- "$ref": "#/definitions/Employee"
+ "$ref": "#/definitions/User"
}
},
"pageIndex": {
@@ -501,7 +501,7 @@
"format": "int64"
}
},
- "title": "ListEmployeesReply",
+ "title": "ListUsersReply",
"required": [
"list",
"pageIndex",
@@ -509,7 +509,7 @@
"total"
]
},
- "ListEmployeesRequest": {
+ "ListUsersRequest": {
"type": "object",
"properties": {
"ids": {
@@ -559,7 +559,7 @@
"format": "int32"
}
},
- "title": "ListEmployeesRequest"
+ "title": "ListUsersRequest"
},
"ResetPasswordReply": {
"type": "object",
@@ -586,7 +586,7 @@
"userId"
]
},
- "SyncEmployeesReply": {
+ "SyncUsersReply": {
"type": "object",
"properties": {
"status": {
@@ -594,12 +594,12 @@
"format": "boolean"
}
},
- "title": "SyncEmployeesReply",
+ "title": "SyncUsersReply",
"required": [
"status"
]
},
- "SyncEmployeesRequest": {
+ "SyncUsersRequest": {
"type": "object",
"properties": {
"source": {
@@ -609,22 +609,22 @@
"type": "string"
}
},
- "title": "SyncEmployeesRequest",
+ "title": "SyncUsersRequest",
"required": [
"source",
"target"
]
},
- "UpdateEmployeeReply": {
+ "UpdateUserReply": {
"type": "object",
"properties": {
"": {
- "$ref": "#/definitions/Employee"
+ "$ref": "#/definitions/User"
}
},
- "title": "UpdateEmployeeReply"
+ "title": "UpdateUserReply"
},
- "UpdateEmployeeRequest": {
+ "UpdateUserRequest": {
"type": "object",
"properties": {
"id": {
@@ -672,7 +672,7 @@
"type": "string"
}
},
- "title": "UpdateEmployeeRequest",
+ "title": "UpdateUserRequest",
"required": [
"id",
"gender",
diff --git a/swagger/weworkemployee.json b/swagger/weworkuser.json
similarity index 88%
rename from swagger/weworkemployee.json
rename to swagger/weworkuser.json
index e03b73ce..d1b549b6 100644
--- a/swagger/weworkemployee.json
+++ b/swagger/weworkuser.json
@@ -16,15 +16,15 @@
"application/json"
],
"paths": {
- "/api/v1/admin/scrm/organization/wechat/employee/page": {
+ "/api/v1/admin/scrm/organization/wechat/user/page": {
"post": {
"summary": "员工列表/page",
- "operationId": "ListWeWorkEmployeePage",
+ "operationId": "ListWeWorkUserPage",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/ListWeWorkEmployeeReply"
+ "$ref": "#/definitions/ListWeWorkUserReply"
}
}
},
@@ -34,7 +34,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/ListWeWorkEmployeeReqeust"
+ "$ref": "#/definitions/ListWeWorkUserReqeust"
}
}
],
@@ -46,8 +46,8 @@
},
"/api/v1/admin/scrm/organization/wechat/sync": {
"get": {
- "summary": "同步组织架构/department\u0026employee",
- "operationId": "SyncWeWorkEmployee",
+ "summary": "同步组织架构/department\u0026user",
+ "operationId": "SyncWeWorkUser",
"responses": {
"200": {
"description": "A successful response.",
@@ -64,13 +64,13 @@
}
},
"definitions": {
- "ListWeWorkEmployeeReply": {
+ "ListWeWorkUserReply": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
- "$ref": "#/definitions/WechatEmployee"
+ "$ref": "#/definitions/WechatUser"
}
},
"pageIndex": {
@@ -86,7 +86,7 @@
"format": "int64"
}
},
- "title": "ListWeWorkEmployeeReply",
+ "title": "ListWeWorkUserReply",
"required": [
"list",
"pageIndex",
@@ -94,7 +94,7 @@
"total"
]
},
- "ListWeWorkEmployeeReqeust": {
+ "ListWeWorkUserReqeust": {
"type": "object",
"properties": {
"id": {
@@ -141,7 +141,7 @@
"format": "int32"
}
},
- "title": "ListWeWorkEmployeeReqeust"
+ "title": "ListWeWorkUserReqeust"
},
"SyncWeWorkOrganizationReply": {
"type": "object",
@@ -155,7 +155,7 @@
"status"
]
},
- "WechatEmployee": {
+ "WechatUser": {
"type": "object",
"properties": {
"weWorkUserId": {
@@ -209,7 +209,7 @@
"type": "string"
}
},
- "title": "WechatEmployee",
+ "title": "WechatUser",
"required": [
"weWorkUserId",
"name",