Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_back
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
辛梅
smart_back
Commits
02fddc68
Commit
02fddc68
authored
2 years ago
by
阎佳明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
ab9f97c6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
src/main/java/com/example/system/sys/controller/GridManController.java
.../com/example/system/sys/controller/GridManController.java
+11
-5
src/main/java/com/example/system/sys/mapper/BuildingMapper.java
...in/java/com/example/system/sys/mapper/BuildingMapper.java
+2
-0
target/classes/com/example/system/sys/controller/GridManController.class
...com/example/system/sys/controller/GridManController.class
+0
-0
target/classes/com/example/system/sys/mapper/BuildingMapper.class
...lasses/com/example/system/sys/mapper/BuildingMapper.class
+0
-0
No files found.
src/main/java/com/example/system/sys/controller/GridManController.java
View file @
02fddc68
...
...
@@ -39,13 +39,19 @@ import java.util.Map;
public
class
GridManController
{
@Resource
private
IGridManService
gridManService
;
@Resource
private
IHomeService
homeService
;
@Resource
private
IUserLoadService
userLoadService
;
@Resource
private
IBuildingService
buildingService
;
@Resource
private
GridManMapper
gridManMapper
;
@Resource
private
HomeMapper
homeMapper
;
@Resource
private
UserLoadMapper
userLoadMapper
;
@Resource
private
BuildingMapper
buildingMapper
;
public
GridManController
()
{
...
...
@@ -96,7 +102,7 @@ public class GridManController {
@RequestParam
(
"pageSize"
)
Long
pageSize
)
{
int
id
=
Integer
.
parseInt
(
JwtUtils
.
getClaimByToken
(
token
).
getSubject
());
LambdaQueryWrapper
<
Home
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
hasLength
(
String
.
valueOf
(
id
)),
Home:
:
get
Gridman
Id
,
id
);
wrapper
.
eq
(
StringUtils
.
hasLength
(
String
.
valueOf
(
id
)),
Home:
:
get
User
Id
,
id
);
//分页
Page
<
Home
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
homeService
.
page
(
page
,
wrapper
);
...
...
@@ -196,7 +202,7 @@ public class GridManController {
}
//网格员添加用户信息
@PostMapping
(
"/addUser"
)
public
Result
<
UserLoad
>
add
Home
ById
(
@RequestHeader
(
"X-Token"
)
String
token
,
@RequestBody
UserLoad
userload
)
{
public
Result
<
UserLoad
>
add
User
ById
(
@RequestHeader
(
"X-Token"
)
String
token
,
@RequestBody
UserLoad
userload
)
{
int
id
=
Integer
.
parseInt
(
JwtUtils
.
getClaimByToken
(
token
).
getSubject
());
//添加新的房屋信息
userload
.
setGridmanId
(
id
);
...
...
@@ -206,7 +212,7 @@ public class GridManController {
}
//网格员修改用户信息
@PostMapping
(
"/updateUser"
)
public
Result
<
UserLoad
>
update
Home
ById
(
@RequestHeader
(
"X-Token"
)
String
token
,
@RequestBody
UserLoad
userload
)
{
public
Result
<
UserLoad
>
update
User
ById
(
@RequestHeader
(
"X-Token"
)
String
token
,
@RequestBody
UserLoad
userload
)
{
int
id
=
Integer
.
parseInt
(
JwtUtils
.
getClaimByToken
(
token
).
getSubject
());
try
{
userLoadService
.
updateById
(
userload
);
...
...
@@ -270,7 +276,7 @@ public class GridManController {
}
//网格员添加建筑物信息
@PostMapping
(
"/addBuilding"
)
public
Result
<
Building
>
add
Home
ById
(
@RequestHeader
(
"X-Token"
)
String
token
,
@RequestBody
Building
building
)
{
public
Result
<
Building
>
add
Building
ById
(
@RequestHeader
(
"X-Token"
)
String
token
,
@RequestBody
Building
building
)
{
int
id
=
Integer
.
parseInt
(
JwtUtils
.
getClaimByToken
(
token
).
getSubject
());
//添加新的房屋信息
building
.
setBuildingId
(
id
);
...
...
@@ -280,7 +286,7 @@ public class GridManController {
}
//网格员修改建筑物信息
@PostMapping
(
"/updateBuilding"
)
public
Result
<
Building
>
update
Home
ById
(
@RequestHeader
(
"X-Token"
)
String
token
,
@RequestBody
Building
building
)
{
public
Result
<
Building
>
update
Building
ById
(
@RequestHeader
(
"X-Token"
)
String
token
,
@RequestBody
Building
building
)
{
int
id
=
Integer
.
parseInt
(
JwtUtils
.
getClaimByToken
(
token
).
getSubject
());
try
{
buildingService
.
updateById
(
building
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/example/system/sys/mapper/BuildingMapper.java
View file @
02fddc68
...
...
@@ -2,6 +2,7 @@ package com.example.system.sys.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.example.system.sys.entity.Building
;
import
org.mapstruct.Mapper
;
/**
* <p>
...
...
@@ -11,6 +12,7 @@ import com.example.system.sys.entity.Building;
* @author xc
* @since 2023-06-29
*/
@Mapper
public
interface
BuildingMapper
extends
BaseMapper
<
Building
>
{
}
This diff is collapsed.
Click to expand it.
target/classes/com/example/system/sys/controller/GridManController.class
View file @
02fddc68
No preview for this file type
This diff is collapsed.
Click to expand it.
target/classes/com/example/system/sys/mapper/BuildingMapper.class
View file @
02fddc68
No preview for this file type
This diff is collapsed.
Click to expand it.
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