Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
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
zengtianlai3
ioc_sixiang_license
Commits
78800464
Commit
78800464
authored
Jul 17, 2022
by
zengtianlai3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xss 优化
parent
e635106b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
DeviceController.java
...java/iot/sixiang/license/controller/DeviceController.java
+3
-0
OperateController.java
...ava/iot/sixiang/license/controller/OperateController.java
+1
-0
UserController.java
...n/java/iot/sixiang/license/controller/UserController.java
+2
-0
No files found.
license/src/main/java/iot/sixiang/license/controller/DeviceController.java
View file @
78800464
...
@@ -17,6 +17,7 @@ import iot.sixiang.license.model.vo.DeviceDetailVo;
...
@@ -17,6 +17,7 @@ import iot.sixiang.license.model.vo.DeviceDetailVo;
import
iot.sixiang.license.model.vo.DeviceVo
;
import
iot.sixiang.license.model.vo.DeviceVo
;
import
iot.sixiang.license.service.DeviceBlackService
;
import
iot.sixiang.license.service.DeviceBlackService
;
import
iot.sixiang.license.service.DeviceService
;
import
iot.sixiang.license.service.DeviceService
;
import
iot.sixiang.license.xss.XssUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.WebDataBinder
;
import
org.springframework.web.bind.WebDataBinder
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -84,6 +85,8 @@ public class DeviceController {
...
@@ -84,6 +85,8 @@ public class DeviceController {
@MyLog
(
title
=
"获取设备列表"
,
optParam
=
"#{pageNo},#{pageSize},#{appName},#{userName}"
,
businessType
=
BusinessType
.
SELECT
)
@MyLog
(
title
=
"获取设备列表"
,
optParam
=
"#{pageNo},#{pageSize},#{appName},#{userName}"
,
businessType
=
BusinessType
.
SELECT
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pageNo"
,
value
=
"当前在第几页"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"每页显示多少页"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"appName"
,
value
=
"应用名"
),
@ApiImplicitParam
(
name
=
"userName"
,
value
=
"用户名"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pageNo"
,
value
=
"当前在第几页"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"每页显示多少页"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"appName"
,
value
=
"应用名"
),
@ApiImplicitParam
(
name
=
"userName"
,
value
=
"用户名"
)})
public
PageResult
<
DeviceVo
>
getDeviceList
(
@RequestParam
(
value
=
"pageNo"
,
defaultValue
=
"0"
)
int
pageNo
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"0"
)
int
pageSize
,
@RequestParam
(
value
=
"appName"
,
required
=
false
)
String
appName
,
@RequestParam
(
value
=
"userName"
,
required
=
false
)
String
userName
)
{
public
PageResult
<
DeviceVo
>
getDeviceList
(
@RequestParam
(
value
=
"pageNo"
,
defaultValue
=
"0"
)
int
pageNo
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"0"
)
int
pageSize
,
@RequestParam
(
value
=
"appName"
,
required
=
false
)
String
appName
,
@RequestParam
(
value
=
"userName"
,
required
=
false
)
String
userName
)
{
appName
=
XssUtil
.
checkXSS
(
appName
);
userName
=
XssUtil
.
checkXSS
(
userName
);
PageInfoModel
<
DeviceVo
>
records
=
deviceService
.
getDeviceList
(
pageNo
,
pageSize
,
appName
,
userName
);
PageInfoModel
<
DeviceVo
>
records
=
deviceService
.
getDeviceList
(
pageNo
,
pageSize
,
appName
,
userName
);
int
total
=
records
.
getTotal
();
int
total
=
records
.
getTotal
();
int
pages
=
total
/
pageSize
;
//pages为总页数
int
pages
=
total
/
pageSize
;
//pages为总页数
...
...
license/src/main/java/iot/sixiang/license/controller/OperateController.java
View file @
78800464
...
@@ -169,6 +169,7 @@ public class OperateController {
...
@@ -169,6 +169,7 @@ public class OperateController {
@ApiOperation
(
value
=
"删除服务接口"
,
notes
=
"删除服务"
)
@ApiOperation
(
value
=
"删除服务接口"
,
notes
=
"删除服务"
)
@PostMapping
(
"server/delete"
)
@PostMapping
(
"server/delete"
)
public
BaseResult
deleteServer
(
@RequestParam
(
"serverIp"
)
String
serverIp
)
{
public
BaseResult
deleteServer
(
@RequestParam
(
"serverIp"
)
String
serverIp
)
{
serverIp
=
XssUtil
.
checkXSS
(
serverIp
);
boolean
res
=
serverService
.
deleteServer
(
serverIp
);
boolean
res
=
serverService
.
deleteServer
(
serverIp
);
if
(
res
)
{
if
(
res
)
{
return
BaseResult
.
success
();
return
BaseResult
.
success
();
...
...
license/src/main/java/iot/sixiang/license/controller/UserController.java
View file @
78800464
...
@@ -135,6 +135,8 @@ public class UserController {
...
@@ -135,6 +135,8 @@ public class UserController {
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"0"
)
int
pageSize
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"0"
)
int
pageSize
,
@RequestParam
(
value
=
"userName"
,
required
=
false
)
String
userName
,
@RequestParam
(
value
=
"userName"
,
required
=
false
)
String
userName
,
@RequestParam
(
value
=
"company"
,
required
=
false
)
String
company
)
{
@RequestParam
(
value
=
"company"
,
required
=
false
)
String
company
)
{
userName
=
XssUtil
.
checkXSS
(
userName
);
company
=
XssUtil
.
checkXSS
(
company
);
PageInfoModel
<
UserVo
>
records
=
userService
.
getUserList
(
pageNo
,
pageSize
,
userName
,
company
);
PageInfoModel
<
UserVo
>
records
=
userService
.
getUserList
(
pageNo
,
pageSize
,
userName
,
company
);
int
total
=
records
.
getTotal
();
int
total
=
records
.
getTotal
();
int
pages
=
total
/
pageSize
;
//pages为总页数
int
pages
=
total
/
pageSize
;
//pages为总页数
...
...
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