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
4bf4472e
Commit
4bf4472e
authored
Jul 08, 2021
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'erpIn' into 'master'
feat:[none]ERP优化接口 See merge request rays/pcloud-book!1359
parents
11f24611
3b52b6a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
29 deletions
+3
-29
BookAdviserBizImpl.java
...ava/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
+2
-26
BookAdviser.Mapper.xml
...ook/src/main/resources/mapper/book/BookAdviser.Mapper.xml
+1
-3
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookAdviserBizImpl.java
View file @
4bf4472e
...
@@ -1028,22 +1028,18 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -1028,22 +1028,18 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
@ParamLog
(
"获取编辑书刊列表(ERP项目用)"
)
@ParamLog
(
"获取编辑书刊列表(ERP项目用)"
)
public
PageBeanNew
<
ErpAdviserBookVO
>
listAdviserBook4Erp
(
String
isbn
,
String
uniqueNumber
,
String
adviserName
,
Long
agentId
,
Integer
currentPage
,
Integer
numPerPage
)
{
public
PageBeanNew
<
ErpAdviserBookVO
>
listAdviserBook4Erp
(
String
isbn
,
String
uniqueNumber
,
String
adviserName
,
Long
agentId
,
Integer
currentPage
,
Integer
numPerPage
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
List
<
String
>
listName
=
new
ArrayList
<>();
if
(!
StringUtil
.
isEmpty
(
isbn
)){
if
(!
StringUtil
.
isEmpty
(
isbn
)){
String
[]
nameList
=
isbn
.
trim
().
split
(
"[\u00A0|\u3000|\u0020]"
);
String
[]
nameList
=
isbn
.
trim
().
split
(
"[\u00A0|\u3000|\u0020]"
);
listName
=
Lists
.
newArrayList
(
nameList
);
paramMap
.
put
(
"nameList"
,
Lists
.
newArrayList
(
nameList
));
paramMap
.
put
(
"nameList"
,
Lists
.
newArrayList
(
nameList
));
}
}
paramMap
.
put
(
"isbn"
,
isbn
);
paramMap
.
put
(
"isbn"
,
isbn
);
paramMap
.
put
(
"uniqueNumber"
,
uniqueNumber
);
paramMap
.
put
(
"uniqueNumber"
,
uniqueNumber
);
List
<
Long
>
adviserIdList
=
new
ArrayList
<>();
if
(!
StringUtil
.
isEmpty
(
adviserName
))
{
if
(!
StringUtil
.
isEmpty
(
adviserName
))
{
List
<
Long
>
adviserIds
=
adviserConsr
.
getAdviserIdsByName
(
adviserName
);
List
<
Long
>
adviserIds
=
adviserConsr
.
getAdviserIdsByName
(
adviserName
);
if
(
CollectionUtils
.
isEmpty
(
adviserIds
))
{
if
(
CollectionUtils
.
isEmpty
(
adviserIds
))
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
new
ArrayList
<>());
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
new
ArrayList
<>());
}
}
paramMap
.
put
(
"adviserIds"
,
adviserIds
);
paramMap
.
put
(
"adviserIds"
,
adviserIds
);
adviserIdList
=
adviserIds
;
}
}
if
(
agentId
!=
null
&&
agentId
>
0
){
if
(
agentId
!=
null
&&
agentId
>
0
){
...
@@ -1054,22 +1050,12 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -1054,22 +1050,12 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
if
(
paramMap
.
containsKey
(
"adviserIds"
)){
if
(
paramMap
.
containsKey
(
"adviserIds"
)){
List
<
Long
>
adviserIds
=
(
List
<
Long
>)
paramMap
.
get
(
"adviserIds"
);
List
<
Long
>
adviserIds
=
(
List
<
Long
>)
paramMap
.
get
(
"adviserIds"
);
adviserIds
.
retainAll
(
allAdvisers4Agent
);
adviserIds
.
retainAll
(
allAdvisers4Agent
);
adviserIdList
=
adviserIds
;
}
else
{
}
else
{
paramMap
.
put
(
"adviserIds"
,
allAdvisers4Agent
);
paramMap
.
put
(
"adviserIds"
,
allAdvisers4Agent
);
adviserIdList
=
allAdvisers4Agent
;
}
}
}
}
PageBeanNew
<
ErpAdviserBookVO
>
pageBeanNew
=
bookAdviserDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"listAdviserBook4Erp"
);
PageBeanNew
<
ErpAdviserBookVO
>
pageBeanNew
=
bookAdviserDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"listAdviserBook4Erp"
);
// Page<ESBookAndAdviser> page= esBookAndAdviserBiz.getESBooks4Erp(isbn,uniqueNumber, listName,adviserIdList,currentPage,numPerPage);
/*if(null==page){
return new PageBeanNew<>(currentPage, numPerPage,0, new ArrayList<>());
}
if(CollUtil.isEmpty(page.getContent())){
return new PageBeanNew<>(currentPage, numPerPage,Long.valueOf(page.getTotalElements()).intValue(), new ArrayList<>());
}
List<ESBookAndAdviser> esBookAndAdvisers = page.getContent();
List<ErpAdviserBookVO> bookVOS = changeToErpBookVO(esBookAndAdvisers);*/
if
(
null
==
pageBeanNew
||
CollUtil
.
isEmpty
(
pageBeanNew
.
getRecordList
())){
if
(
null
==
pageBeanNew
||
CollUtil
.
isEmpty
(
pageBeanNew
.
getRecordList
())){
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
null
==
pageBeanNew
?
0
:
pageBeanNew
.
getTotalCount
(),
new
ArrayList
<>());
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
null
==
pageBeanNew
?
0
:
pageBeanNew
.
getTotalCount
(),
new
ArrayList
<>());
}
}
...
@@ -1090,7 +1076,6 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -1090,7 +1076,6 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
Map
<
Long
,
UserLogin
>
userLoginInfoMap
=
new
HashMap
<>();
Map
<
Long
,
UserLogin
>
userLoginInfoMap
=
new
HashMap
<>();
Map
<
Long
,
AdviserBaseInfoDto
>
adviserAgentMap
=
new
HashMap
<>();
Map
<
Long
,
AdviserBaseInfoDto
>
adviserAgentMap
=
new
HashMap
<>();
Map
<
Long
,
String
>
channelNameMap
=
new
HashMap
<>();
Map
<
Long
,
String
>
channelNameMap
=
new
HashMap
<>();
Map
<
Long
,
BookDto
>
bookDtoMapMap
=
new
HashMap
<>();
CompletableFuture
<
Map
<
Long
,
UserLogin
>>
userLoginInfoMapFuture
=
CompletableFuture
.
supplyAsync
(()->{
CompletableFuture
<
Map
<
Long
,
UserLogin
>>
userLoginInfoMapFuture
=
CompletableFuture
.
supplyAsync
(()->{
return
adviserConsr
.
getUserLoginInfoList
(
adviserIds
);
return
adviserConsr
.
getUserLoginInfoList
(
adviserIds
);
},
ThreadPoolUtils
.
OTHER_THREAD_POOL
);
},
ThreadPoolUtils
.
OTHER_THREAD_POOL
);
...
@@ -1100,15 +1085,11 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -1100,15 +1085,11 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
CompletableFuture
<
Map
<
Long
,
String
>>
channelNameMapFuture
=
CompletableFuture
.
supplyAsync
(()->{
CompletableFuture
<
Map
<
Long
,
String
>>
channelNameMapFuture
=
CompletableFuture
.
supplyAsync
(()->{
return
channelConsr
.
getNamesByIdList
(
channelIds
);
return
channelConsr
.
getNamesByIdList
(
channelIds
);
},
ThreadPoolUtils
.
OTHER_THREAD_POOL
);
},
ThreadPoolUtils
.
OTHER_THREAD_POOL
);
CompletableFuture
<
Map
<
Long
,
BookDto
>>
bookDtoMapFuture
=
CompletableFuture
.
supplyAsync
(()->{
CompletableFuture
.
allOf
(
userLoginInfoMapFuture
,
adviserAgentMapFuture
,
channelNameMapFuture
);
return
bookBiz
.
listBaseByIds
(
bookIds
);
},
ThreadPoolUtils
.
OTHER_THREAD_POOL
);
CompletableFuture
.
allOf
(
userLoginInfoMapFuture
,
adviserAgentMapFuture
,
channelNameMapFuture
,
bookDtoMapFuture
);
try
{
try
{
userLoginInfoMap
=
userLoginInfoMapFuture
.
get
(
10
,
TimeUnit
.
SECONDS
);
userLoginInfoMap
=
userLoginInfoMapFuture
.
get
(
10
,
TimeUnit
.
SECONDS
);
adviserAgentMap
=
adviserAgentMapFuture
.
get
(
10
,
TimeUnit
.
SECONDS
);
adviserAgentMap
=
adviserAgentMapFuture
.
get
(
10
,
TimeUnit
.
SECONDS
);
channelNameMap
=
channelNameMapFuture
.
get
(
10
,
TimeUnit
.
SECONDS
);
channelNameMap
=
channelNameMapFuture
.
get
(
10
,
TimeUnit
.
SECONDS
);
bookDtoMapMap
=
bookDtoMapFuture
.
get
(
10
,
TimeUnit
.
SECONDS
);
}
catch
(
InterruptedException
|
TimeoutException
|
ExecutionException
e
)
{
}
catch
(
InterruptedException
|
TimeoutException
|
ExecutionException
e
)
{
LOGGER
.
error
(
"[exportMonthReport] 并行导出word失败! err:{}"
,
e
.
getMessage
(),
e
);
LOGGER
.
error
(
"[exportMonthReport] 并行导出word失败! err:{}"
,
e
.
getMessage
(),
e
);
}
}
...
@@ -1129,17 +1110,12 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
...
@@ -1129,17 +1110,12 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
if
(
bookVO
.
getChannelId
()
!=
null
&&
MapUtils
.
isNotEmpty
(
channelNameMap
)
&&
channelNameMap
.
containsKey
(
bookVO
.
getChannelId
()))
{
if
(
bookVO
.
getChannelId
()
!=
null
&&
MapUtils
.
isNotEmpty
(
channelNameMap
)
&&
channelNameMap
.
containsKey
(
bookVO
.
getChannelId
()))
{
bookVO
.
setChannelName
(
channelNameMap
.
get
(
bookVO
.
getChannelId
()));
bookVO
.
setChannelName
(
channelNameMap
.
get
(
bookVO
.
getChannelId
()));
}
}
if
(
bookVO
.
getBookId
()
!=
null
&&
MapUtils
.
isNotEmpty
(
bookDtoMapMap
)
&&
bookDtoMapMap
.
containsKey
(
bookVO
.
getBookId
()))
{
BookDto
bookDto
=
bookDtoMapMap
.
get
(
bookVO
.
getBookId
());
bookVO
.
setCoverImg
(
Optional
.
ofNullable
(
bookDto
).
map
(
a
->
a
.
getCoverImg
()).
orElse
(
null
));
}
bookVO
.
setIsFundSupport
(
false
);
bookVO
.
setIsFundSupport
(
false
);
if
(!
ListUtils
.
isEmpty
(
list
)
&&
list
.
contains
(
bookVO
.
getBookId
()))
{
if
(!
ListUtils
.
isEmpty
(
list
)
&&
list
.
contains
(
bookVO
.
getBookId
()))
{
bookVO
.
setIsFundSupport
(
true
);
bookVO
.
setIsFundSupport
(
true
);
}
}
}
}
}
}
//return new PageBeanNew<>(currentPage, numPerPage, (int) page.getTotalElements(), bookVOS);
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
pageBeanNew
.
getTotalCount
(),
bookVOS
);
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
pageBeanNew
.
getTotalCount
(),
bookVOS
);
}
}
...
...
pcloud-service-book/src/main/resources/mapper/book/BookAdviser.Mapper.xml
View file @
4bf4472e
...
@@ -632,7 +632,7 @@
...
@@ -632,7 +632,7 @@
)
)
</if>
</if>
<if
test=
"uniqueNumber != null"
>
<if
test=
"uniqueNumber != null"
>
AND
CONCAT('BK', ba.BOOK_ID) LIKE CONCAT('%', #{uniqueNumber}, '%'
)
AND
ba.BOOK_ID= REPLACE(#{uniqueNumber},"BK",""
)
</if>
</if>
<if
test=
"adviserIds != null and adviserIds.size() > 0"
>
<if
test=
"adviserIds != null and adviserIds.size() > 0"
>
AND ba.ADVISER_ID IN
AND ba.ADVISER_ID IN
...
@@ -640,8 +640,6 @@
...
@@ -640,8 +640,6 @@
${item}
${item}
</foreach>
</foreach>
</if>
</if>
GROUP BY
ba.BOOK_ADVISER_ID
ORDER BY
ORDER BY
ba.CREATED_DATE DESC
ba.CREATED_DATE DESC
</select>
</select>
...
...
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