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
3c794f59
Commit
3c794f59
authored
Feb 27, 2025
by
luben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
275c76a0
Pipeline
#142811
passed with stages
in 3 minutes and 43 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
10 deletions
+42
-10
RegionController.java
.../java/com/ruoyi/web/controller/grid/RegionController.java
+16
-10
GridRegionMapper.java
...n/java/com/ruoyi/system/mapper/grid/GridRegionMapper.java
+2
-0
GridRegionMapper.xml
...ystem/src/main/resources/mapper/grid/GridRegionMapper.xml
+24
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/grid/RegionController.java
View file @
3c794f59
...
...
@@ -712,19 +712,25 @@ public class RegionController extends BaseController {
@RequestParam
(
value
=
"pageSize"
,
required
=
false
)
Integer
pageSize
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
){
List
<
String
>
wgCodeLikes
=
new
ArrayList
<>();
if
(!
StringUtils
.
isBlank
(
wgCode
)){
wgCodeLikes
=
Arrays
.
asList
(
wgCode
.
split
(
","
));
}
List
<
GridRegion
>
gridRegionList
=
gridRegionMapper
.
getThirdRegion
(
wgType
,
wgCodeLikes
,
name
);
return
AjaxResult
.
success
(
gridRegionList
);
}
@RequestMapping
(
value
=
"/getOneOrTwoRegion"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
AjaxResult
getOneOrTwoRegion
(
@RequestParam
(
value
=
"level"
,
required
=
false
)
String
level
,
@RequestParam
(
value
=
"pageNum"
,
required
=
false
)
Integer
pageNum
,
@RequestParam
(
value
=
"pageSize"
,
required
=
false
)
Integer
pageSize
){
GridRegionExample
example
=
new
GridRegionExample
();
GridRegionExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIsValidEqualTo
(
"1"
);
criteria
.
andLevelEqualTo
(
"3"
);
if
(
wgType
!=
null
&&
!
StringUtils
.
isBlank
(
wgType
)){
criteria
.
andWgTypeEqualTo
(
wgType
);
}
if
(
wgCode
!=
null
&&
!
StringUtils
.
isBlank
(
wgCode
)){
criteria
.
andWgCodeLike
(
wgCode
).
andWgCodeNotEqualTo
(
wgCode
);
}
if
(
name
!=
null
&&
!
StringUtils
.
isBlank
(
name
)){
criteria
.
andWgNameLike
(
name
);
}
criteria
.
andLevelEqualTo
(
level
);
List
<
GridRegion
>
gridRegionList
=
gridRegionMapper
.
selectByExample
(
example
);
return
AjaxResult
.
success
(
gridRegionList
);
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/grid/GridRegionMapper.java
View file @
3c794f59
...
...
@@ -45,4 +45,6 @@ public interface GridRegionMapper {
List
<
GridRegion
>
getByParams
(
GridRegionSearchParam
param
);
Integer
countByParams
(
GridRegionSearchParam
param
);
List
<
GridRegion
>
getThirdRegion
(
@Param
(
"wgType"
)
String
wgType
,
@Param
(
"wgCodeLikes"
)
List
<
String
>
wgCodeLikes
,
@Param
(
"name"
)
String
name
);
}
\ No newline at end of file
ruoyi-system/src/main/resources/mapper/grid/GridRegionMapper.xml
View file @
3c794f59
...
...
@@ -612,4 +612,28 @@
and level = #{level}
</if>
</select>
<select
id=
"getThirdRegion"
resultType=
"com.ruoyi.system.domain.grid.GridRegion"
>
select
<include
refid=
"Base_Column_List"
/>
from grid_region where is_valid = '1'
<if
test=
"wgCodeLikes != null and wgCodeLikes.size() > 0"
>
and (
<foreach
collection=
"wgCodeLikes"
item=
"wgCode"
open=
"("
close=
")"
separator=
"or"
>
wg_code like CONCAT(#{wgCode}, '%')
</foreach>
)
and (
<foreach
collection=
"wgCodeLikes"
item=
"wgCode"
open=
"("
close=
")"
separator=
"and"
>
wg_code != #{wgCode}
</foreach>
)
</if>
<if
test=
"wgType != null and wgType != ''"
>
and wg_type = #{wgType}
</if>
<if
test=
"name != null and name != ''"
>
and wg_name = #{name}
</if>
and level = 3
</select>
</mapper>
\ 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