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
f8b7d55b
Commit
f8b7d55b
authored
Mar 10, 2025
by
luben
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'main'
Dev See merge request
!80
parents
df2e004f
5e9be79f
Pipeline
#143024
passed with stages
in 3 minutes and 40 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
RegionController.java
.../java/com/ruoyi/web/controller/grid/RegionController.java
+35
-0
GridRegionMapper.java
...n/java/com/ruoyi/system/mapper/grid/GridRegionMapper.java
+2
-0
GridRegionMapper.xml
...ystem/src/main/resources/mapper/grid/GridRegionMapper.xml
+6
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/grid/RegionController.java
View file @
f8b7d55b
...
...
@@ -791,4 +791,39 @@ public class RegionController extends BaseController {
List
<
GridRegion
>
gridRegionList
=
gridRegionMapper
.
selectByExample
(
example
);
return
AjaxResult
.
success
(
gridRegionList
);
}
@RequestMapping
(
value
=
"/deleteTreeNode"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
public
AjaxResult
getTwoThreeRegion
(
@RequestParam
(
value
=
"wgType"
,
required
=
false
)
String
wgType
,
@RequestParam
(
value
=
"wgCode"
,
required
=
false
)
String
wgCode
){
GridRegionExample
example1
=
new
GridRegionExample
();
GridRegionExample
.
Criteria
criteria1
=
example1
.
createCriteria
();
criteria1
.
andIsValidEqualTo
(
"1"
);
criteria1
.
andWgTypeEqualTo
(
wgType
);
criteria1
.
andWgParentIdEqualTo
(
wgCode
);
long
count
=
gridRegionMapper
.
countByExample
(
example1
);
if
(
count
>
0
){
throw
new
RuntimeException
(
"当前菜单存在下级菜单,无法删除"
);
}
GridRegionExample
example
=
new
GridRegionExample
();
GridRegionExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIsValidEqualTo
(
"1"
);
criteria
.
andWgTypeEqualTo
(
wgType
);
criteria
.
andWgCodeEqualTo
(
wgCode
);
return
AjaxResult
.
success
(
gridRegionMapper
.
deleteByExample
(
example
));
}
@RequestMapping
(
value
=
"/changeName"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
AjaxResult
changeName
(
@RequestParam
(
value
=
"id"
,
required
=
false
)
String
id
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
){
return
AjaxResult
.
success
(
gridRegionMapper
.
changeTreeNodeName
(
id
,
name
));
}
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/grid/GridRegionMapper.java
View file @
f8b7d55b
...
...
@@ -55,4 +55,6 @@ public interface GridRegionMapper {
List
<
GridRegion
>
getAllLevelThreeByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"code"
)
String
code
);
List
<
GridRegion
>
getAllLevelFourByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"code"
)
String
code
);
int
changeTreeNodeName
(
@Param
(
"id"
)
String
id
,
@Param
(
"name"
)
String
name
);
}
\ No newline at end of file
ruoyi-system/src/main/resources/mapper/grid/GridRegionMapper.xml
View file @
f8b7d55b
...
...
@@ -536,6 +536,7 @@
where id = #{id,jdbcType=VARCHAR}
</update>
<select
id=
"selectThirdGridByBaseId"
parameterType=
"java.lang.String"
resultMap=
"ResultMapWithBLOBs"
>
select * from grid_region where wg_type='1' and level='3'
</select>
...
...
@@ -682,4 +683,9 @@
and wg_code like CONCAT(#{code}, '%')
and wg_code != #{code}
</select>
<update
id=
"changeTreeNodeName"
>
update grid_region set name=#{name} where id = #{id}
</update>
</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