Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yichengstreet-be
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
yichengstreet
yichengstreet-be
Commits
152c8047
Commit
152c8047
authored
Mar 13, 2025
by
lixuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'main'
Dev See merge request
!129
parents
446465ea
3200b113
Pipeline
#143247
passed with stages
in 5 minutes and 40 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
27 deletions
+46
-27
HouseResourceController.java
...m/ruoyi/web/controller/house/HouseResourceController.java
+2
-2
HouseResourceProfileGraph.java
...oyi/system/domain/house/vo/HouseResourceProfileGraph.java
+15
-0
HouseResourceMapper.java
...va/com/ruoyi/system/mapper/house/HouseResourceMapper.java
+1
-1
HouseResourceService.java
.../com/ruoyi/system/service/house/HouseResourceService.java
+2
-5
HouseResourceServiceImpl.java
...i/system/service/house/impl/HouseResourceServiceImpl.java
+13
-3
HouseResourceMapper.xml
...m/src/main/resources/mapper/house/HouseResourceMapper.xml
+13
-16
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/house/HouseResourceController.java
View file @
152c8047
...
...
@@ -54,7 +54,7 @@ public class HouseResourceController {
}
@GetMapping
(
"/list"
)
public
AjaxResult
get
List
HouseResources
(
HouseResourcePageQuery
query
)
{
return
AjaxResult
.
success
(
houseResourceService
.
list
HouseResources
(
query
));
public
AjaxResult
get
ProfileGraph
HouseResources
(
HouseResourcePageQuery
query
)
{
return
AjaxResult
.
success
(
houseResourceService
.
profileGraph
HouseResources
(
query
));
}
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/house/vo/HouseResourceProfileGraph.java
0 → 100644
View file @
152c8047
package
com
.
ruoyi
.
system
.
domain
.
house
.
vo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
HouseResourceProfileGraph
{
private
String
id
;
private
String
wgName
;
private
List
<
HouseResourcePage
>
houseResources
;
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/house/HouseResourceMapper.java
View file @
152c8047
...
...
@@ -22,5 +22,5 @@ public interface HouseResourceMapper {
IPage
<
HouseResourcePage
>
selectPage
(
IPage
<
HouseResource
>
page
,
@Param
(
"query"
)
HouseResourcePageQuery
houseResourcePageQuery
);
List
<
HouseResourcePage
>
select
List
(
@Param
(
"query"
)
HouseResourcePageQuery
houseResourcePageQuery
);
List
<
HouseResourcePage
>
select
ProfileGraph
(
@Param
(
"query"
)
HouseResourcePageQuery
houseResourcePageQuery
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/house/HouseResourceService.java
View file @
152c8047
...
...
@@ -2,10 +2,7 @@ package com.ruoyi.system.service.house;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.ruoyi.system.domain.house.HouseResource
;
import
com.ruoyi.system.domain.house.vo.HouseResourceDetail
;
import
com.ruoyi.system.domain.house.vo.HouseResourcePage
;
import
com.ruoyi.system.domain.house.vo.HouseResourcePageQuery
;
import
com.ruoyi.system.domain.house.vo.HouseResourceSaveUpdateDto
;
import
com.ruoyi.system.domain.house.vo.*
;
import
java.util.List
;
...
...
@@ -23,5 +20,5 @@ public interface HouseResourceService {
IPage
<
HouseResourcePage
>
pageHouseResources
(
HouseResourcePageQuery
query
);
List
<
HouseResourceP
age
>
list
HouseResources
(
HouseResourcePageQuery
query
);
List
<
HouseResourceP
rofileGraph
>
profileGraph
HouseResources
(
HouseResourcePageQuery
query
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/house/impl/HouseResourceServiceImpl.java
View file @
152c8047
...
...
@@ -156,9 +156,19 @@ public class HouseResourceServiceImpl implements HouseResourceService {
}
@Override
public
List
<
HouseResourcePage
>
listHouseResources
(
HouseResourcePageQuery
query
)
{
List
<
HouseResourcePage
>
list
=
houseResourceMapper
.
selectList
(
query
);
return
handleHouseList
(
list
);
public
List
<
HouseResourceProfileGraph
>
profileGraphHouseResources
(
HouseResourcePageQuery
query
)
{
List
<
HouseResourcePage
>
list
=
houseResourceMapper
.
selectProfileGraph
(
query
);
List
<
HouseResourceProfileGraph
>
resourceProfileGraphList
=
new
ArrayList
<>();
Map
<
String
,
List
<
HouseResourcePage
>>
collect
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
HouseResourcePage:
:
getFour
));
collect
.
forEach
((
k
,
v
)
->
{
HouseResourceProfileGraph
houseResourceProfileGraph
=
new
HouseResourceProfileGraph
();
houseResourceProfileGraph
.
setId
(
k
);
GridRegion
gridRegion
=
gridRegionMapper
.
selectByPrimaryKey
(
k
);
houseResourceProfileGraph
.
setWgName
(
gridRegion
.
getWgName
());
houseResourceProfileGraph
.
setHouseResources
(
v
);
resourceProfileGraphList
.
add
(
houseResourceProfileGraph
);
});
return
resourceProfileGraphList
;
}
private
List
<
HouseResourcePage
>
handleHouseList
(
List
<
HouseResourcePage
>
list
)
{
...
...
ruoyi-system/src/main/resources/mapper/house/HouseResourceMapper.xml
View file @
152c8047
...
...
@@ -140,41 +140,38 @@
and t2.house_number like concat('%', #{query.houseNumber}, '%')
</if>
<if
test=
"query.sortWay != null and query.sortWay != ''"
>
order by t2.house
A
rea ${query.sortWay}
order by t2.house
_a
rea ${query.sortWay}
</if>
</where>
</select>
<select
id=
"select
List
"
resultType=
"com.ruoyi.system.domain.house.vo.HouseResourcePage"
>
<select
id=
"select
ProfileGraph
"
resultType=
"com.ruoyi.system.domain.house.vo.HouseResourcePage"
>
SELECT
t
1
.wg_name AS wgName4,
t
2
.*
t
2
.wg_name AS wgName4,
t
1
.*
FROM
grid_region
t1
LEFT JOIN
house_resource t2 ON t1.id = t2.four
house_resource
t1
LEFT JOIN
grid_region t2 ON t1.four = t2.id
<where>
<if
test=
"query.wgType != null"
>
and t
2
.type = #{query.wgType}
and t
1
.type = #{query.wgType}
</if>
<if
test=
"query.two != null and query.two != ''"
>
and t
2
.two = #{query.two}
and t
1
.two = #{query.two}
</if>
<if
test=
"query.three != null and query.three != ''"
>
and t
2
.three = #{query.three}
and t
1
.three = #{query.three}
</if>
<if
test=
"query.four != null and query.four != ''"
>
and t
2
.four = #{query.four}
and t
1
.four = #{query.four}
</if>
<if
test=
"query.houseResourceAttribute != null"
>
and t
2
.house_resource_attribute = #{query.houseResourceAttribute}
and t
1
.house_resource_attribute = #{query.houseResourceAttribute}
</if>
<if
test=
"query.hireStatus != null"
>
and t
2
.hire_status = #{query.hireStatus}
and t
1
.hire_status = #{query.hireStatus}
</if>
<if
test=
"query.houseNumber != null and query.houseNumber != ''"
>
and t2.house_number like concat('%', #{query.houseNumber}, '%')
</if>
<if
test=
"query.sortWay != null and query.sortWay != ''"
>
order by t2.houseArea ${query.sortWay}
and t1.house_number like concat('%', #{query.houseNumber}, '%')
</if>
</where>
</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