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
0c80f1c7
Commit
0c80f1c7
authored
Dec 30, 2020
by
李传峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename to fix ibatis TypeException
parent
9de16684
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
19 deletions
+18
-19
BookElasticSearchBizImpl.java
...m/pcloud/book/book/biz/impl/BookElasticSearchBizImpl.java
+8
-8
BookElasticSearchConsr.java
...k/consumer/book/elasticsearch/BookElasticSearchConsr.java
+3
-4
Converter.java
.../src/main/java/com/pcloud/book/util/common/Converter.java
+5
-5
PlatformBookSearchFacadeTest.java
...va/com.pcloud.book.test/PlatformBookSearchFacadeTest.java
+2
-2
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookElasticSearchBizImpl.java
View file @
0c80f1c7
...
@@ -7,8 +7,8 @@ import com.pcloud.book.book.dto.BookFundDto;
...
@@ -7,8 +7,8 @@ import com.pcloud.book.book.dto.BookFundDto;
import
com.pcloud.book.book.dto.BookTypeDto
;
import
com.pcloud.book.book.dto.BookTypeDto
;
import
com.pcloud.book.consumer.book.elasticsearch.BookElasticSearchConsr
;
import
com.pcloud.book.consumer.book.elasticsearch.BookElasticSearchConsr
;
import
com.pcloud.book.consumer.user.PartyConsr
;
import
com.pcloud.book.consumer.user.PartyConsr
;
import
com.pcloud.book.elasticsearch7.entity.EsBook
;
import
com.pcloud.book.elasticsearch7.entity.Es
7
Book
;
import
com.pcloud.book.elasticsearch7.entity.EsBookFreeze
;
import
com.pcloud.book.elasticsearch7.entity.Es
7
BookFreeze
;
import
com.pcloud.book.elasticsearch7.search.domain.dto.param.PlatformSearchDto
;
import
com.pcloud.book.elasticsearch7.search.domain.dto.param.PlatformSearchDto
;
import
com.pcloud.book.util.common.Converter
;
import
com.pcloud.book.util.common.Converter
;
import
com.pcloud.common.core.constant.SystemCode
;
import
com.pcloud.common.core.constant.SystemCode
;
...
@@ -37,7 +37,7 @@ public class BookElasticSearchBizImpl {
...
@@ -37,7 +37,7 @@ public class BookElasticSearchBizImpl {
public
PageBeanNew
<
BookDto
>
getListPage
(
PlatformSearchDto
dto
)
throws
BizException
{
public
PageBeanNew
<
BookDto
>
getListPage
(
PlatformSearchDto
dto
)
throws
BizException
{
Pagination
<
EsBook
>
esResult
=
bookElasticSearchConsr
.
search
(
dto
);
Pagination
<
Es
7
Book
>
esResult
=
bookElasticSearchConsr
.
search
(
dto
);
List
<
BookDto
>
bookList
=
new
ArrayList
<>();
List
<
BookDto
>
bookList
=
new
ArrayList
<>();
...
@@ -57,13 +57,13 @@ public class BookElasticSearchBizImpl {
...
@@ -57,13 +57,13 @@ public class BookElasticSearchBizImpl {
return
result
;
return
result
;
}
}
private
BookDto
doBookProcess
(
EsBook
esBook
,
Map
<
Long
,
String
>
pcloudUserMap
,
Map
<
String
,
BookTypeDto
>
typeCodeMap
)
{
private
BookDto
doBookProcess
(
Es
7
Book
esBook
,
Map
<
Long
,
String
>
pcloudUserMap
,
Map
<
String
,
BookTypeDto
>
typeCodeMap
)
{
BookDto
bookDto
=
Converter
.
convert
(
esBook
);
BookDto
bookDto
=
Converter
.
convert
(
esBook
);
Integer
freezeStatus
=
BookFreezeEnum
.
WAIT_FREEZE
.
value
;
Integer
freezeStatus
=
BookFreezeEnum
.
WAIT_FREEZE
.
value
;
boolean
isFundSupport
=
false
;
boolean
isFundSupport
=
false
;
EsBookFreeze
bf
=
findOneByOrderFreezetime
(
esBook
.
getBookFreezeList
());
Es
7
BookFreeze
bf
=
findOneByOrderFreezetime
(
esBook
.
getBookFreezeList
());
String
transferor
=
bf
==
null
?
null
:
bf
.
getTransferor
();
String
transferor
=
bf
==
null
?
null
:
bf
.
getTransferor
();
if
(
CollectionUtils
.
isNotEmpty
(
bookDto
.
getBookFunds
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
bookDto
.
getBookFunds
()))
{
...
@@ -105,17 +105,17 @@ public class BookElasticSearchBizImpl {
...
@@ -105,17 +105,17 @@ public class BookElasticSearchBizImpl {
return
bookDto
;
return
bookDto
;
}
}
private
Es
BookFreeze
findOneByOrderFreezetime
(
List
<
Es
BookFreeze
>
fs
)
{
private
Es
7BookFreeze
findOneByOrderFreezetime
(
List
<
Es7
BookFreeze
>
fs
)
{
if
(
CollectionUtils
.
isEmpty
(
fs
))
{
if
(
CollectionUtils
.
isEmpty
(
fs
))
{
return
null
;
return
null
;
}
}
fs
.
sort
(
Comparator
.
comparing
(
EsBookFreeze:
:
getFreezetime
).
reversed
());
fs
.
sort
(
Comparator
.
comparing
(
Es
7
BookFreeze:
:
getFreezetime
).
reversed
());
return
fs
.
get
(
0
);
return
fs
.
get
(
0
);
}
}
private
Es
BookFreeze
findFreezedRecord
(
List
<
Es
BookFreeze
>
fs
)
{
private
Es
7BookFreeze
findFreezedRecord
(
List
<
Es7
BookFreeze
>
fs
)
{
if
(
CollectionUtils
.
isEmpty
(
fs
))
{
if
(
CollectionUtils
.
isEmpty
(
fs
))
{
return
null
;
return
null
;
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/consumer/book/elasticsearch/BookElasticSearchConsr.java
View file @
0c80f1c7
package
com
.
pcloud
.
book
.
consumer
.
book
.
elasticsearch
;
package
com
.
pcloud
.
book
.
consumer
.
book
.
elasticsearch
;
import
com.pcloud.book.consumer.reader.ReaderConsr
;
import
com.pcloud.book.elasticsearch7.entity.Es7Book
;
import
com.pcloud.book.elasticsearch7.entity.EsBook
;
import
com.pcloud.book.elasticsearch7.search.domain.dto.param.PlatformSearchDto
;
import
com.pcloud.book.elasticsearch7.search.domain.dto.param.PlatformSearchDto
;
import
com.pcloud.book.elasticsearch7.search.facade.PlatformBookSearchFacade
;
import
com.pcloud.book.elasticsearch7.search.facade.PlatformBookSearchFacade
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
...
@@ -25,9 +24,9 @@ public class BookElasticSearchConsr {
...
@@ -25,9 +24,9 @@ public class BookElasticSearchConsr {
@Autowired
@Autowired
private
PlatformBookSearchFacade
platformBookSearchFacade
;
private
PlatformBookSearchFacade
platformBookSearchFacade
;
public
Pagination
<
EsBook
>
search
(
PlatformSearchDto
dto
)
{
public
Pagination
<
Es
7
Book
>
search
(
PlatformSearchDto
dto
)
{
try
{
try
{
ResponseDto
<
Pagination
<
EsBook
>>
r
=
platformBookSearchFacade
.
search
(
dto
);
ResponseDto
<
Pagination
<
Es
7
Book
>>
r
=
platformBookSearchFacade
.
search
(
dto
);
return
r
.
getData
();
return
r
.
getData
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"platform book es search exception."
,
e
);
logger
.
error
(
"platform book es search exception."
,
e
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/util/common/Converter.java
View file @
0c80f1c7
...
@@ -2,8 +2,8 @@ package com.pcloud.book.util.common;
...
@@ -2,8 +2,8 @@ package com.pcloud.book.util.common;
import
com.pcloud.book.book.dto.BookDto
;
import
com.pcloud.book.book.dto.BookDto
;
import
com.pcloud.book.book.dto.BookFundDto
;
import
com.pcloud.book.book.dto.BookFundDto
;
import
com.pcloud.book.elasticsearch7.entity.EsBook
;
import
com.pcloud.book.elasticsearch7.entity.Es
7
Book
;
import
com.pcloud.book.elasticsearch7.entity.EsBookFund
;
import
com.pcloud.book.elasticsearch7.entity.Es
7
BookFund
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.cglib.beans.BeanCopier
;
...
@@ -15,10 +15,10 @@ public class Converter {
...
@@ -15,10 +15,10 @@ public class Converter {
private
Converter
()
{}
private
Converter
()
{}
private
static
final
BeanCopier
BOOK_COPIER
=
BeanCopier
.
create
(
EsBook
.
class
,
BookDto
.
class
,
false
);
private
static
final
BeanCopier
BOOK_COPIER
=
BeanCopier
.
create
(
Es
7
Book
.
class
,
BookDto
.
class
,
false
);
private
static
final
BeanCopier
FUND_COPIER
=
BeanCopier
.
create
(
EsBookFund
.
class
,
BookFundDto
.
class
,
false
);
private
static
final
BeanCopier
FUND_COPIER
=
BeanCopier
.
create
(
Es
7
BookFund
.
class
,
BookFundDto
.
class
,
false
);
public
static
BookDto
convert
(
EsBook
book
)
{
public
static
BookDto
convert
(
Es
7
Book
book
)
{
if
(
book
==
null
)
{
if
(
book
==
null
)
{
return
null
;
return
null
;
}
}
...
...
pcloud-service-book/src/test/java/com.pcloud.book.test/PlatformBookSearchFacadeTest.java
View file @
0c80f1c7
...
@@ -2,7 +2,7 @@ package com.pcloud.book.test;
...
@@ -2,7 +2,7 @@ package com.pcloud.book.test;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.pcloud.book.BookApplication
;
import
com.pcloud.book.BookApplication
;
import
com.pcloud.book.elasticsearch7.entity.EsBook
;
import
com.pcloud.book.elasticsearch7.entity.Es
7
Book
;
import
com.pcloud.book.elasticsearch7.search.domain.dto.param.PlatformSearchDto
;
import
com.pcloud.book.elasticsearch7.search.domain.dto.param.PlatformSearchDto
;
import
com.pcloud.book.elasticsearch7.search.facade.PlatformBookSearchFacade
;
import
com.pcloud.book.elasticsearch7.search.facade.PlatformBookSearchFacade
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
...
@@ -27,7 +27,7 @@ public class PlatformBookSearchFacadeTest {
...
@@ -27,7 +27,7 @@ public class PlatformBookSearchFacadeTest {
PlatformSearchDto
dto
=
new
PlatformSearchDto
();
PlatformSearchDto
dto
=
new
PlatformSearchDto
();
dto
.
setFundName
(
" 上海基金"
);
dto
.
setFundName
(
" 上海基金"
);
ResponseDto
<
Pagination
<
EsBook
>>
r
=
platformBookSearchFacade
.
search
(
dto
);
ResponseDto
<
Pagination
<
Es
7
Book
>>
r
=
platformBookSearchFacade
.
search
(
dto
);
log
.
info
(
JSON
.
toJSONString
(
r
));
log
.
info
(
JSON
.
toJSONString
(
r
));
}
}
...
...
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