Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
43c1adcb
Commit
43c1adcb
authored
Oct 20, 2020
by
郑勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [1003768] ERP质检小睿新增登录手机号
parent
c8132c53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
39 deletions
+75
-39
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+63
-39
BookGroupDTO.java
...src/main/java/com/pcloud/book/group/dto/BookGroupDTO.java
+12
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
43c1adcb
...
@@ -136,6 +136,7 @@ import com.pcloud.labelcenter.label.service.LabelService;
...
@@ -136,6 +136,7 @@ import com.pcloud.labelcenter.label.service.LabelService;
import
com.pcloud.resourcecenter.product.dto.ProductDto
;
import
com.pcloud.resourcecenter.product.dto.ProductDto
;
import
com.pcloud.resourcecenter.product.dto.SpecificationDto
;
import
com.pcloud.resourcecenter.product.dto.SpecificationDto
;
import
com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto
;
import
com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto
;
import
com.sun.org.apache.xpath.internal.operations.Bool
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -3173,7 +3174,7 @@ public class BookBizImpl implements BookBiz {
...
@@ -3173,7 +3174,7 @@ public class BookBizImpl implements BookBiz {
List
<
CompletableFuture
>
futureList
=
Lists
.
newArrayList
();
List
<
CompletableFuture
>
futureList
=
Lists
.
newArrayList
();
// 社群书二维码
// 社群书二维码
getGroupQrcodeInfo
(
url
,
futureList
);
getGroupQrcodeInfo
(
url
,
null
,
futureList
);
// 现代纸书二维码
// 现代纸书二维码
getBookQrcodeInfo
(
url
,
futureList
);
getBookQrcodeInfo
(
url
,
futureList
);
...
@@ -3196,14 +3197,22 @@ public class BookBizImpl implements BookBiz {
...
@@ -3196,14 +3197,22 @@ public class BookBizImpl implements BookBiz {
/**
/**
* 查询社群书二维码信息
* 查询社群书二维码信息
*/
*/
private
void
getGroupQrcodeInfo
(
String
url
,
List
<
CompletableFuture
>
futureList
)
{
private
void
getGroupQrcodeInfo
(
String
url
,
Long
bookGroupId
,
List
<
CompletableFuture
>
futureList
)
{
// https://qrcode.raysgo.com/2233
// https://qrcode.raysgo.com/2233 https://qrcode.raysgo.com/t-2/1404/2280
String
strBookGroupId
=
url
.
substring
(
url
.
indexOf
(
"/"
,
url
.
indexOf
(
"https://"
)
+
8
)
+
1
);
Boolean
flag
=
false
;
if
(
NumberUtil
.
isNumber
(
strBookGroupId
)){
String
strBookGroupId
=
url
.
substring
(
url
.
lastIndexOf
(
"/"
)+
1
);
if
(
null
!=
bookGroupId
){
flag
=
true
;
}
else
{
if
(
NumberUtil
.
isNumber
(
strBookGroupId
)){
flag
=
true
;
}
}
if
(
flag
){
futureList
.
add
(
CompletableFuture
.
supplyAsync
(()->{
futureList
.
add
(
CompletableFuture
.
supplyAsync
(()->{
BookGroupDTO
bookGroupInfo
=
null
;
BookGroupDTO
bookGroupInfo
=
null
;
try
{
try
{
bookGroupInfo
=
bookGroupBiz
.
getBookGroupInfo
(
Long
.
valueOf
(
strBookGroupId
));
bookGroupInfo
=
bookGroupBiz
.
getBookGroupInfo
(
null
!=
bookGroupId
?
bookGroupId
:
Long
.
valueOf
(
strBookGroupId
));
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
}
}
if
(
bookGroupInfo
!=
null
)
{
if
(
bookGroupInfo
!=
null
)
{
...
@@ -3211,11 +3220,16 @@ public class BookBizImpl implements BookBiz {
...
@@ -3211,11 +3220,16 @@ public class BookBizImpl implements BookBiz {
this
.
fillLocationName
(
Lists
.
newArrayList
(
bookGroupInfo
));
this
.
fillLocationName
(
Lists
.
newArrayList
(
bookGroupInfo
));
BookDto
bookInfo
=
bookGroupInfo
.
getBookInfo
();
BookDto
bookInfo
=
bookGroupInfo
.
getBookInfo
();
if
(
bookInfo
!=
null
)
{
if
(
bookInfo
!=
null
)
{
bookInfo
.
setAdviserName
(
adviserConsr
.
getNameById
(
bookInfo
.
getCreatedUser
()));
Map
<
Long
,
AdviserBaseInfoDto
>
adviserInfoDtoMap
=
adviserConsr
.
getAdviserId2AdviserInfoDtoMap
(
Lists
.
newArrayList
(
bookInfo
.
getCreatedUser
()));
Long
agentId
=
adviserConsr
.
getAgentIdByAdviser
(
bookInfo
.
getCreatedUser
());
if
(
MapUtils
.
isNotEmpty
(
adviserInfoDtoMap
)
&&
adviserInfoDtoMap
.
containsKey
(
bookInfo
.
getCreatedUser
())){
Map
<
Long
,
String
>
agentNameMap
=
agentConsr
.
getNames
(
Collections
.
singletonList
(
agentId
));
AdviserBaseInfoDto
adviserBaseInfoDto
=
adviserInfoDtoMap
.
get
(
bookInfo
.
getCreatedUser
());
if
(!
MapUtils
.
isEmpty
(
agentNameMap
)
&&
agentNameMap
.
containsKey
(
agentId
))
{
if
(
null
!=
adviserBaseInfoDto
)
{
bookInfo
.
setAgentName
(
agentNameMap
.
get
(
agentId
));
bookInfo
.
setAdviserName
(
adviserBaseInfoDto
.
getPartyName
());
bookGroupInfo
.
setAdviserPhone
(
adviserBaseInfoDto
.
getPhoneNum
());
bookInfo
.
setAgentId
(
adviserBaseInfoDto
.
getAgentId
());
bookInfo
.
setAgentName
(
adviserBaseInfoDto
.
getAgentName
());
bookInfo
.
setTelephone
(
adviserBaseInfoDto
.
getPhoneNum
());
}
}
}
}
}
}
}
...
@@ -3229,35 +3243,45 @@ public class BookBizImpl implements BookBiz {
...
@@ -3229,35 +3243,45 @@ public class BookBizImpl implements BookBiz {
*/
*/
private
void
getBookQrcodeInfo
(
String
url
,
List
<
CompletableFuture
>
futureList
)
{
private
void
getBookQrcodeInfo
(
String
url
,
List
<
CompletableFuture
>
futureList
)
{
// http://weixin.qq.com/q/02mGra51v48q_10000M07-
// http://weixin.qq.com/q/02mGra51v48q_10000M07-
futureList
.
add
(
CompletableFuture
.
supplyAsync
(()
->
{
QrcodeSceneDto
qrcodeSceneDto
=
qrcodeSceneConsr
.
getByUrl
(
url
);
BookGroupDTO
bookGroupInfo
=
null
;
if
(
qrcodeSceneDto
!=
null
&&
qrcodeSceneDto
.
getSceneId
()
>
0
)
{
QrcodeSceneDto
qrcodeSceneDto
=
qrcodeSceneConsr
.
getByUrl
(
url
);
BookGroupDTO
bookGroupDTO
=
bookGroupDao
.
getBaseInfoBySceneId
(
qrcodeSceneDto
.
getSceneId
());
if
(
qrcodeSceneDto
!=
null
&&
qrcodeSceneDto
.
getSceneId
()
>
0
)
{
if
(
null
!=
bookGroupDTO
)
{
bookGroupInfo
=
new
BookGroupDTO
();
getGroupQrcodeInfo
(
url
,
bookGroupDTO
.
getId
(),
futureList
);
bookGroupInfo
.
setGroupQrcodeUrl
(
qrcodeSceneDto
.
getQrcodeUrl
());
}
else
{
bookGroupInfo
.
setGroupQrcodeName
(
qrcodeSceneDto
.
getSceneName
());
futureList
.
add
(
CompletableFuture
.
supplyAsync
(()
->
{
bookGroupInfo
.
setLocationName
(
qrcodeSceneDto
.
getQrcodeLocations
().
get
(
0
).
getLocationName
());
BookGroupDTO
bookGroupInfo
=
null
;
bookGroupInfo
.
setProLabelId
(
qrcodeSceneDto
.
getQrcodeLabelDto
().
getProLabelId
());
bookGroupInfo
=
new
BookGroupDTO
();
bookGroupInfo
.
setDepLabelId
(
qrcodeSceneDto
.
getQrcodeLabelDto
().
getDepLabelId
());
bookGroupInfo
.
setGroupQrcodeUrl
(
qrcodeSceneDto
.
getQrcodeUrl
());
bookGroupInfo
.
setPurLabelId
(
qrcodeSceneDto
.
getQrcodeLabelDto
().
getPurLabelId
());
bookGroupInfo
.
setGroupQrcodeName
(
qrcodeSceneDto
.
getSceneName
());
bookGroupInfo
.
setCreateTime
(
qrcodeSceneDto
.
getCreatedDate
());
bookGroupInfo
.
setLocationName
(
qrcodeSceneDto
.
getQrcodeLocations
().
get
(
0
).
getLocationName
());
bookGroupInfo
.
setBookId
(
qrcodeSceneDto
.
getAdviserBookId
());
bookGroupInfo
.
setProLabelId
(
qrcodeSceneDto
.
getQrcodeLabelDto
().
getProLabelId
());
bookGroupInfo
.
setAdviserId
(
qrcodeSceneDto
.
getCreatedByUserLogin
());
bookGroupInfo
.
setDepLabelId
(
qrcodeSceneDto
.
getQrcodeLabelDto
().
getDepLabelId
());
BookDto
bookInfo
=
bookBiz
.
getBaseById
(
bookGroupInfo
.
getBookId
());
bookGroupInfo
.
setPurLabelId
(
qrcodeSceneDto
.
getQrcodeLabelDto
().
getPurLabelId
());
if
(
null
!=
bookInfo
)
{
bookGroupInfo
.
setCreateTime
(
qrcodeSceneDto
.
getCreatedDate
());
bookInfo
.
setBookName
(
null
!=
bookInfo
.
getBookName
()
?
StringUtil
.
addBracket
(
bookInfo
.
getBookName
())
:
null
);
bookGroupInfo
.
setBookId
(
qrcodeSceneDto
.
getAdviserBookId
());
bookInfo
.
setAdviserName
(
adviserConsr
.
getNameById
(
bookInfo
.
getCreatedUser
()));
bookGroupInfo
.
setAdviserId
(
qrcodeSceneDto
.
getCreatedByUserLogin
());
Long
agentId
=
adviserConsr
.
getAgentIdByAdviser
(
bookInfo
.
getCreatedUser
());
BookDto
bookInfo
=
bookBiz
.
getBaseById
(
bookGroupInfo
.
getBookId
());
Map
<
Long
,
String
>
agentNameMap
=
agentConsr
.
getNames
(
Collections
.
singletonList
(
agentId
));
if
(
null
!=
bookInfo
)
{
if
(!
MapUtils
.
isEmpty
(
agentNameMap
)
&&
agentNameMap
.
containsKey
(
agentId
))
{
bookInfo
.
setBookName
(
null
!=
bookInfo
.
getBookName
()
?
StringUtil
.
addBracket
(
bookInfo
.
getBookName
())
:
null
);
bookInfo
.
setAgentName
(
agentNameMap
.
get
(
agentId
));
Map
<
Long
,
AdviserBaseInfoDto
>
adviserInfoDtoMap
=
adviserConsr
.
getAdviserId2AdviserInfoDtoMap
(
Lists
.
newArrayList
(
bookInfo
.
getCreatedUser
()));
if
(
MapUtils
.
isNotEmpty
(
adviserInfoDtoMap
)
&&
adviserInfoDtoMap
.
containsKey
(
bookInfo
.
getCreatedUser
()))
{
AdviserBaseInfoDto
adviserBaseInfoDto
=
adviserInfoDtoMap
.
get
(
bookInfo
.
getCreatedUser
());
if
(
null
!=
adviserBaseInfoDto
)
{
bookInfo
.
setAdviserName
(
adviserBaseInfoDto
.
getPartyName
());
bookGroupInfo
.
setAdviserPhone
(
adviserBaseInfoDto
.
getPhoneNum
());
bookInfo
.
setAgentId
(
adviserBaseInfoDto
.
getAgentId
());
bookInfo
.
setAgentName
(
adviserBaseInfoDto
.
getAgentName
());
bookInfo
.
setTelephone
(
adviserBaseInfoDto
.
getPhoneNum
());
}
}
bookGroupInfo
.
setBookInfo
(
bookInfo
);
}
}
bookGroupInfo
.
setBookInfo
(
bookInfo
);
// 填充标签
}
this
.
setBookGroupLabel
(
Lists
.
newArrayList
(
bookGroupInfo
));
// 填充标签
return
bookGroupInfo
;
this
.
setBookGroupLabel
(
Lists
.
newArrayList
(
bookGroupInfo
));
},
ThreadPoolUtils
.
FILL_APPLET_RECORD
));
}
}
return
bookGroupInfo
;
}
},
ThreadPoolUtils
.
FILL_APPLET_RECORD
));
}
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dto/BookGroupDTO.java
View file @
43c1adcb
...
@@ -9,6 +9,8 @@ import com.pcloud.book.group.entity.BookGroupFriendGuide;
...
@@ -9,6 +9,8 @@ import com.pcloud.book.group.entity.BookGroupFriendGuide;
import
com.pcloud.book.group.entity.BookGroupServe
;
import
com.pcloud.book.group.entity.BookGroupServe
;
import
com.pcloud.common.dto.BaseDto
;
import
com.pcloud.common.dto.BaseDto
;
import
lombok.Data
;
/**
/**
* 社群书群二维码DTO
* 社群书群二维码DTO
* @author PENG
* @author PENG
...
@@ -354,10 +356,20 @@ public class BookGroupDTO extends BaseDto {
...
@@ -354,10 +356,20 @@ public class BookGroupDTO extends BaseDto {
private
Long
adviserId
;
private
Long
adviserId
;
private
String
adviserPhone
;
private
Long
bookAdviserId
;
private
Long
bookAdviserId
;
private
String
appletId
;
private
String
appletId
;
public
String
getAdviserPhone
()
{
return
adviserPhone
;
}
public
void
setAdviserPhone
(
String
adviserPhone
)
{
this
.
adviserPhone
=
adviserPhone
;
}
public
String
getAppletId
()
{
public
String
getAppletId
()
{
return
appletId
;
return
appletId
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment