Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
c84bbb49
Commit
c84bbb49
authored
Sep 13, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成交详情
parent
977cc5d7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
ch-core/src/main/java/com/wwdz/ch/core/type/PageSearchResult.java
...src/main/java/com/wwdz/ch/core/type/PageSearchResult.java
+4
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/QueryPriceServiceImpl.java
.../main/java/com/wwdz/ch/wx/impl/QueryPriceServiceImpl.java
+7
-3
No files found.
ch-core/src/main/java/com/wwdz/ch/core/type/PageSearchResult.java
View file @
c84bbb49
...
...
@@ -19,12 +19,15 @@ public class PageSearchResult<T> implements Entity {
private
Object
appendObject
;
private
Boolean
isHasNextPage
;
public
PageSearchResult
(){};
private
PageSearchResult
(
PageInfo
<
T
>
pageInfo
)
{
this
.
total
=
pageInfo
.
getTotal
();
this
.
pageSize
=
pageInfo
.
getPageSize
();
this
.
pageIndex
=
pageInfo
.
getPageNum
();
this
.
isHasNextPage
=
pageInfo
.
isHasNextPage
();
this
.
dataList
=
pageInfo
.
getList
();
}
...
...
@@ -33,6 +36,7 @@ public class PageSearchResult<T> implements Entity {
this
.
total
=
pageInfo
.
getTotal
();
this
.
pageSize
=
pageInfo
.
getPageSize
();
this
.
pageIndex
=
pageInfo
.
getPageNum
();
this
.
isHasNextPage
=
pageInfo
.
isHasNextPage
();
this
.
dataList
=
list
;
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemDaoImpl.java
View file @
c84bbb49
...
...
@@ -78,7 +78,7 @@ public class ItemDaoImpl implements ItemDao {
ItemExample
example
=
new
ItemExample
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
StringUtils
.
hasLength
(
coinRequestDto
.
getSortColumn
()))
{
example
.
setOrderByClause
(
coinRequestDto
.
getSortColumn
()
+
"
asc"
);
example
.
setOrderByClause
(
coinRequestDto
.
getSortColumn
()
+
"
"
+
coinRequestDto
.
getOrder
()
);
}
else
{
example
.
setOrderByClause
(
"create_time asc"
);
}
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/QueryPriceServiceImpl.java
View file @
c84bbb49
...
...
@@ -18,6 +18,7 @@ import com.wwdz.ch.wx.entity.request.QueryPriceRequestDto;
import
com.wwdz.ch.wx.entity.vo.BidRecordVo
;
import
com.wwdz.ch.wx.entity.vo.CategoryVo
;
import
com.wwdz.ch.wx.service.QueryPriceService
;
import
com.wwdz.ch.wx.util.StringUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -109,7 +110,10 @@ public class QueryPriceServiceImpl implements QueryPriceService {
List
<
Item
>
itemList
=
itemDao
.
findListByPage
(
dto
);
PageInfo
pageInfo
=
PageInfo
.
of
(
itemList
);
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
itemList
.
stream
().
forEach
(
i
->
{
for
(
Item
i
:
itemList
)
{
if
(
i
.
getPrice
()
==
0
)
{
continue
;
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtils
.
isEmpty
(
i
.
getVideos
())){
map
.
put
(
"hasVideo"
,
false
);
...
...
@@ -118,7 +122,7 @@ public class QueryPriceServiceImpl implements QueryPriceService {
}
map
.
put
(
"id"
,
i
.
getId
());
map
.
put
(
"bidTime"
,
i
.
getBidTime
());
map
.
put
(
"price"
,
Math
.
round
(
i
.
getPrice
()
/
(
double
)
100
));
map
.
put
(
"price"
,
StringUtil
.
formatAmount
(
String
.
valueOf
(
Math
.
round
(
i
.
getPrice
()
/
(
double
)
100
))
));
map
.
put
(
"platform"
,
"电商平台"
);
map
.
put
(
"detail"
,
i
.
getDetail
());
if
(
StringUtils
.
hasLength
(
i
.
getTopImage
()))
{
...
...
@@ -127,7 +131,7 @@ public class QueryPriceServiceImpl implements QueryPriceService {
map
.
put
(
"image"
,
StringUtils
.
isEmpty
(
i
.
getImages
())?
""
:
i
.
getImages
().
split
(
";"
)[
0
]);
}
mapList
.
add
(
map
);
}
);
}
return
Result
.
success
(
PageSearchResult
.
of
(
pageInfo
,
mapList
));
}
catch
(
Exception
e
)
{
logger
.
info
(
"成交记录查询失败:{}"
,
e
);
...
...
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