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
21088b65
Commit
21088b65
authored
Jun 23, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加排序
parent
de251e81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
RedisKey.java
...java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
+5
-0
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+6
-5
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/RedisKey.java
View file @
21088b65
...
@@ -24,4 +24,9 @@ public class RedisKey {
...
@@ -24,4 +24,9 @@ public class RedisKey {
public
static
final
String
THOUGHT_ID
=
"thought_id"
;
public
static
final
String
THOUGHT_ID
=
"thought_id"
;
//根据警情id查询警情详情记录
//根据警情id查询警情详情记录
public
static
final
String
ALERTCALLED_ID
=
"alertcalled_id"
;
public
static
final
String
ALERTCALLED_ID
=
"alertcalled_id"
;
/** 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)}) */
public
static
String
humpToLine
(
String
str
)
{
return
str
.
replaceAll
(
"[A-Z]"
,
"_$0"
).
toLowerCase
();
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
21088b65
...
@@ -224,7 +224,6 @@ public class AlertCalledController extends BaseController {
...
@@ -224,7 +224,6 @@ public class AlertCalledController extends BaseController {
public
ResponseModel
<
List
<
AlertCalled
>>
list
(
AlertCalled
alertCalled
)
{
public
ResponseModel
<
List
<
AlertCalled
>>
list
(
AlertCalled
alertCalled
)
{
QueryWrapper
<
AlertCalled
>
alertCalledQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
AlertCalled
>
alertCalledQueryWrapper
=
new
QueryWrapper
<>();
setQueryWrapper
(
alertCalledQueryWrapper
,
alertCalled
,
null
);
setQueryWrapper
(
alertCalledQueryWrapper
,
alertCalled
,
null
);
List
<
AlertCalled
>
list
=
iAlertCalledService
.
list
(
alertCalledQueryWrapper
);
List
<
AlertCalled
>
list
=
iAlertCalledService
.
list
(
alertCalledQueryWrapper
);
return
ResponseHelper
.
buildResponse
(
list
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
...
@@ -232,14 +231,16 @@ public class AlertCalledController extends BaseController {
...
@@ -232,14 +231,16 @@ public class AlertCalledController extends BaseController {
private
QueryWrapper
<
AlertCalled
>
setQueryWrapper
(
QueryWrapper
<
AlertCalled
>
queryWrapper
,
AlertCalled
alertCalled
,
String
sort
){
private
QueryWrapper
<
AlertCalled
>
setQueryWrapper
(
QueryWrapper
<
AlertCalled
>
queryWrapper
,
AlertCalled
alertCalled
,
String
sort
){
Class
<?
extends
AlertCalled
>
aClass
=
alertCalled
.
getClass
();
Class
<?
extends
AlertCalled
>
aClass
=
alertCalled
.
getClass
();
queryWrapper
.
eq
(
"is_delete"
,
0
);
queryWrapper
.
eq
(
"is_delete"
,
0
);
queryWrapper
.
orderByDesc
(
"call_time"
);
if
(
sort
!=
null
)
{
if
(
sort
!=
null
)
{
String
[]
date
=
sort
.
split
(
","
);
String
[]
date
=
sort
.
split
(
","
);
if
(
date
[
1
].
equals
(
"ascend"
))
{
if
(
date
[
1
].
equals
(
"ascend"
))
{
queryWrapper
.
orderByAsc
(
date
[
0
]
);
queryWrapper
.
orderByAsc
(
RedisKey
.
humpToLine
(
date
[
0
])
);
}
else
{
}
else
{
queryWrapper
.
orderByDesc
(
date
[
0
]
);
queryWrapper
.
orderByDesc
(
RedisKey
.
humpToLine
(
date
[
0
])
);
}
}
}
else
{
queryWrapper
.
orderByDesc
(
"call_time"
);
}
}
if
(
alertCalled
.
getCallTimeStart
()
!=
null
&&
alertCalled
.
getCallTimeEnd
()
!=
null
)
{
if
(
alertCalled
.
getCallTimeStart
()
!=
null
&&
alertCalled
.
getCallTimeEnd
()
!=
null
)
{
...
...
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