Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
d0de2145
Commit
d0de2145
authored
Nov 15, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
cb14c891
078f1c53
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
TourGoodBiz.java
...src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
+11
-6
TourGoodMapper.java
...in/java/com/xxfc/platform/tour/mapper/TourGoodMapper.java
+1
-1
TourGoodMapper.xml
...-tour-server/src/main/resources/mapper/TourGoodMapper.xml
+1
-1
No files found.
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
View file @
d0de2145
...
@@ -372,26 +372,31 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
...
@@ -372,26 +372,31 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
if
(
CollectionUtils
.
isEmpty
(
query
.
getTagIds
()))
{
if
(
CollectionUtils
.
isEmpty
(
query
.
getTagIds
()))
{
setQueryTagIds
(
query
);
setQueryTagIds
(
query
);
}
}
List
<
GoodDataVO
>
list
=
mapper
.
getList
(
query
);
List
<
TourGood
>
list
=
mapper
.
getList
(
query
);
return
handleResultList
(
list
,
query
);
return
handleResultList
(
list
,
query
);
}
}
private
List
handleResultList
(
List
<
TourGood
>
list
,
WebsiteQuery
query
)
{
private
List
handleResultList
(
List
<
GoodDataVO
>
list
,
WebsiteQuery
query
)
{
int
size
=
0
;
int
size
=
0
;
if
(
list
!=
null
)
{
if
(
list
!=
null
)
{
size
=
list
.
size
();
size
=
list
.
size
();
}
}
if
(
size
!=
query
.
getLimit
())
{
if
(
size
!=
query
.
getLimit
())
{
List
<
Integer
>
ids
=
list
.
parallelStream
().
map
(
TourGood
:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
ids
=
list
.
parallelStream
().
map
(
GoodDataVO
:
:
getId
).
collect
(
Collectors
.
toList
());
Example
example
=
new
Example
(
TourGood
.
class
);
Example
example
=
new
Example
(
TourGood
.
class
);
example
.
createCriteria
().
andNotIn
(
"id"
,
ids
).
andEqualTo
(
"status"
,
1
).
andEqualTo
(
"isDel"
,
0
);
example
.
createCriteria
().
andNotIn
(
"id"
,
ids
).
andEqualTo
(
"status"
,
1
).
andEqualTo
(
"isDel"
,
0
);
example
.
orderBy
(
"rank"
).
asc
().
orderBy
(
"crtTime"
).
desc
();
example
.
orderBy
(
"rank"
).
asc
().
orderBy
(
"crtTime"
).
desc
();
PageHelper
.
startPage
(
1
,
query
.
getLimit
()-
size
);
PageHelper
.
startPage
(
1
,
query
.
getLimit
()-
size
);
List
<
TourGood
>
tourGoods
=
mapper
.
selectByExample
(
example
);
List
<
TourGood
>
tourGoods
=
mapper
.
selectByExample
(
example
);
list
.
addAll
(
tourGoods
);
for
(
TourGood
tourGood
:
tourGoods
)
{
GoodDataVO
goodDataVO
=
new
GoodDataVO
();
goodDataVO
.
setId
(
tourGood
.
getId
());
goodDataVO
.
setName
(
tourGood
.
getName
());
goodDataVO
.
setImgUrl
(
tourGood
.
getCover
());
goodDataVO
.
setPrice
(
tourGood
.
getPrice
().
toString
());
list
.
add
(
goodDataVO
);
}
}
}
return
list
;
return
list
;
}
}
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/mapper/TourGoodMapper.java
View file @
d0de2145
...
@@ -38,7 +38,7 @@ public interface TourGoodMapper extends Mapper<TourGood> {
...
@@ -38,7 +38,7 @@ public interface TourGoodMapper extends Mapper<TourGood> {
*/
*/
List
<
GoodDataVO
>
findAllByHome
(
@Param
(
"start"
)
Integer
start
,
@Param
(
"size"
)
Integer
size
);
List
<
GoodDataVO
>
findAllByHome
(
@Param
(
"start"
)
Integer
start
,
@Param
(
"size"
)
Integer
size
);
List
<
TourGood
>
getList
(
WebsiteQuery
query
);
List
<
GoodDataVO
>
getList
(
WebsiteQuery
query
);
List
newTour
(
Integer
limit
);
List
newTour
(
Integer
limit
);
}
}
xx-tour/xx-tour-server/src/main/resources/mapper/TourGoodMapper.xml
View file @
d0de2145
...
@@ -123,7 +123,7 @@
...
@@ -123,7 +123,7 @@
ORDER BY g.rank DESC ,g.id DESC
ORDER BY g.rank DESC ,g.id DESC
</select>
</select>
<select
id=
"getList"
resultType=
"com.
xxfc.platform.tour.entity.TourGood
"
>
<select
id=
"getList"
resultType=
"com.
github.wxiaoqi.security.common.vo.GoodDataVO
"
>
SELECT
SELECT
g.id AS `id`,
g.id AS `id`,
g. NAME AS `name`,
g. NAME AS `name`,
...
...
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