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 85e39247
authored
Nov 17, 2021
by
孙喜旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复任务宝bug
1 parent
8548c8e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeTaskFissionController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeTaskFissionServiceImpl.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeTaskFissionController.java
View file @
85e3924
...
...
@@ -32,6 +32,7 @@ import com.linkwechat.wecom.service.IWeTaskFissionService;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -51,6 +52,7 @@ import java.util.Objects;
* @author leejoker
* @date 2021-01-20
*/
@Slf4j
@Api
(
"任务宝Controller"
)
@RestController
@RequestMapping
(
"/wecom/fission"
)
...
...
@@ -218,6 +220,7 @@ public class WeTaskFissionController extends BaseController {
@Log
(
title
=
"生成带二维码的海报"
,
businessType
=
BusinessType
.
OTHER
)
@PostMapping
(
"/poster"
)
public
AjaxResult
<
JSONObject
>
posterGenerate
(
@RequestBody
WeTaskFissionPosterDTO
weTaskFissionPosterDTO
)
{
log
.
info
(
"获取任务所有参与客户的完成情况 入参params:{}"
,
JSONObject
.
toJSONString
(
weTaskFissionPosterDTO
));
String
posterUrl
=
weTaskFissionService
.
fissionPosterGenerate
(
weTaskFissionPosterDTO
);
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"posterUrl"
,
posterUrl
);
...
...
@@ -250,6 +253,7 @@ public class WeTaskFissionController extends BaseController {
@Log
(
title
=
"根据任务id获取参与任务客户列表"
,
businessType
=
BusinessType
.
OTHER
)
@GetMapping
(
"/getCustomerListById/{id}"
)
public
AjaxResult
<
List
<
WeCustomer
>>
getCustomerListById
(
@ApiParam
(
"任务id"
)
@PathVariable
(
"id"
)
String
id
)
{
log
.
info
(
"根据任务id获取参与任务客户列表 入参id:{}"
,
id
);
return
AjaxResult
.
success
(
weTaskFissionService
.
getCustomerListById
(
null
,
id
));
}
...
...
@@ -263,6 +267,7 @@ public class WeTaskFissionController extends BaseController {
@GetMapping
(
"/{id}/progress/{unionId}"
)
public
AjaxResult
<
WeTaskFissionProgressVO
>
getCustomerProgress
(
@ApiParam
(
"任务id"
)
@PathVariable
(
"id"
)
Long
id
,
@PathVariable
(
"unionId"
)
@ApiParam
(
"客户id"
)
String
unionId
)
{
log
.
info
(
"获取客户邀请列表和任务进度 入参id:{},unionId:{}"
,
id
,
unionId
);
WeTaskFission
weTaskFission
=
weTaskFissionService
.
selectWeTaskFissionById
(
id
);
if
(
weTaskFission
!=
null
)
{
return
AjaxResult
.
success
(
weTaskFissionService
.
getCustomerTaskProgress
(
weTaskFission
,
unionId
));
...
...
@@ -279,6 +284,7 @@ public class WeTaskFissionController extends BaseController {
@Log
(
title
=
"获取任务所有参与客户的完成情况"
,
businessType
=
BusinessType
.
OTHER
)
@GetMapping
(
"/{id}/progress"
)
public
AjaxResult
<
List
<
WeTaskFissionTotalProgressVO
>>
getAllCustomerProgress
(
@ApiParam
(
"任务id"
)
@PathVariable
(
"id"
)
Long
id
)
{
log
.
info
(
"获取任务所有参与客户的完成情况 入参id:{}"
,
id
);
WeTaskFission
weTaskFission
=
weTaskFissionService
.
selectWeTaskFissionById
(
id
);
List
<
WeTaskFissionTotalProgressVO
>
list
=
Lists
.
newArrayList
();
if
(
weTaskFission
!=
null
)
{
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeTaskFissionServiceImpl.java
View file @
85e3924
...
...
@@ -319,16 +319,11 @@ public class WeTaskFissionServiceImpl extends ServiceImpl<WeTaskFissionMapper, W
.
selectWeTaskFissionRecordByIdAndCustomerId
(
Long
.
valueOf
(
fissionId
),
unionId
);
Optional
.
ofNullable
(
weTaskFissionRecord
).
orElseThrow
(()
->
new
WeComException
(
"任务记录信息不存在"
));
List
<
WeCustomer
>
weCustomers
=
weCustomerService
.
list
(
new
LambdaQueryWrapper
<
WeCustomer
>()
.
eq
(
WeCustomer:
:
getState
,
WeConstans
.
FISSION_PREFIX
+
weTaskFissionRecord
.
getId
()));
List
<
String
>
eidList
=
Optional
.
ofNullable
(
weCustomers
).
orElseGet
(
ArrayList:
:
new
).
stream
()
.
map
(
WeCustomer:
:
getExternalUserid
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
eidList
))
{
customerList
.
addAll
(
weCustomerService
.
listByIds
(
eidList
));
if
(
CollectionUtil
.
isNotEmpty
(
weCustomers
))
{
customerList
.
addAll
(
weCustomers
);
}
}
return
customerList
;
...
...
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