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 4b182355
authored
Jul 16, 2021
by
danmo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
任务宝发送任务失败修正
1 parent
4370f024
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCustomerService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessagePushServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeTaskFissionServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCustomerService.java
View file @
4b18235
...
@@ -128,7 +128,11 @@ public interface IWeCustomerService extends IService<WeCustomer>
...
@@ -128,7 +128,11 @@ public interface IWeCustomerService extends IService<WeCustomer>
void
updateWeCustomerPortrait
(
WeCustomerPortrait
weCustomerPortrait
);
void
updateWeCustomerPortrait
(
WeCustomerPortrait
weCustomerPortrait
);
/**
* 查询全部客户列表
* @param weCustomer
* @return
*/
public
List
<
WeCustomer
>
selectWeCustomerAllList
(
WeCustomer
weCustomer
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessagePushServiceImpl.java
View file @
4b18235
...
@@ -170,8 +170,9 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
...
@@ -170,8 +170,9 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
WeCustomer
weCustomer
=
new
WeCustomer
();
WeCustomer
weCustomer
=
new
WeCustomer
();
weCustomer
.
setUserIds
(
staffId
);
weCustomer
.
setUserIds
(
staffId
);
weCustomer
.
setDepartmentIds
(
department
);
weCustomer
.
setDepartmentIds
(
department
);
customers
=
weCustomerService
.
selectWeCustomerList
(
weCustomer
);
customers
=
weCustomerService
.
selectWeCustomer
All
List
(
weCustomer
);
redisCache
.
setCacheList
(
WeConstans
.
WECUSTOMERS_KEY
,
customers
);
redisCache
.
setCacheList
(
WeConstans
.
WECUSTOMERS_KEY
,
customers
);
redisCache
.
expire
(
WeConstans
.
WECUSTOMERS_KEY
,
2
*
60L
);
}
}
return
customers
;
return
customers
;
}
else
{
}
else
{
...
@@ -182,7 +183,7 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
...
@@ -182,7 +183,7 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
weCustomer
.
setUserIds
(
staffId
);
weCustomer
.
setUserIds
(
staffId
);
weCustomer
.
setTagIds
(
tag
);
weCustomer
.
setTagIds
(
tag
);
weCustomer
.
setDepartmentIds
(
department
);
weCustomer
.
setDepartmentIds
(
department
);
return
weCustomerService
.
selectWeCustomerList
(
weCustomer
);
return
weCustomerService
.
selectWeCustomer
All
List
(
weCustomer
);
}
}
}
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
View file @
4b18235
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.linkwechat.common.constant.Constants
;
import
com.linkwechat.common.constant.Constants
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.enums.TrajectorySceneType
;
import
com.linkwechat.common.enums.TrajectorySceneType
;
import
com.linkwechat.common.exception.CustomException
;
import
com.linkwechat.common.utils.DateUtils
;
import
com.linkwechat.common.utils.DateUtils
;
import
com.linkwechat.common.utils.SecurityUtils
;
import
com.linkwechat.common.utils.SecurityUtils
;
import
com.linkwechat.common.utils.SnowFlakeUtil
;
import
com.linkwechat.common.utils.SnowFlakeUtil
;
...
@@ -119,13 +120,10 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
...
@@ -119,13 +120,10 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
@Override
@Override
public
List
<
WeCustomer
>
selectWeCustomerList
(
WeCustomer
weCustomer
)
{
public
List
<
WeCustomer
>
selectWeCustomerList
(
WeCustomer
weCustomer
)
{
//当前登录用户为企业用户
//当前登录用户为企业用户
try
{
if
(
Constants
.
USER_TYPE_WECOME
if
(
Constants
.
USER_TYPE_WECOME
.
equals
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserType
())){
.
equals
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserType
())){
weCustomer
.
setUserIds
((
SecurityUtils
.
getLoginUser
().
getUser
().
getWeUserId
()));
weCustomer
.
setUserIds
((
SecurityUtils
.
getLoginUser
().
getUser
().
getWeUserId
()));
}
}
}
catch
(
Exception
e
)
{
}
return
weCustomerMapper
.
selectWeCustomerList
(
weCustomer
);
return
weCustomerMapper
.
selectWeCustomerList
(
weCustomer
);
}
}
...
@@ -709,8 +707,10 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
...
@@ -709,8 +707,10 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
iWeCustomerTrajectoryService
.
inforMationNews
(
weCustomerPortrait
.
getUserId
(),
weCustomerPortrait
.
getExternalUserid
(),
TrajectorySceneType
.
TRAJECTORY_TYPE_XXDT_BCZL
.
getKey
());
iWeCustomerTrajectoryService
.
inforMationNews
(
weCustomerPortrait
.
getUserId
(),
weCustomerPortrait
.
getExternalUserid
(),
TrajectorySceneType
.
TRAJECTORY_TYPE_XXDT_BCZL
.
getKey
());
}
}
@Override
public
List
<
WeCustomer
>
selectWeCustomerAllList
(
WeCustomer
weCustomer
)
{
return
weCustomerMapper
.
selectWeCustomerList
(
weCustomer
);
}
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeTaskFissionServiceImpl.java
View file @
4b18235
...
@@ -34,6 +34,8 @@ import org.apache.commons.collections4.CollectionUtils;
...
@@ -34,6 +34,8 @@ import org.apache.commons.collections4.CollectionUtils;
import
org.apache.commons.lang3.exception.ExceptionUtils
;
import
org.apache.commons.lang3.exception.ExceptionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.security.core.context.SecurityContext
;
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
;
...
@@ -240,6 +242,9 @@ public class WeTaskFissionServiceImpl extends ServiceImpl<WeTaskFissionMapper, W
...
@@ -240,6 +242,9 @@ public class WeTaskFissionServiceImpl extends ServiceImpl<WeTaskFissionMapper, W
customerMessagePushDto
.
setDepartment
(
departmentIds
);
customerMessagePushDto
.
setDepartment
(
departmentIds
);
}
}
try
{
try
{
SecurityContext
context
=
SecurityContextHolder
.
getContext
();
SecurityContextHolder
.
setStrategyName
(
SecurityContextHolder
.
MODE_INHERITABLETHREADLOCAL
);
SecurityContextHolder
.
setContext
(
context
);
weCustomerMessagePushService
.
addWeCustomerMessagePush
(
customerMessagePushDto
);
weCustomerMessagePushService
.
addWeCustomerMessagePush
(
customerMessagePushDto
);
}
catch
(
JsonProcessingException
|
ParseException
e
)
{
}
catch
(
JsonProcessingException
|
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
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