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
4d5ab03b
Commit
4d5ab03b
authored
Mar 19, 2025
by
luben
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'main'
Dev See merge request
!151
parents
6cca076a
df83eb49
Pipeline
#143432
passed with stages
in 6 minutes and 43 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
231 additions
and
0 deletions
+231
-0
MapEntityController.java
...a/com/ruoyi/web/controller/other/MapEntityController.java
+49
-0
MapEntity.java
...rc/main/java/com/ruoyi/system/domain/other/MapEntity.java
+100
-0
MapEntityMapper.java
...n/java/com/ruoyi/system/mapper/other/MapEntityMapper.java
+10
-0
MapEntityService.java
...java/com/ruoyi/system/service/other/MapEntityService.java
+18
-0
MapEntityServiceImpl.java
...ruoyi/system/service/other/impl/MapEntityServiceImpl.java
+46
-0
MapEntityMapper.xml
...ystem/src/main/resources/mapper/other/MapEntityMapper.xml
+8
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/other/MapEntityController.java
0 → 100644
View file @
4d5ab03b
package
com
.
ruoyi
.
web
.
controller
.
other
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.system.domain.other.MapEntity
;
import
com.ruoyi.system.service.other.MapEntityService
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/api/map"
)
@Api
(
tags
=
"地图"
)
public
class
MapEntityController
extends
BaseController
{
@Autowired
private
MapEntityService
mapEntityService
;
@RequestMapping
(
value
=
"/getAllMapEntities"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
List
<
MapEntity
>
getAllMapEntities
()
{
return
mapEntityService
.
getAllMapEntities
();
}
@RequestMapping
(
value
=
"/getMapEntityById"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
MapEntity
getMapEntityById
(
@RequestParam
(
name
=
"id"
)
String
id
)
{
return
mapEntityService
.
getMapEntityById
(
id
);
}
@RequestMapping
(
value
=
"/addMapEntity"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
MapEntity
addMapEntityById
(
@RequestBody
MapEntity
mapEntity
)
{
return
mapEntityService
.
addMapEntityById
(
mapEntity
);
}
@RequestMapping
(
value
=
"/updateMapEntity"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
MapEntity
updateMapEntity
(
@RequestBody
MapEntity
mapEntity
)
{
return
mapEntityService
.
updateMapEntity
(
mapEntity
.
getId
(),
mapEntity
);
}
@RequestMapping
(
value
=
"/deleteMapEntity"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
public
void
deleteMapEntity
(
@RequestParam
(
name
=
"id"
)
String
id
)
{
mapEntityService
.
deleteMapEntity
(
id
);
}
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/other/MapEntity.java
0 → 100644
View file @
4d5ab03b
package
com
.
ruoyi
.
system
.
domain
.
other
;
public
class
MapEntity
{
private
String
id
;
// 类型
private
String
type
;
// 上级主体
private
String
parentEntity
;
// 主体编码
private
String
entityCode
;
// 主体名称
private
String
entityName
;
// 二维码
private
String
qrCode
;
// 主体范围
private
String
entityScope
;
// 坐标地址
private
String
coordinateAddress
;
// 是否有效
private
int
isValid
;
// 主体层级
private
int
entityLevel
;
// Getters 和 Setters 方法
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getParentEntity
()
{
return
parentEntity
;
}
public
void
setParentEntity
(
String
parentEntity
)
{
this
.
parentEntity
=
parentEntity
;
}
public
String
getEntityCode
()
{
return
entityCode
;
}
public
void
setEntityCode
(
String
entityCode
)
{
this
.
entityCode
=
entityCode
;
}
public
String
getEntityName
()
{
return
entityName
;
}
public
void
setEntityName
(
String
entityName
)
{
this
.
entityName
=
entityName
;
}
public
String
getQrCode
()
{
return
qrCode
;
}
public
void
setQrCode
(
String
qrCode
)
{
this
.
qrCode
=
qrCode
;
}
public
String
getEntityScope
()
{
return
entityScope
;
}
public
void
setEntityScope
(
String
entityScope
)
{
this
.
entityScope
=
entityScope
;
}
public
String
getCoordinateAddress
()
{
return
coordinateAddress
;
}
public
void
setCoordinateAddress
(
String
coordinateAddress
)
{
this
.
coordinateAddress
=
coordinateAddress
;
}
public
int
isValid
()
{
return
isValid
;
}
public
void
setValid
(
int
valid
)
{
isValid
=
valid
;
}
public
int
getEntityLevel
()
{
return
entityLevel
;
}
public
void
setEntityLevel
(
int
entityLevel
)
{
this
.
entityLevel
=
entityLevel
;
}
}
\ No newline at end of file
ruoyi-system/src/main/java/com/ruoyi/system/mapper/other/MapEntityMapper.java
0 → 100644
View file @
4d5ab03b
package
com
.
ruoyi
.
system
.
mapper
.
other
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.system.domain.other.MapEntity
;
import
java.util.List
;
public
interface
MapEntityMapper
extends
BaseMapper
<
MapEntity
>
{
}
ruoyi-system/src/main/java/com/ruoyi/system/service/other/MapEntityService.java
0 → 100644
View file @
4d5ab03b
package
com
.
ruoyi
.
system
.
service
.
other
;
import
com.ruoyi.system.domain.other.MapEntity
;
import
java.util.List
;
public
interface
MapEntityService
{
// 获取所有实体
List
<
MapEntity
>
getAllMapEntities
();
// 根据 ID 获取实体
MapEntity
getMapEntityById
(
String
id
);
// 更新实体
MapEntity
updateMapEntity
(
String
id
,
MapEntity
mapEntity
);
// 删除实体
void
deleteMapEntity
(
String
id
);
MapEntity
addMapEntityById
(
MapEntity
mapEntity
);
}
\ No newline at end of file
ruoyi-system/src/main/java/com/ruoyi/system/service/other/impl/MapEntityServiceImpl.java
0 → 100644
View file @
4d5ab03b
package
com
.
ruoyi
.
system
.
service
.
other
.
impl
;
import
cn.hutool.core.lang.UUID
;
import
com.ruoyi.system.domain.other.MapEntity
;
import
com.ruoyi.system.mapper.other.MapEntityMapper
;
import
com.ruoyi.system.service.other.MapEntityService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
MapEntityServiceImpl
implements
MapEntityService
{
@Autowired
private
MapEntityMapper
mapEntityMapper
;
@Override
public
List
<
MapEntity
>
getAllMapEntities
()
{
return
mapEntityMapper
.
selectList
(
null
);
}
@Override
public
MapEntity
getMapEntityById
(
String
id
)
{
return
mapEntityMapper
.
selectById
(
id
);
}
@Override
public
MapEntity
updateMapEntity
(
String
id
,
MapEntity
mapEntity
)
{
mapEntity
.
setId
(
id
);
mapEntityMapper
.
updateById
(
mapEntity
);
return
mapEntity
;
}
@Override
public
void
deleteMapEntity
(
String
id
)
{
mapEntityMapper
.
deleteById
(
id
);
}
@Override
public
MapEntity
addMapEntityById
(
MapEntity
mapEntity
)
{
mapEntity
.
setId
(
UUID
.
randomUUID
().
toString
());
mapEntityMapper
.
insert
(
mapEntity
);
return
mapEntity
;
}
}
\ No newline at end of file
ruoyi-system/src/main/resources/mapper/other/MapEntityMapper.xml
0 → 100644
View file @
4d5ab03b
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.system.mapper.other.MapEntityMapper"
>
</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