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
18495903
Commit
18495903
authored
Jul 09, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
daa29c2d
88375563
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
VehicleModelBiz.java
...n/java/com/xxfc/platform/vehicle/biz/VehicleModelBiz.java
+15
-6
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelBiz.java
View file @
18495903
...
...
@@ -10,6 +10,7 @@ import com.xxfc.platform.vehicle.entity.Vehicle;
import
com.xxfc.platform.vehicle.pojo.VehicleModelQueryCondition
;
import
com.xxfc.platform.vehicle.pojo.VehicleModelVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
...
...
@@ -20,6 +21,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -100,7 +102,8 @@ public class VehicleModelBiz extends BaseBiz<VehicleModelMapper, VehicleModel> {
* @return
*/
public
List
<
GoodDataVO
>
goodList
(
Integer
page
,
Integer
limit
)
{
List
<
GoodDataVO
>
goodDataVOS
=
Arrays
.
asList
();
List
<
GoodDataVO
>
goodDataVOS
=
new
ArrayList
<>();
/*设置分页*/
Page
<
VehicleModel
>
pages
=
PageHelper
.
startPage
(
page
,
limit
);
...
...
@@ -110,20 +113,26 @@ public class VehicleModelBiz extends BaseBiz<VehicleModelMapper, VehicleModel> {
.
andEqualTo
(
VehicleModel:
:
getIsdel
,
0
)
.
andEqualTo
(
VehicleModel:
:
getHotSign
,
1
)
).
orderByDesc
(
"id"
).
build
();
selectByExample
(
example
);
List
<
VehicleModel
>
vehicleModels
=
selectByExample
(
example
);
if
(
CollectionUtils
.
isEmpty
(
vehicleModels
))
{
return
null
;
}
PageInfo
<
VehicleModel
>
pageInfo
=
PageInfo
.
of
(
pages
.
getResult
()
);
PageInfo
<
VehicleModel
>
pageInfo
=
PageInfo
.
of
(
vehicleModels
);
List
<
VehicleModel
>
vehicleModelList
=
pageInfo
.
getList
();
/*遍历车型列表设置List<GoodDataVO>*/
for
(
VehicleModel
vm
:
vehicleModelList
)
{
vehicleModelList
.
forEach
(
vm
->
{
GoodDataVO
goodDataVO
=
new
GoodDataVO
();
goodDataVO
.
setId
(
vm
.
getId
());
goodDataVO
.
setImgUrl
(
vm
.
getPicture
());
goodDataVO
.
setName
(
vm
.
getName
());
goodDataVO
.
setName1
(
vm
.
getKeyword
());
goodDataVO
.
setPrice
(
String
.
valueOf
(
vm
.
getBuyPrice
()));
goodDataVOS
.
add
(
goodDataVO
);
}
System
.
out
.
println
(
"++++++++++++++++++++++++++++++++++++++"
+
goodDataVO
+
"++++++++++++++++++++++++++++++++++++++"
);
goodDataVOS
.
add
(
goodDataVO
);});
// for (VehicleModel vm : vehicleModelList) {
//
// }
return
goodDataVOS
;
}
}
\ No newline at end of file
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