Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cd861e65
authored
Mar 31, 2021
by
leejoker
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
🔊
增加获取用户信息日志
1 parent
3672b442
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
33 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeUserController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeUserController.java
View file @
cd861e6
...
@@ -7,16 +7,12 @@ import com.linkwechat.common.core.domain.AjaxResult;
...
@@ -7,16 +7,12 @@ import com.linkwechat.common.core.domain.AjaxResult;
import
com.linkwechat.common.core.page.TableDataInfo
;
import
com.linkwechat.common.core.page.TableDataInfo
;
import
com.linkwechat.common.enums.BusinessType
;
import
com.linkwechat.common.enums.BusinessType
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.vo.WeAllocateCustomersVo
;
import
com.linkwechat.wecom.domain.vo.*
;
import
com.linkwechat.wecom.domain.vo.WeAllocateGroupsVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserVo
;
import
com.linkwechat.wecom.service.IWeCustomerService
;
import
com.linkwechat.wecom.service.IWeUserService
;
import
com.linkwechat.wecom.service.IWeUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -32,6 +28,7 @@ import java.util.List;
...
@@ -32,6 +28,7 @@ import java.util.List;
@RestController
@RestController
@RequestMapping
(
"/wecom/user"
)
@RequestMapping
(
"/wecom/user"
)
@Api
(
"通讯录人员接口"
)
@Api
(
"通讯录人员接口"
)
@Slf4j
public
class
WeUserController
extends
BaseController
{
public
class
WeUserController
extends
BaseController
{
@Autowired
@Autowired
...
@@ -44,23 +41,19 @@ public class WeUserController extends BaseController {
...
@@ -44,23 +41,19 @@ public class WeUserController extends BaseController {
// @PreAuthorize("@ss.hasPermi('contacts:organization:query')")
// @PreAuthorize("@ss.hasPermi('contacts:organization:query')")
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ApiOperation
(
"获取通讯录人员列表"
)
@ApiOperation
(
"获取通讯录人员列表"
)
public
TableDataInfo
list
(
WeUser
weUser
)
public
TableDataInfo
list
(
WeUser
weUser
)
{
{
startPage
();
startPage
();
List
<
WeUser
>
list
=
weUserService
.
selectWeUserList
(
weUser
);
List
<
WeUser
>
list
=
weUserService
.
selectWeUserList
(
weUser
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
/**
/**
* 获取通讯录相关客户详细信息
* 获取通讯录相关客户详细信息
*/
*/
// @PreAuthorize("@ss.hasPermi('contacts:organization:view')")
// @PreAuthorize("@ss.hasPermi('contacts:organization:view')")
@GetMapping
(
value
=
"/{userId}"
)
@GetMapping
(
value
=
"/{userId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"userId"
)
String
userId
)
public
AjaxResult
getInfo
(
@PathVariable
(
"userId"
)
String
userId
)
{
{
return
AjaxResult
.
success
(
weUserService
.
selectWeUserById
(
userId
));
return
AjaxResult
.
success
(
weUserService
.
selectWeUserById
(
userId
));
}
}
...
@@ -71,8 +64,7 @@ public class WeUserController extends BaseController {
...
@@ -71,8 +64,7 @@ public class WeUserController extends BaseController {
@Log
(
title
=
"通讯录相关客户"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"通讯录相关客户"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
@PostMapping
@ApiOperation
(
"新增通讯录客户"
)
@ApiOperation
(
"新增通讯录客户"
)
public
AjaxResult
add
(
@Validated
@RequestBody
WeUser
weUser
)
public
AjaxResult
add
(
@Validated
@RequestBody
WeUser
weUser
)
{
{
weUserService
.
insertWeUser
(
weUser
);
weUserService
.
insertWeUser
(
weUser
);
return
AjaxResult
.
success
();
return
AjaxResult
.
success
();
}
}
...
@@ -84,8 +76,7 @@ public class WeUserController extends BaseController {
...
@@ -84,8 +76,7 @@ public class WeUserController extends BaseController {
@Log
(
title
=
"更新通讯录客户"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"更新通讯录客户"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
@PutMapping
@ApiOperation
(
"更新通讯录客户"
)
@ApiOperation
(
"更新通讯录客户"
)
public
AjaxResult
edit
(
@RequestBody
WeUser
weUser
)
public
AjaxResult
edit
(
@RequestBody
WeUser
weUser
)
{
{
weUserService
.
updateWeUser
(
weUser
);
weUserService
.
updateWeUser
(
weUser
);
return
AjaxResult
.
success
();
return
AjaxResult
.
success
();
}
}
...
@@ -93,6 +84,7 @@ public class WeUserController extends BaseController {
...
@@ -93,6 +84,7 @@ public class WeUserController extends BaseController {
/**
/**
* 启用或者禁止
* 启用或者禁止
*
* @param weUser
* @param weUser
* @return
* @return
*/
*/
...
@@ -100,7 +92,7 @@ public class WeUserController extends BaseController {
...
@@ -100,7 +92,7 @@ public class WeUserController extends BaseController {
@Log
(
title
=
"启用禁用用户"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"启用禁用用户"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/startOrStop"
)
@PutMapping
(
"/startOrStop"
)
@ApiOperation
(
"是否启用(1表示启用成员,0表示禁用成员)"
)
@ApiOperation
(
"是否启用(1表示启用成员,0表示禁用成员)"
)
public
AjaxResult
startOrStop
(
@RequestBody
WeUser
weUser
){
public
AjaxResult
startOrStop
(
@RequestBody
WeUser
weUser
)
{
weUserService
.
startOrStop
(
weUser
);
weUserService
.
startOrStop
(
weUser
);
...
@@ -110,6 +102,7 @@ public class WeUserController extends BaseController {
...
@@ -110,6 +102,7 @@ public class WeUserController extends BaseController {
/**
/**
* 离职已分配
* 离职已分配
*
* @param weLeaveUserVo
* @param weLeaveUserVo
* @return
* @return
*/
*/
...
@@ -126,6 +119,7 @@ public class WeUserController extends BaseController {
...
@@ -126,6 +119,7 @@ public class WeUserController extends BaseController {
/**
/**
* 离职未分配
* 离职未分配
*
* @param weLeaveUserVo
* @param weLeaveUserVo
* @return
* @return
*/
*/
...
@@ -142,6 +136,7 @@ public class WeUserController extends BaseController {
...
@@ -142,6 +136,7 @@ public class WeUserController extends BaseController {
/**
/**
* 离职分配
* 离职分配
*
* @param weLeaveUserInfoAllocateVo
* @param weLeaveUserInfoAllocateVo
* @return
* @return
*/
*/
...
@@ -157,11 +152,12 @@ public class WeUserController extends BaseController {
...
@@ -157,11 +152,12 @@ public class WeUserController extends BaseController {
/**
/**
* 同步成员
* 同步成员
*
* @return
* @return
*/
*/
// @PreAuthorize("@ss.hasPermi('contacts:organization:sync')")
// @PreAuthorize("@ss.hasPermi('contacts:organization:sync')")
@GetMapping
({
"/synchWeUser"
})
@GetMapping
({
"/synchWeUser"
})
public
AjaxResult
synchWeUser
(){
public
AjaxResult
synchWeUser
()
{
weUserService
.
synchWeUser
();
weUserService
.
synchWeUser
();
...
@@ -172,11 +168,12 @@ public class WeUserController extends BaseController {
...
@@ -172,11 +168,12 @@ public class WeUserController extends BaseController {
/**
/**
* 删除用户
* 删除用户
*
* @return
* @return
*/
*/
// @PreAuthorize("@ss.hasPermi('contacts:organization:removeMember')")
// @PreAuthorize("@ss.hasPermi('contacts:organization:removeMember')")
@DeleteMapping
({
"/{ids}"
})
@DeleteMapping
({
"/{ids}"
})
public
AjaxResult
deleteUser
(
@PathVariable
String
[]
ids
){
public
AjaxResult
deleteUser
(
@PathVariable
String
[]
ids
)
{
weUserService
.
deleteUser
(
ids
);
weUserService
.
deleteUser
(
ids
);
...
@@ -188,27 +185,28 @@ public class WeUserController extends BaseController {
...
@@ -188,27 +185,28 @@ public class WeUserController extends BaseController {
/**
/**
* 获取历史分配记录的成员
* 获取历史分配记录的成员
*
* @param weAllocateCustomersVo
* @param weAllocateCustomersVo
* @return
* @return
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:user:getAllocateCustomers')")
// @PreAuthorize("@ss.hasPermi('wecom:user:getAllocateCustomers')")
@GetMapping
({
"/getAllocateCustomers"
})
@GetMapping
({
"/getAllocateCustomers"
})
public
TableDataInfo
getAllocateCustomers
(
WeAllocateCustomersVo
weAllocateCustomersVo
){
public
TableDataInfo
getAllocateCustomers
(
WeAllocateCustomersVo
weAllocateCustomersVo
)
{
startPage
();
startPage
();
List
<
WeAllocateCustomersVo
>
list
=
weUserService
.
getAllocateCustomers
(
weAllocateCustomersVo
);
List
<
WeAllocateCustomersVo
>
list
=
weUserService
.
getAllocateCustomers
(
weAllocateCustomersVo
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
/**
/**
* 获取历史分配记录的群
* 获取历史分配记录的群
*
* @param weAllocateGroupsVo
* @param weAllocateGroupsVo
* @return
* @return
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:user:getAllocateGroups')")
// @PreAuthorize("@ss.hasPermi('wecom:user:getAllocateGroups')")
@GetMapping
({
"/getAllocateGroups"
})
@GetMapping
({
"/getAllocateGroups"
})
public
TableDataInfo
getAllocateGroups
(
WeAllocateGroupsVo
weAllocateGroupsVo
){
public
TableDataInfo
getAllocateGroups
(
WeAllocateGroupsVo
weAllocateGroupsVo
)
{
startPage
();
startPage
();
List
<
WeAllocateGroupsVo
>
list
=
weUserService
.
getAllocateGroups
(
weAllocateGroupsVo
);
List
<
WeAllocateGroupsVo
>
list
=
weUserService
.
getAllocateGroups
(
weAllocateGroupsVo
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
...
@@ -217,20 +215,15 @@ public class WeUserController extends BaseController {
...
@@ -217,20 +215,15 @@ public class WeUserController extends BaseController {
/**
/**
* 内部应用获取用户userId
* 内部应用获取用户userId
*
* @param code
* @param code
* @return
* @return
*/
*/
@GetMapping
(
"/getUserInfo"
)
@GetMapping
(
"/getUserInfo"
)
public
AjaxResult
getUserInfo
(
String
code
,
String
agentId
)
public
AjaxResult
getUserInfo
(
String
code
,
String
agentId
)
{
{
log
.
info
(
"[getUserInfo] code={}, agentId={}"
,
code
,
agentId
);
WeUserInfoVo
userInfo
=
weUserService
.
getUserInfo
(
code
,
agentId
);
return
AjaxResult
.
success
(
log
.
info
(
"[getUserInfp] userInfo={}"
,
userInfo
);
weUserService
.
getUserInfo
(
code
,
agentId
)
return
AjaxResult
.
success
(
userInfo
);
);
}
}
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment