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 0a6f9bba
authored
Feb 17, 2021
by
孙喜旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
f00e335c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
linkwe-wecom/src/main/java/com/linkwechat/wecom/interceptor/WeAccessTokenInterceptor.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/interceptor/WeAccessTokenInterceptor.java
View file @
0a6f9bb
...
@@ -108,13 +108,10 @@ public class WeAccessTokenInterceptor implements Interceptor{
...
@@ -108,13 +108,10 @@ public class WeAccessTokenInterceptor implements Interceptor{
*/
*/
@Override
@Override
public
void
onSuccess
(
Object
o
,
ForestRequest
forestRequest
,
ForestResponse
forestResponse
)
{
public
void
onSuccess
(
Object
o
,
ForestRequest
forestRequest
,
ForestResponse
forestResponse
)
{
log
.
info
(
"url:【{}】,result:【{}】"
,
forestRequest
.
getUrl
(),
forestResponse
.
getContent
());
WeResultDto
weResultDto
=
JSONUtil
.
toBean
(
forestResponse
.
getContent
(),
WeResultDto
.
class
);
WeResultDto
weResultDto
=
JSONUtil
.
toBean
(
forestResponse
.
getContent
(),
WeResultDto
.
class
);
if
(
null
!=
weResultDto
.
getErrcode
()
&&
!
weResultDto
.
getErrcode
().
equals
(
WeConstans
.
WE_SUCCESS_CODE
)&&
!
weResultDto
.
getErrcode
().
equals
(
WeConstans
.
NOT_EXIST_CONTACT
)
){
if
(
null
!=
weResultDto
.
getErrcode
()
&&
!
weResultDto
.
getErrcode
().
equals
(
WeConstans
.
WE_SUCCESS_CODE
)&&
!
weResultDto
.
getErrcode
().
equals
(
WeConstans
.
NOT_EXIST_CONTACT
)
){
throw
new
ForestRuntimeException
(
forestResponse
.
getContent
());
throw
new
ForestRuntimeException
(
forestResponse
.
getContent
());
}
}
}
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
View file @
0a6f9bb
...
@@ -31,6 +31,7 @@ import org.springframework.security.core.context.SecurityContext;
...
@@ -31,6 +31,7 @@ import org.springframework.security.core.context.SecurityContext;
import
org.springframework.security.core.context.SecurityContextHolder
;
import
org.springframework.security.core.context.SecurityContextHolder
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -567,6 +568,7 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
...
@@ -567,6 +568,7 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
List
<
WeFlowerCustomerRel
>
weFlowerCustomerRels
=
iWeFlowerCustomerRelService
.
list
(
new
LambdaQueryWrapper
<
WeFlowerCustomerRel
>()
List
<
WeFlowerCustomerRel
>
weFlowerCustomerRels
=
iWeFlowerCustomerRelService
.
list
(
new
LambdaQueryWrapper
<
WeFlowerCustomerRel
>()
.
eq
(
WeFlowerCustomerRel:
:
getExternalUserid
,
weCustomer
.
getExternalUserid
()));
.
eq
(
WeFlowerCustomerRel:
:
getExternalUserid
,
weCustomer
.
getExternalUserid
()));
try
{
if
(
CollectionUtil
.
isNotEmpty
(
weFlowerCustomerRels
))
{
if
(
CollectionUtil
.
isNotEmpty
(
weFlowerCustomerRels
))
{
List
<
Long
>
weFlowerCustomerRelIds
=
weFlowerCustomerRels
.
stream
().
map
(
WeFlowerCustomerRel:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
weFlowerCustomerRelIds
=
weFlowerCustomerRels
.
stream
().
map
(
WeFlowerCustomerRel:
:
getId
).
collect
(
Collectors
.
toList
());
iWeFlowerCustomerTagRelService
.
remove
(
iWeFlowerCustomerTagRelService
.
remove
(
...
@@ -588,6 +590,10 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
...
@@ -588,6 +590,10 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
iWeTagGroupService
.
saveOrUpdateBatch
(
weGroups
);
iWeTagGroupService
.
saveOrUpdateBatch
(
weGroups
);
iWeFlowerCustomerTagRelService
.
saveOrUpdateBatch
(
weFlowerCustomerTagRels
);
iWeFlowerCustomerTagRelService
.
saveOrUpdateBatch
(
weFlowerCustomerTagRels
);
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
}
}
}
...
...
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