Skip to content

Commit a1e8ba9

Browse files
committed
refact(scrm): wecom user case
1 parent b3ae59e commit a1e8ba9

File tree

281 files changed

+3217
-7516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+3217
-7516
lines changed

api/admin.scrm.api

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
import "admin/scrm/contactway.api"
2-
//import "admin/scrm/customer.api"
3-
//import "admin/scrm/contact.api"
4-
// organzation
5-
import "admin/scrm/organization/weworkUser.api"
6-
import "admin/scrm/organization/weworkDepartment.api"
7-
// app
8-
import "admin/scrm/app/weworkGroup.api"
9-
import "admin/scrm/app/weworkApp.api"
10-
import "admin/scrm/app/weworkAppMessage.api"
11-
// wechat.customer
12-
import "admin/scrm/customer/weworkCustomer.api"
13-
import "admin/scrm/customer/weworkCustomerGroup.api"
14-
// bot
15-
import "admin/scrm/bot/weworkBot.api"
16-
// resource
17-
import "admin/scrm/resource/weworkResource.api"
18-
// qrcode
19-
import "admin/scrm/qrcode/weworkCustomerGroupQRCode.api"
20-
// tag
21-
import "admin/scrm/tag/weworkTag.api"
1+
import "admin/scrm/wechat/wecom/contactway.api"
2+
//import "admin/scrm/wechat/wecom/customer.api"
3+
//import "admin/scrm/wechat/wecom/contact.api"
4+
// organzation
5+
import "admin/scrm/wechat/wecom/organization/user.api"
6+
import "admin/scrm/wechat/wecom/organization/department.api"
7+
// app
8+
import "admin/scrm/wechat/wecom/app/group.api"
9+
import "admin/scrm/wechat/wecom/app/app.api"
10+
import "admin/scrm/wechat/wecom/app/appMessage.api"
11+
// wechat.customer
12+
import "admin/scrm/wechat/wecom/customer/customer.api"
13+
import "admin/scrm/wechat/wecom/customer/customerGroup.api"
14+
// bot
15+
import "admin/scrm/wechat/wecom/bot/bot.api"
16+
// resource
17+
import "admin/scrm/wechat/wecom/resource/resource.api"
18+
// qrcode
19+
import "admin/scrm/wechat/wecom/qrcode/customerGroupQRCode.api"
20+
// tag
21+
import "admin/scrm/wechat/wecom/tag/tag.api"

api/admin.wechat.offiaccount.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import "admin/wechat/officialaccount/menu.api"
2-
import "admin/wechat/officialaccount/media.api"
1+
import "admin/scrm/wechat/officialaccount/menu.api"
2+
import "admin/scrm/wechat/officialaccount/media.api"
33

api/admin/scrm/wechat/wecom/app/app.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ info(
1010

1111
@server(
1212
group: admin/scrm/wechat/wecom/app
13-
prefix: /api/v1/admin/scrm/wechat/wecom/app/wechat
13+
prefix: /api/v1/admin/scrm/wechat/wecom/app
1414
middleware: UserJWTAuth
1515
)
1616

api/admin/scrm/wechat/wecom/app/appMessage.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ info(
1010

1111
@server(
1212
group: admin/scrm/wechat/wecom/app
13-
prefix: /api/v1/admin/scrm/wechat/wecom/app/wechat
13+
prefix: /api/v1/admin/scrm/wechat/wecom/app
1414
middleware: UserJWTAuth
1515
)
1616

api/admin/scrm/wechat/wecom/app/group.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ info(
1010

1111
@server(
1212
group: admin/scrm/wechat/wecom/app
13-
prefix: /api/v1/admin/scrm/wechat/wecom/app/wechat
13+
prefix: /api/v1/admin/scrm/wechat/wecom/app
1414
middleware: UserJWTAuth
1515
)
1616

api/admin/scrm/wechat/wecom/bot/bot.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ info(
1010

1111
@server(
1212
group: admin/scrm/wechat/wecom/bot
13-
prefix: /api/v1/admin/scrm/wechat/wecom/bot/wechat
13+
prefix: /api/v1/admin/scrm/wechat/wecom/bot
1414
middleware: UserJWTAuth
1515
)
1616

api/admin/scrm/wechat/wecom/contactWay.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ info(
1010

1111
@server(
1212
group: admin/scrm/wechat/wecom/contractway
13-
prefix: /api/v1/admin/scrm/wechat/wecom/contract-way
13+
prefix: /api/v1/admin/scrm/wechat/wecom/contract-ways
1414
middleware: UserJWTAuth
1515
)
1616

api/admin/scrm/wechat/wecom/customer/customer.api

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,35 @@ info(
1010

1111
@server(
1212
group: admin/scrm/wechat/wecom/customer
13-
prefix: /api/v1/admin/scrm/wechat/wecom
13+
prefix: /api/v1/admin/scrm/wechat/wecom/customers
1414
middleware: UserJWTAuth
1515
)
1616

1717
service PowerX {
1818
@doc "批量同步客户信息(根据员工ID同步/节流)"
1919
@handler SyncWeComCustomerOption
20-
post /customers/sync (WeComCustomersRequest) returns (WeComListCustomersReply)
20+
post /sync (WeComCustomersRequest) returns (WeComListCustomersReply)
2121

2222

2323
@doc "所有客户列表/page"
2424
@handler ListWeComCustomerPage
25-
post /customers/page (WeComCustomersRequest) returns (WeComListCustomersReply)
25+
post /page (WeComCustomersRequest) returns (WeComListCustomersReply)
2626

2727
@doc "查询客户详情"
2828
@handler GetWeComCustomer
29-
get /customers/:id (GetWeComCustomerRequest) returns (GetWeComCustomerReply)
29+
get /:id (GetWeComCustomerRequest) returns (GetWeComCustomerReply)
3030

3131
@doc "查询客户详情列表"
3232
@handler ListWeComCustomers
33-
get /customers (ListWeComCustomersRequest) returns (ListWeComCustomersReply)
33+
get / (ListWeComCustomersRequest) returns (ListWeComCustomersReply)
3434

3535
@doc "修改客户信息"
3636
@handler PatchWeComCustomer
37-
patch /customers/:id (PatchWeComCustomerRequest) returns (PatchWeComCustomerReply)
37+
patch /:id (PatchWeComCustomerRequest) returns (PatchWeComCustomerReply)
3838

3939
@doc "同步客户"
4040
@handler SyncWeComCustomer
41-
post /customers/actions/sync returns (SyncWeComCustomerReply)
41+
post /actions/sync returns (SyncWeComCustomerReply)
4242
}
4343

4444

@@ -144,7 +144,7 @@ type (
144144
CreatedTime int `json:"createtime"`
145145
Tags []WeComCustomersFollowUserWithTags `json:"tags"`
146146
TagIds []string `json:"tagIds"`
147-
WeComChannels WeComCustomersFollowUserWithWeComChannels `json:"wechatChannels"`
147+
WeComChannels WeComCustomersFollowUserWithWeComChannels `json:"weComChannels"`
148148
RemarkCorpName string `json:"remarkCorpName,omitempty"`
149149
RemarkMobiles []string `json:"remarkMobiles,omitempty"`
150150
OpenUserId string `json:"openUserId"`

api/admin/scrm/wechat/wecom/customer/customerGroup.api

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ info(
1010

1111
@server(
1212
group: admin/scrm/wechat/wecom/customer
13-
prefix: /api/v1/admin/scrm/wechat/wecom/customer/wechat
13+
prefix: /api/v1/admin/scrm/wechat/wecom/customers
1414
middleware: UserJWTAuth
1515
)
1616

@@ -42,32 +42,32 @@ type (
4242

4343
type (
4444
WeComListCustomerGroupReply {
45-
List []WechatCustomerGroup `json:"list"` //https://developer.work.weixin.qq.com/document/path/92122
45+
List []WeComCustomerGroup `json:"list"` //https://developer.work.weixin.qq.com/document/path/92122
4646
}
47-
WechatCustomerGroup {
47+
WeComCustomerGroup {
4848
ChatId string `json:"chatId"`
4949
Name string `json:"name"`
5050
Owner string `json:"owner"`
5151
CreateTime int `json:"createTime"`
5252
Notice string `json:"notice"`
53-
MemberList []*WechatCustomerGroupMemberList `json:"memberList"`
54-
AdminList []*WechatCustomerGroupAdminList `json:"adminList"`
53+
MemberList []*WeComCustomerGroupMemberList `json:"memberList"`
54+
AdminList []*WeComCustomerGroupAdminList `json:"adminList"`
5555
}
56-
WechatCustomerGroupAdminList {
56+
WeComCustomerGroupAdminList {
5757
UserId string `json:"userId"`
5858
}
5959

60-
WechatCustomerGroupMemberList {
60+
WeComCustomerGroupMemberList {
6161
UserId string `json:"userId"`
6262
Type int `json:"type"`
6363
JoinTime int `json:"joinTime"`
6464
JoinScene int `json:"joinScene"`
65-
Invitor WechatCustomerGroupMemberListInvitor `json:"invitor"`
65+
Invitor WeComCustomerGroupMemberListInvitor `json:"invitor"`
6666
GroupNickname string `json:"groupNickname"`
6767
Name string `json:"name"`
6868
UnionId string `json:"unionId,omitempty"`
6969
}
70-
WechatCustomerGroupMemberListInvitor {
70+
WeComCustomerGroupMemberListInvitor {
7171
UserId string `json:"userId"`
7272
}
7373
)

api/admin/scrm/wechat/wecom/organization/department.api

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@ info(
99
)
1010

1111
@server(
12-
group: admin/scrm/organization
13-
prefix: /api/v1/admin/scrm/wechat/wecom/organization/wechat
12+
group: admin/scrm/wechat/wecom/organization
13+
prefix: /api/v1/admin/scrm/wechat/wecom/organization
1414
middleware: UserJWTAuth
1515
)
1616

1717
service PowerX {
1818
@doc "部门列表/page"
1919
@handler ListWeComDepartMentPage
20-
post /partment/page (ListWeComDepartmentReqeust) returns (ListWeComDepartmentReply)
20+
post /department/page (ListWeComDepartmentReqeust) returns (ListWeComDepartmentReply)
2121
}
2222

2323

2424
type (
2525
ListWeComDepartmentReqeust {
26-
WeComDepId int `json:"weWorkDepId,optional"`
26+
WeComDepId int `json:"weComDepId,optional"`
2727
Name string `json:"name,optional"`
2828
NameEn string `json:"nameEn,optional"`
29-
WeComParentId int `json:"weWorkParentId,optional"`
29+
WeComParentId int `json:"weComParentId,optional"`
3030
Order int `json:"order,optional"`
3131

3232
PageIndex int `form:"pageIndex,optional"`
@@ -42,10 +42,10 @@ type (
4242
//
4343
WeComDepartment {
4444

45-
WeComDepId int `json:"weWorkDepId"`
45+
WeComDepId int `json:"weComDepId"`
4646
Name string `json:"name"`
4747
NameEn string `json:"nameEn"`
48-
WeComParentId int `json:"weWorkParentId"`
48+
WeComParentId int `json:"weComParentId"`
4949
Order int `json:"order"`
5050
DepartmentLeader []string `json:"departmentLeader"`
5151
RefDepartmentId int64 `json:"refDepartmentId"`

0 commit comments

Comments
 (0)