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 7bdd048c
authored
Apr 06, 2021
by
李昂
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
:adhesive_bandage:修改external_userid为unionId
1 parent
21787483
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeTaskFissionController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeTaskFissionPosterDTO.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 @
7bdd048
...
@@ -245,12 +245,12 @@ public class WeTaskFissionController extends BaseController {
...
@@ -245,12 +245,12 @@ public class WeTaskFissionController extends BaseController {
@ApiOperation
(
value
=
"获取客户邀请列表和任务进度"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"获取客户邀请列表和任务进度"
,
httpMethod
=
"GET"
)
// @PreAuthorize("@ss.hasPermi('wecom:fission:getCustomerProgress')")
// @PreAuthorize("@ss.hasPermi('wecom:fission:getCustomerProgress')")
@Log
(
title
=
"获取客户邀请列表和任务进度"
,
businessType
=
BusinessType
.
OTHER
)
@Log
(
title
=
"获取客户邀请列表和任务进度"
,
businessType
=
BusinessType
.
OTHER
)
@GetMapping
(
"/{id}/progress/{
ei
d}"
)
@GetMapping
(
"/{id}/progress/{
unionI
d}"
)
public
AjaxResult
<
WeTaskFissionProgressVO
>
getCustomerProgress
(
@ApiParam
(
"任务id"
)
@PathVariable
(
"id"
)
Long
id
public
AjaxResult
<
WeTaskFissionProgressVO
>
getCustomerProgress
(
@ApiParam
(
"任务id"
)
@PathVariable
(
"id"
)
Long
id
,
@PathVariable
(
"
eid"
)
@ApiParam
(
"客户id"
)
String
ei
d
)
{
,
@PathVariable
(
"
unionId"
)
@ApiParam
(
"客户id"
)
String
unionI
d
)
{
WeTaskFission
weTaskFission
=
weTaskFissionService
.
selectWeTaskFissionById
(
id
);
WeTaskFission
weTaskFission
=
weTaskFissionService
.
selectWeTaskFissionById
(
id
);
if
(
weTaskFission
!=
null
)
{
if
(
weTaskFission
!=
null
)
{
return
AjaxResult
.
success
(
weTaskFissionService
.
getCustomerTaskProgress
(
weTaskFission
,
ei
d
));
return
AjaxResult
.
success
(
weTaskFissionService
.
getCustomerTaskProgress
(
weTaskFission
,
unionI
d
));
}
else
{
}
else
{
throw
new
WeComException
(
"任务不存在"
);
throw
new
WeComException
(
"任务不存在"
);
}
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeTaskFissionPosterDTO.java
View file @
7bdd048
...
@@ -13,7 +13,7 @@ import lombok.Data;
...
@@ -13,7 +13,7 @@ import lombok.Data;
@Data
@Data
public
class
WeTaskFissionPosterDTO
{
public
class
WeTaskFissionPosterDTO
{
@ApiModelProperty
(
"客户id"
)
@ApiModelProperty
(
"客户id"
)
private
String
ei
d
;
private
String
unionI
d
;
@ApiModelProperty
(
"任务id"
)
@ApiModelProperty
(
"任务id"
)
private
Long
taskFissionId
;
private
Long
taskFissionId
;
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeTaskFissionServiceImpl.java
View file @
7bdd048
...
@@ -247,10 +247,10 @@ public class WeTaskFissionServiceImpl implements IWeTaskFissionService {
...
@@ -247,10 +247,10 @@ public class WeTaskFissionServiceImpl implements IWeTaskFissionService {
@Transactional
@Transactional
public
String
fissionPosterGenerate
(
WeTaskFissionPosterDTO
weTaskFissionPosterDTO
)
{
public
String
fissionPosterGenerate
(
WeTaskFissionPosterDTO
weTaskFissionPosterDTO
)
{
WeCustomer
weCustomer
=
weCustomerService
.
getOne
(
new
LambdaQueryWrapper
<
WeCustomer
>()
WeCustomer
weCustomer
=
weCustomerService
.
getOne
(
new
LambdaQueryWrapper
<
WeCustomer
>()
.
eq
(
WeCustomer:
:
get
ExternalUserid
,
weTaskFissionPosterDTO
.
getEi
d
()));
.
eq
(
WeCustomer:
:
get
Unionid
,
weTaskFissionPosterDTO
.
getUnionI
d
()));
if
(
weCustomer
!=
null
)
{
if
(
weCustomer
!=
null
)
{
//任务表添加当前客户任务
//任务表添加当前客户任务
WeTaskFissionRecord
record
=
getTaskFissionRecordId
(
weTaskFissionPosterDTO
.
getTaskFissionId
(),
weCustomer
.
get
ExternalUser
id
(),
weCustomer
.
getName
());
WeTaskFissionRecord
record
=
getTaskFissionRecordId
(
weTaskFissionPosterDTO
.
getTaskFissionId
(),
weCustomer
.
get
Union
id
(),
weCustomer
.
getName
());
String
posterUrl
=
record
.
getPoster
();
String
posterUrl
=
record
.
getPoster
();
if
(
StringUtils
.
isBlank
(
posterUrl
))
{
if
(
StringUtils
.
isBlank
(
posterUrl
))
{
String
qrcode
=
getPosterQRCode
(
weTaskFissionPosterDTO
.
getFissionTargetId
(),
record
,
weCustomer
);
String
qrcode
=
getPosterQRCode
(
weTaskFissionPosterDTO
.
getFissionTargetId
(),
record
,
weCustomer
);
...
@@ -292,20 +292,20 @@ public class WeTaskFissionServiceImpl implements IWeTaskFissionService {
...
@@ -292,20 +292,20 @@ public class WeTaskFissionServiceImpl implements IWeTaskFissionService {
}
}
@Override
@Override
public
List
<
WeCustomer
>
getCustomerListById
(
String
ei
d
,
String
fissionId
)
{
public
List
<
WeCustomer
>
getCustomerListById
(
String
unionI
d
,
String
fissionId
)
{
WeTaskFissionRecord
weTaskFissionRecord
;
WeTaskFissionRecord
weTaskFissionRecord
;
if
(
StringUtils
.
isEmpty
(
ei
d
))
{
if
(
StringUtils
.
isEmpty
(
unionI
d
))
{
List
<
WeTaskFissionRecord
>
weTaskFissionRecords
=
weTaskFissionRecordService
List
<
WeTaskFissionRecord
>
weTaskFissionRecords
=
weTaskFissionRecordService
.
list
(
new
LambdaQueryWrapper
<
WeTaskFissionRecord
>().
eq
(
WeTaskFissionRecord:
:
getTaskFissionId
,
fissionId
));
.
list
(
new
LambdaQueryWrapper
<
WeTaskFissionRecord
>().
eq
(
WeTaskFissionRecord:
:
getTaskFissionId
,
fissionId
));
return
Optional
.
ofNullable
(
weTaskFissionRecords
).
orElseGet
(
ArrayList:
:
new
).
stream
()
return
Optional
.
ofNullable
(
weTaskFissionRecords
).
orElseGet
(
ArrayList:
:
new
).
stream
()
.
map
(
record
->
weCustomerService
.
selectWeCustomerById
(
record
.
getCustomerId
()))
.
map
(
record
->
weCustomerService
.
selectWeCustomerById
(
record
.
getCustomerId
()))
.
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
.
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
}
else
{
}
else
{
WeCustomer
weCustomer
=
weCustomerService
.
getOne
(
new
LambdaQueryWrapper
<
WeCustomer
>().
eq
(
WeCustomer:
:
get
ExternalUserid
,
ei
d
));
WeCustomer
weCustomer
=
weCustomerService
.
getOne
(
new
LambdaQueryWrapper
<
WeCustomer
>().
eq
(
WeCustomer:
:
get
Unionid
,
unionI
d
));
String
externalUseriId
=
Optional
.
ofNullable
(
weCustomer
).
map
(
WeCustomer:
:
getExternalUser
id
)
String
uid
=
Optional
.
ofNullable
(
weCustomer
).
map
(
WeCustomer:
:
getUnion
id
)
.
orElseThrow
(()
->
new
WeComException
(
"用户信息不存在"
));
.
orElseThrow
(()
->
new
WeComException
(
"用户信息不存在"
));
weTaskFissionRecord
=
weTaskFissionRecordService
weTaskFissionRecord
=
weTaskFissionRecordService
.
selectWeTaskFissionRecordByIdAndCustomerId
(
Long
.
valueOf
(
fissionId
),
externalUseriI
d
);
.
selectWeTaskFissionRecordByIdAndCustomerId
(
Long
.
valueOf
(
fissionId
),
ui
d
);
Optional
.
ofNullable
(
weTaskFissionRecord
).
map
(
WeTaskFissionRecord:
:
getId
)
Optional
.
ofNullable
(
weTaskFissionRecord
).
map
(
WeTaskFissionRecord:
:
getId
)
.
orElseThrow
(()
->
new
WeComException
(
"任务记录信息不存在"
));
.
orElseThrow
(()
->
new
WeComException
(
"任务记录信息不存在"
));
List
<
WeFlowerCustomerRel
>
list
=
weFlowerCustomerRelService
.
list
(
new
LambdaQueryWrapper
<
WeFlowerCustomerRel
>()
List
<
WeFlowerCustomerRel
>
list
=
weFlowerCustomerRelService
.
list
(
new
LambdaQueryWrapper
<
WeFlowerCustomerRel
>()
...
@@ -351,10 +351,10 @@ public class WeTaskFissionServiceImpl implements IWeTaskFissionService {
...
@@ -351,10 +351,10 @@ public class WeTaskFissionServiceImpl implements IWeTaskFissionService {
}
}
@Override
@Override
public
WeTaskFissionProgressVO
getCustomerTaskProgress
(
WeTaskFission
taskFission
,
String
ei
d
)
{
public
WeTaskFissionProgressVO
getCustomerTaskProgress
(
WeTaskFission
taskFission
,
String
unionI
d
)
{
long
complete
=
0L
;
long
complete
=
0L
;
long
total
=
taskFission
.
getFissNum
();
long
total
=
taskFission
.
getFissNum
();
List
<
WeCustomer
>
list
=
getCustomerListById
(
ei
d
,
String
.
valueOf
(
taskFission
.
getId
()));
List
<
WeCustomer
>
list
=
getCustomerListById
(
unionI
d
,
String
.
valueOf
(
taskFission
.
getId
()));
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
complete
=
list
.
size
();
complete
=
list
.
size
();
}
else
{
}
else
{
...
...
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