Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
d2681852
Commit
d2681852
authored
Jun 21, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加缓存
parent
7d860341
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
AlertFormController.java
...s/boot/module/jcs/biz/controller/AlertFormController.java
+17
-10
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertFormController.java
View file @
d2681852
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
...
...
@@ -41,6 +42,8 @@ public class AlertFormController extends BaseController {
IAlertFormService
iAlertFormService
;
@Autowired
FormList
FormList
;
@Autowired
RedisUtils
redisUtils
;
/**
* 新增警情表单
* @return
...
...
@@ -102,18 +105,22 @@ public class AlertFormController extends BaseController {
*/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/f
ro
m/{code}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/f
or
m/{code}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据表态类型code查询表单数据项"
,
notes
=
"根据表态类型code查询表单数据项"
)
public
ResponseModel
selectFormdItem
(
HttpServletRequest
request
,
@PathVariable
String
code
){
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_type_code"
,
code
);
//警情动态表单数据
List
<
AlertForm
>
alertFormValue
=
iAlertFormService
.
list
(
queryWrapper
);
List
<
AlertFormVo
>
list
=
FormList
.
getFormlist
(
alertFormValue
);
return
CommonResponseUtil
.
success
(
list
);
List
<
AlertFormVo
>
list
=
null
;
if
(
redisUtils
.
hasKey
(
"form_"
+
code
)){
Object
obj
=
redisUtils
.
get
(
"form_"
+
code
);
return
CommonResponseUtil
.
success
(
obj
);
}
else
{
QueryWrapper
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_type_code"
,
code
);
//警情动态表单数据
List
<
AlertForm
>
alertFormValue
=
iAlertFormService
.
list
(
queryWrapper
);
list
=
FormList
.
getFormlist
(
alertFormValue
);
redisUtils
.
set
(
"form_"
+
code
,
list
,
86400
);
return
CommonResponseUtil
.
success
(
list
);
}
}
...
...
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