Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JeeSpringCloud
Commits
7fa8137a
"src/main/vscode:/vscode.git/clone" did not exist on "c3db17b38799a1018e4fb39dee2b30f7977d088a"
Commit
7fa8137a
authored
Oct 22, 2018
by
HuangBingGui
Browse files
no commit message
parent
6c859da2
Changes
202
Hide whitespace changes
Inline
Side-by-side
JeeSpringCloud/src/main/java/com/jeespring/modules/iim/web/MailComposeController.java
View file @
7fa8137a
...
@@ -162,7 +162,7 @@ public class MailComposeController extends AbstractBaseController {
...
@@ -162,7 +162,7 @@ public class MailComposeController extends AbstractBaseController {
model
.
addAttribute
(
"mailDraftCount"
,
mailComposeService
.
getCount
(
serachBox4
));
model
.
addAttribute
(
"mailDraftCount"
,
mailComposeService
.
getCount
(
serachBox4
));
if
(
mailCompose
.
getStatus
()==
null
||
mailCompose
.
getStatus
()
.
equals
(
"0"
)){
if
(
mailCompose
.
getStatus
()==
null
||
"0"
.
equals
(
mailCompose
.
getStatus
())){
return
"modules/iim/mailDraftList"
;
//草稿箱
return
"modules/iim/mailDraftList"
;
//草稿箱
}
}
return
"modules/iim/mailComposeList"
;
//已发送
return
"modules/iim/mailComposeList"
;
//已发送
...
@@ -244,7 +244,7 @@ public class MailComposeController extends AbstractBaseController {
...
@@ -244,7 +244,7 @@ public class MailComposeController extends AbstractBaseController {
mailComposeService
.
save
(
mailCompose
);
//0 显示在草稿箱,1 显示在已发送需同时保存到收信人的收件箱。
mailComposeService
.
save
(
mailCompose
);
//0 显示在草稿箱,1 显示在已发送需同时保存到收信人的收件箱。
if
(
mailCompose
.
getStatus
()
.
equals
(
"1"
))
//已发送,同时保存到收信人的收件箱
if
(
"1"
.
equals
(
mailCompose
.
getStatus
()))
//已发送,同时保存到收信人的收件箱
{
{
MailBox
mailBox
=
new
MailBox
();
MailBox
mailBox
=
new
MailBox
();
mailBox
.
setReadstatus
(
"0"
);
mailBox
.
setReadstatus
(
"0"
);
...
@@ -272,7 +272,7 @@ public class MailComposeController extends AbstractBaseController {
...
@@ -272,7 +272,7 @@ public class MailComposeController extends AbstractBaseController {
*/
*/
@RequestMapping
(
value
=
"deleteAllCompose"
)
@RequestMapping
(
value
=
"deleteAllCompose"
)
public
String
deleteAllCompose
(
String
ids
,
Model
model
,
RedirectAttributes
redirectAttributes
)
{
public
String
deleteAllCompose
(
String
ids
,
Model
model
,
RedirectAttributes
redirectAttributes
)
{
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
mailComposeService
.
delete
(
mailComposeService
.
get
(
id
));
mailComposeService
.
delete
(
mailComposeService
.
get
(
id
));
}
}
...
@@ -289,7 +289,7 @@ public class MailComposeController extends AbstractBaseController {
...
@@ -289,7 +289,7 @@ public class MailComposeController extends AbstractBaseController {
*/
*/
@RequestMapping
(
value
=
"deleteAllDraft"
)
@RequestMapping
(
value
=
"deleteAllDraft"
)
public
String
deleteAllDraft
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
public
String
deleteAllDraft
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
mailComposeService
.
delete
(
mailComposeService
.
get
(
id
));
mailComposeService
.
delete
(
mailComposeService
.
get
(
id
));
}
}
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/iim/web/MailController.java
View file @
7fa8137a
...
@@ -82,7 +82,7 @@ public class MailController extends AbstractBaseController {
...
@@ -82,7 +82,7 @@ public class MailController extends AbstractBaseController {
*/
*/
@RequestMapping
(
value
=
"deleteAll"
)
@RequestMapping
(
value
=
"deleteAll"
)
public
String
deleteAll
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
public
String
deleteAll
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
mailService
.
delete
(
mailService
.
get
(
id
));
mailService
.
delete
(
mailService
.
get
(
id
));
}
}
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/job/rest/SysJobLogRestController.java
View file @
7fa8137a
...
@@ -261,7 +261,7 @@ public class SysJobLogRestController extends AbstractBaseController {
...
@@ -261,7 +261,7 @@ public class SysJobLogRestController extends AbstractBaseController {
}
}
private
Result
deleteAll
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
private
Result
deleteAll
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
sysJobLogService
.
delete
(
sysJobLogService
.
get
(
id
));
sysJobLogService
.
delete
(
sysJobLogService
.
get
(
id
));
}
}
...
@@ -290,7 +290,7 @@ public class SysJobLogRestController extends AbstractBaseController {
...
@@ -290,7 +290,7 @@ public class SysJobLogRestController extends AbstractBaseController {
}
}
private
Result
deleteAllByLogic
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
private
Result
deleteAllByLogic
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
sysJobLogService
.
deleteByLogic
(
sysJobLogService
.
get
(
id
));
sysJobLogService
.
deleteByLogic
(
sysJobLogService
.
get
(
id
));
}
}
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/job/rest/SysJobRestController.java
View file @
7fa8137a
...
@@ -261,7 +261,7 @@ public class SysJobRestController extends AbstractBaseController {
...
@@ -261,7 +261,7 @@ public class SysJobRestController extends AbstractBaseController {
}
}
private
Result
deleteAll
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
private
Result
deleteAll
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
sysJobService
.
delete
(
sysJobService
.
get
(
id
));
sysJobService
.
delete
(
sysJobService
.
get
(
id
));
}
}
...
@@ -290,7 +290,7 @@ public class SysJobRestController extends AbstractBaseController {
...
@@ -290,7 +290,7 @@ public class SysJobRestController extends AbstractBaseController {
}
}
private
Result
deleteAllByLogic
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
private
Result
deleteAllByLogic
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
sysJobService
.
deleteByLogic
(
sysJobService
.
get
(
id
));
sysJobService
.
deleteByLogic
(
sysJobService
.
get
(
id
));
}
}
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/job/service/SysJobLogService.java
View file @
7fa8137a
...
@@ -32,7 +32,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -32,7 +32,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
@Autowired
@Autowired
private
RedisUtils
redisUtils
;
private
RedisUtils
redisUtils
;
public
SysJobLog
get
(
String
id
)
{
@Override
public
SysJobLog
get
(
String
id
)
{
//获取数据库数据
//获取数据库数据
SysJobLog
sysJobLog
=
super
.
get
(
id
);
SysJobLog
sysJobLog
=
super
.
get
(
id
);
return
sysJobLog
;
return
sysJobLog
;
...
@@ -41,7 +42,9 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -41,7 +42,9 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
public
SysJobLog
getCache
(
String
id
)
{
public
SysJobLog
getCache
(
String
id
)
{
//获取缓存数据
//获取缓存数据
SysJobLog
sysJobLog
=(
SysJobLog
)
redisUtils
.
get
(
RedisUtils
.
getIdKey
(
SysJobLogService
.
class
.
getName
(),
id
));
SysJobLog
sysJobLog
=(
SysJobLog
)
redisUtils
.
get
(
RedisUtils
.
getIdKey
(
SysJobLogService
.
class
.
getName
(),
id
));
if
(
sysJobLog
!=
null
)
return
sysJobLog
;
if
(
sysJobLog
!=
null
)
{
return
sysJobLog
;
}
//获取数据库数据
//获取数据库数据
sysJobLog
=
super
.
get
(
id
);
sysJobLog
=
super
.
get
(
id
);
//设置缓存数据
//设置缓存数据
...
@@ -49,7 +52,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -49,7 +52,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
return
sysJobLog
;
return
sysJobLog
;
}
}
public
List
<
SysJobLog
>
total
(
SysJobLog
sysJobLog
)
{
@Override
public
List
<
SysJobLog
>
total
(
SysJobLog
sysJobLog
)
{
//获取数据库数据
//获取数据库数据
List
<
SysJobLog
>
sysJobLogList
=
super
.
total
(
sysJobLog
);
List
<
SysJobLog
>
sysJobLogList
=
super
.
total
(
sysJobLog
);
return
sysJobLogList
;
return
sysJobLogList
;
...
@@ -59,7 +63,9 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -59,7 +63,9 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
//获取缓存数据
//获取缓存数据
String
totalKey
=
RedisUtils
.
getTotalKey
(
SysJobLogService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJobLog
));
String
totalKey
=
RedisUtils
.
getTotalKey
(
SysJobLogService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJobLog
));
List
<
SysJobLog
>
sysJobLogList
=(
List
<
SysJobLog
>)
redisUtils
.
get
(
totalKey
);
List
<
SysJobLog
>
sysJobLogList
=(
List
<
SysJobLog
>)
redisUtils
.
get
(
totalKey
);
if
(
sysJobLogList
!=
null
)
return
sysJobLogList
;
if
(
sysJobLogList
!=
null
)
{
return
sysJobLogList
;
}
//获取数据库数据
//获取数据库数据
sysJobLogList
=
super
.
total
(
sysJobLog
);
sysJobLogList
=
super
.
total
(
sysJobLog
);
//设置缓存数据
//设置缓存数据
...
@@ -67,7 +73,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -67,7 +73,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
return
sysJobLogList
;
return
sysJobLogList
;
}
}
public
List
<
SysJobLog
>
findList
(
SysJobLog
sysJobLog
)
{
@Override
public
List
<
SysJobLog
>
findList
(
SysJobLog
sysJobLog
)
{
//获取数据库数据
//获取数据库数据
List
<
SysJobLog
>
sysJobLogList
=
super
.
findList
(
sysJobLog
);
List
<
SysJobLog
>
sysJobLogList
=
super
.
findList
(
sysJobLog
);
//设置缓存数据
//设置缓存数据
...
@@ -78,7 +85,9 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -78,7 +85,9 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
//获取缓存数据
//获取缓存数据
String
findListKey
=
RedisUtils
.
getFindListKey
(
SysJobLogService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJobLog
));
String
findListKey
=
RedisUtils
.
getFindListKey
(
SysJobLogService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJobLog
));
List
<
SysJobLog
>
sysJobLogList
=(
List
<
SysJobLog
>)
redisUtils
.
get
(
findListKey
);
List
<
SysJobLog
>
sysJobLogList
=(
List
<
SysJobLog
>)
redisUtils
.
get
(
findListKey
);
if
(
sysJobLogList
!=
null
)
return
sysJobLogList
;
if
(
sysJobLogList
!=
null
)
{
return
sysJobLogList
;
}
//获取数据库数据
//获取数据库数据
sysJobLogList
=
super
.
findList
(
sysJobLog
);
sysJobLogList
=
super
.
findList
(
sysJobLog
);
//设置缓存数据
//设置缓存数据
...
@@ -89,7 +98,9 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -89,7 +98,9 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
public
SysJobLog
findListFirst
(
SysJobLog
sysJobLog
)
{;
public
SysJobLog
findListFirst
(
SysJobLog
sysJobLog
)
{;
//获取数据库数据
//获取数据库数据
List
<
SysJobLog
>
sysJobLogList
=
super
.
findList
(
sysJobLog
);
List
<
SysJobLog
>
sysJobLogList
=
super
.
findList
(
sysJobLog
);
if
(
sysJobLogList
.
size
()>
0
)
sysJobLog
=
sysJobLogList
.
get
(
0
);
if
(
sysJobLogList
.
size
()>
0
)
{
sysJobLog
=
sysJobLogList
.
get
(
0
);
}
return
sysJobLog
;
return
sysJobLog
;
}
}
...
@@ -97,17 +108,23 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -97,17 +108,23 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
//获取缓存数据
//获取缓存数据
String
findListFirstKey
=
RedisUtils
.
getFindListFirstKey
(
SysJobLogService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJobLog
));
String
findListFirstKey
=
RedisUtils
.
getFindListFirstKey
(
SysJobLogService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJobLog
));
SysJobLog
sysJobLogRedis
=(
SysJobLog
)
redisUtils
.
get
(
findListFirstKey
);
SysJobLog
sysJobLogRedis
=(
SysJobLog
)
redisUtils
.
get
(
findListFirstKey
);
if
(
sysJobLogRedis
!=
null
)
return
sysJobLogRedis
;
if
(
sysJobLogRedis
!=
null
)
{
return
sysJobLogRedis
;
}
//获取数据库数据
//获取数据库数据
List
<
SysJobLog
>
sysJobLogList
=
super
.
findList
(
sysJobLog
);
List
<
SysJobLog
>
sysJobLogList
=
super
.
findList
(
sysJobLog
);
if
(
sysJobLogList
.
size
()>
0
)
sysJobLog
=
sysJobLogList
.
get
(
0
);
if
(
sysJobLogList
.
size
()>
0
)
{
else
sysJobLog
=
new
SysJobLog
();
sysJobLog
=
sysJobLogList
.
get
(
0
);
}
else
{
sysJobLog
=
new
SysJobLog
();
}
//设置缓存数据
//设置缓存数据
redisUtils
.
set
(
findListFirstKey
,
sysJobLog
);
redisUtils
.
set
(
findListFirstKey
,
sysJobLog
);
return
sysJobLog
;
return
sysJobLog
;
}
}
public
Page
<
SysJobLog
>
findPage
(
Page
<
SysJobLog
>
page
,
SysJobLog
sysJobLog
)
{
@Override
public
Page
<
SysJobLog
>
findPage
(
Page
<
SysJobLog
>
page
,
SysJobLog
sysJobLog
)
{
//获取数据库数据
//获取数据库数据
Page
<
SysJobLog
>
pageReuslt
=
super
.
findPage
(
page
,
sysJobLog
);
Page
<
SysJobLog
>
pageReuslt
=
super
.
findPage
(
page
,
sysJobLog
);
return
pageReuslt
;
return
pageReuslt
;
...
@@ -117,7 +134,9 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -117,7 +134,9 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
//获取缓存数据
//获取缓存数据
String
findPageKey
=
RedisUtils
.
getFindPageKey
(
SysJobLogService
.
class
.
getName
(),
JSON
.
toJSONString
(
page
)+
JSON
.
toJSONString
(
sysJobLog
));
String
findPageKey
=
RedisUtils
.
getFindPageKey
(
SysJobLogService
.
class
.
getName
(),
JSON
.
toJSONString
(
page
)+
JSON
.
toJSONString
(
sysJobLog
));
Page
<
SysJobLog
>
pageReuslt
=(
Page
<
SysJobLog
>)
redisUtils
.
get
(
findPageKey
);
Page
<
SysJobLog
>
pageReuslt
=(
Page
<
SysJobLog
>)
redisUtils
.
get
(
findPageKey
);
if
(
pageReuslt
!=
null
)
return
pageReuslt
;
if
(
pageReuslt
!=
null
)
{
return
pageReuslt
;
}
//获取数据库数据
//获取数据库数据
pageReuslt
=
super
.
findPage
(
page
,
sysJobLog
);
pageReuslt
=
super
.
findPage
(
page
,
sysJobLog
);
//设置缓存数据
//设置缓存数据
...
@@ -125,7 +144,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -125,7 +144,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
return
pageReuslt
;
return
pageReuslt
;
}
}
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
save
(
SysJobLog
sysJobLog
)
{
public
void
save
(
SysJobLog
sysJobLog
)
{
//保存数据库记录
//保存数据库记录
super
.
save
(
sysJobLog
);
super
.
save
(
sysJobLog
);
...
@@ -136,7 +156,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -136,7 +156,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
redisUtils
.
removePattern
(
RedisUtils
.
getFinPageKeyPattern
(
SysJobLogService
.
class
.
getName
()));
redisUtils
.
removePattern
(
RedisUtils
.
getFinPageKeyPattern
(
SysJobLogService
.
class
.
getName
()));
}
}
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
delete
(
SysJobLog
sysJobLog
)
{
public
void
delete
(
SysJobLog
sysJobLog
)
{
//清除记录缓存数据
//清除记录缓存数据
redisUtils
.
remove
(
RedisUtils
.
getIdKey
(
SysJobLogService
.
class
.
getName
(),
sysJobLog
.
getId
()));
redisUtils
.
remove
(
RedisUtils
.
getIdKey
(
SysJobLogService
.
class
.
getName
(),
sysJobLog
.
getId
()));
...
@@ -147,7 +168,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
...
@@ -147,7 +168,8 @@ public class SysJobLogService extends AbstractBaseService<SysJobLogDao, SysJobLo
redisUtils
.
removePattern
(
RedisUtils
.
getFinPageKeyPattern
(
SysJobLogService
.
class
.
getName
()));
redisUtils
.
removePattern
(
RedisUtils
.
getFinPageKeyPattern
(
SysJobLogService
.
class
.
getName
()));
}
}
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
deleteByLogic
(
SysJobLog
sysJobLog
)
{
public
void
deleteByLogic
(
SysJobLog
sysJobLog
)
{
//清除记录缓存数据
//清除记录缓存数据
redisUtils
.
remove
(
RedisUtils
.
getIdKey
(
SysJobLogService
.
class
.
getName
(),
sysJobLog
.
getId
()));
redisUtils
.
remove
(
RedisUtils
.
getIdKey
(
SysJobLogService
.
class
.
getName
(),
sysJobLog
.
getId
()));
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/job/service/SysJobService.java
View file @
7fa8137a
...
@@ -39,7 +39,8 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -39,7 +39,8 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
@Autowired
@Autowired
private
RedisUtils
redisUtils
;
private
RedisUtils
redisUtils
;
public
SysJob
get
(
String
id
)
{
@Override
public
SysJob
get
(
String
id
)
{
//获取数据库数据
//获取数据库数据
SysJob
sysJob
=
super
.
get
(
id
);
SysJob
sysJob
=
super
.
get
(
id
);
return
sysJob
;
return
sysJob
;
...
@@ -48,7 +49,9 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -48,7 +49,9 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
public
SysJob
getCache
(
String
id
)
{
public
SysJob
getCache
(
String
id
)
{
//获取缓存数据
//获取缓存数据
SysJob
sysJob
=(
SysJob
)
redisUtils
.
get
(
RedisUtils
.
getIdKey
(
SysJobService
.
class
.
getName
(),
id
));
SysJob
sysJob
=(
SysJob
)
redisUtils
.
get
(
RedisUtils
.
getIdKey
(
SysJobService
.
class
.
getName
(),
id
));
if
(
sysJob
!=
null
)
return
sysJob
;
if
(
sysJob
!=
null
)
{
return
sysJob
;
}
//获取数据库数据
//获取数据库数据
sysJob
=
super
.
get
(
id
);
sysJob
=
super
.
get
(
id
);
//设置缓存数据
//设置缓存数据
...
@@ -56,7 +59,8 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -56,7 +59,8 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
return
sysJob
;
return
sysJob
;
}
}
public
List
<
SysJob
>
total
(
SysJob
sysJob
)
{
@Override
public
List
<
SysJob
>
total
(
SysJob
sysJob
)
{
//获取数据库数据
//获取数据库数据
List
<
SysJob
>
sysJobList
=
super
.
total
(
sysJob
);
List
<
SysJob
>
sysJobList
=
super
.
total
(
sysJob
);
return
sysJobList
;
return
sysJobList
;
...
@@ -66,7 +70,9 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -66,7 +70,9 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
//获取缓存数据
//获取缓存数据
String
totalKey
=
RedisUtils
.
getTotalKey
(
SysJobService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJob
));
String
totalKey
=
RedisUtils
.
getTotalKey
(
SysJobService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJob
));
List
<
SysJob
>
sysJobList
=(
List
<
SysJob
>)
redisUtils
.
get
(
totalKey
);
List
<
SysJob
>
sysJobList
=(
List
<
SysJob
>)
redisUtils
.
get
(
totalKey
);
if
(
sysJobList
!=
null
)
return
sysJobList
;
if
(
sysJobList
!=
null
)
{
return
sysJobList
;
}
//获取数据库数据
//获取数据库数据
sysJobList
=
super
.
total
(
sysJob
);
sysJobList
=
super
.
total
(
sysJob
);
//设置缓存数据
//设置缓存数据
...
@@ -74,7 +80,8 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -74,7 +80,8 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
return
sysJobList
;
return
sysJobList
;
}
}
public
List
<
SysJob
>
findList
(
SysJob
sysJob
)
{
@Override
public
List
<
SysJob
>
findList
(
SysJob
sysJob
)
{
//获取数据库数据
//获取数据库数据
List
<
SysJob
>
sysJobList
=
super
.
findList
(
sysJob
);
List
<
SysJob
>
sysJobList
=
super
.
findList
(
sysJob
);
//设置缓存数据
//设置缓存数据
...
@@ -85,7 +92,9 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -85,7 +92,9 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
//获取缓存数据
//获取缓存数据
String
findListKey
=
RedisUtils
.
getFindListKey
(
SysJobService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJob
));
String
findListKey
=
RedisUtils
.
getFindListKey
(
SysJobService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJob
));
List
<
SysJob
>
sysJobList
=(
List
<
SysJob
>)
redisUtils
.
get
(
findListKey
);
List
<
SysJob
>
sysJobList
=(
List
<
SysJob
>)
redisUtils
.
get
(
findListKey
);
if
(
sysJobList
!=
null
)
return
sysJobList
;
if
(
sysJobList
!=
null
)
{
return
sysJobList
;
}
//获取数据库数据
//获取数据库数据
sysJobList
=
super
.
findList
(
sysJob
);
sysJobList
=
super
.
findList
(
sysJob
);
//设置缓存数据
//设置缓存数据
...
@@ -96,7 +105,9 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -96,7 +105,9 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
public
SysJob
findListFirst
(
SysJob
sysJob
)
{;
public
SysJob
findListFirst
(
SysJob
sysJob
)
{;
//获取数据库数据
//获取数据库数据
List
<
SysJob
>
sysJobList
=
super
.
findList
(
sysJob
);
List
<
SysJob
>
sysJobList
=
super
.
findList
(
sysJob
);
if
(
sysJobList
.
size
()>
0
)
sysJob
=
sysJobList
.
get
(
0
);
if
(
sysJobList
.
size
()>
0
)
{
sysJob
=
sysJobList
.
get
(
0
);
}
return
sysJob
;
return
sysJob
;
}
}
...
@@ -104,17 +115,23 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -104,17 +115,23 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
//获取缓存数据
//获取缓存数据
String
findListFirstKey
=
RedisUtils
.
getFindListFirstKey
(
SysJobService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJob
));
String
findListFirstKey
=
RedisUtils
.
getFindListFirstKey
(
SysJobService
.
class
.
getName
(),
JSON
.
toJSONString
(
sysJob
));
SysJob
sysJobRedis
=(
SysJob
)
redisUtils
.
get
(
findListFirstKey
);
SysJob
sysJobRedis
=(
SysJob
)
redisUtils
.
get
(
findListFirstKey
);
if
(
sysJobRedis
!=
null
)
return
sysJobRedis
;
if
(
sysJobRedis
!=
null
)
{
return
sysJobRedis
;
}
//获取数据库数据
//获取数据库数据
List
<
SysJob
>
sysJobList
=
super
.
findList
(
sysJob
);
List
<
SysJob
>
sysJobList
=
super
.
findList
(
sysJob
);
if
(
sysJobList
.
size
()>
0
)
sysJob
=
sysJobList
.
get
(
0
);
if
(
sysJobList
.
size
()>
0
)
{
else
sysJob
=
new
SysJob
();
sysJob
=
sysJobList
.
get
(
0
);
}
else
{
sysJob
=
new
SysJob
();
}
//设置缓存数据
//设置缓存数据
redisUtils
.
set
(
findListFirstKey
,
sysJob
);
redisUtils
.
set
(
findListFirstKey
,
sysJob
);
return
sysJob
;
return
sysJob
;
}
}
public
Page
<
SysJob
>
findPage
(
Page
<
SysJob
>
page
,
SysJob
sysJob
)
{
@Override
public
Page
<
SysJob
>
findPage
(
Page
<
SysJob
>
page
,
SysJob
sysJob
)
{
//获取数据库数据
//获取数据库数据
Page
<
SysJob
>
pageReuslt
=
super
.
findPage
(
page
,
sysJob
);
Page
<
SysJob
>
pageReuslt
=
super
.
findPage
(
page
,
sysJob
);
return
pageReuslt
;
return
pageReuslt
;
...
@@ -124,7 +141,9 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -124,7 +141,9 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
//获取缓存数据
//获取缓存数据
String
findPageKey
=
RedisUtils
.
getFindPageKey
(
SysJobService
.
class
.
getName
(),
JSON
.
toJSONString
(
page
)+
JSON
.
toJSONString
(
sysJob
));
String
findPageKey
=
RedisUtils
.
getFindPageKey
(
SysJobService
.
class
.
getName
(),
JSON
.
toJSONString
(
page
)+
JSON
.
toJSONString
(
sysJob
));
Page
<
SysJob
>
pageReuslt
=(
Page
<
SysJob
>)
redisUtils
.
get
(
findPageKey
);
Page
<
SysJob
>
pageReuslt
=(
Page
<
SysJob
>)
redisUtils
.
get
(
findPageKey
);
if
(
pageReuslt
!=
null
)
return
pageReuslt
;
if
(
pageReuslt
!=
null
)
{
return
pageReuslt
;
}
//获取数据库数据
//获取数据库数据
pageReuslt
=
super
.
findPage
(
page
,
sysJob
);
pageReuslt
=
super
.
findPage
(
page
,
sysJob
);
//设置缓存数据
//设置缓存数据
...
@@ -132,16 +151,19 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -132,16 +151,19 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
return
pageReuslt
;
return
pageReuslt
;
}
}
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
save
(
SysJob
sysJob
)
{
public
void
save
(
SysJob
sysJob
)
{
if
(
sysJob
.
getIsNewRecord
())
if
(
sysJob
.
getIsNewRecord
())
{
sysJob
.
setStatus
(
ScheduleConstants
.
Status
.
PAUSE
.
getValue
());
sysJob
.
setStatus
(
ScheduleConstants
.
Status
.
PAUSE
.
getValue
());
}
//保存数据库记录
//保存数据库记录
super
.
save
(
sysJob
);
super
.
save
(
sysJob
);
if
(
sysJob
.
getIsNewRecord
())
if
(
sysJob
.
getIsNewRecord
())
{
ScheduleUtils
.
createScheduleJob
(
scheduler
,
sysJob
);
ScheduleUtils
.
createScheduleJob
(
scheduler
,
sysJob
);
else
}
else
{
ScheduleUtils
.
updateScheduleJob
(
scheduler
,
sysJob
);
ScheduleUtils
.
updateScheduleJob
(
scheduler
,
sysJob
);
}
/*if (ScheduleConstants.Status.NORMAL.getValue().equals(sysJob.getStatus()))
/*if (ScheduleConstants.Status.NORMAL.getValue().equals(sysJob.getStatus()))
{
{
...
@@ -159,7 +181,8 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -159,7 +181,8 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
redisUtils
.
removePattern
(
RedisUtils
.
getFinPageKeyPattern
(
SysJobService
.
class
.
getName
()));
redisUtils
.
removePattern
(
RedisUtils
.
getFinPageKeyPattern
(
SysJobService
.
class
.
getName
()));
}
}
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
delete
(
SysJob
sysJob
)
{
public
void
delete
(
SysJob
sysJob
)
{
//清除记录缓存数据
//清除记录缓存数据
redisUtils
.
remove
(
RedisUtils
.
getIdKey
(
SysJobService
.
class
.
getName
(),
sysJob
.
getId
()));
redisUtils
.
remove
(
RedisUtils
.
getIdKey
(
SysJobService
.
class
.
getName
(),
sysJob
.
getId
()));
...
@@ -171,7 +194,8 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
...
@@ -171,7 +194,8 @@ public class SysJobService extends AbstractBaseService<SysJobDao, SysJob> {
redisUtils
.
removePattern
(
RedisUtils
.
getFinPageKeyPattern
(
SysJobService
.
class
.
getName
()));
redisUtils
.
removePattern
(
RedisUtils
.
getFinPageKeyPattern
(
SysJobService
.
class
.
getName
()));
}
}
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
deleteByLogic
(
SysJob
sysJob
)
{
public
void
deleteByLogic
(
SysJob
sysJob
)
{
//清除记录缓存数据
//清除记录缓存数据
redisUtils
.
remove
(
RedisUtils
.
getIdKey
(
SysJobService
.
class
.
getName
(),
sysJob
.
getId
()));
redisUtils
.
remove
(
RedisUtils
.
getIdKey
(
SysJobService
.
class
.
getName
(),
sysJob
.
getId
()));
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/job/task/JeeSpringTask.java
View file @
7fa8137a
...
@@ -66,7 +66,7 @@ public class JeeSpringTask
...
@@ -66,7 +66,7 @@ public class JeeSpringTask
String
message
=
""
;
String
message
=
""
;
for
(
SysServer
item:
sysServers
){
for
(
SysServer
item:
sysServers
){
item
.
getServerAddress
();
item
.
getServerAddress
();
if
(
HttpRequest
.
sendGet
(
item
.
getServerAddress
(),
""
)
.
equals
(
"Down"
)){
if
(
"Down"
.
equals
(
HttpRequest
.
sendGet
(
item
.
getServerAddress
(),
""
))){
sysServersBug
.
add
(
item
);
sysServersBug
.
add
(
item
);
message
=
message
+
item
.
getName
()+
" "
+
item
.
getServerAddress
()+
" Down;<br>"
;
message
=
message
+
item
.
getName
()+
" "
+
item
.
getServerAddress
()+
" Down;<br>"
;
item
.
setStatus
(
"off_line"
);
item
.
setStatus
(
"off_line"
);
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/job/web/SysJobController.java
View file @
7fa8137a
...
@@ -159,8 +159,9 @@ public class SysJobController extends AbstractBaseController {
...
@@ -159,8 +159,9 @@ public class SysJobController extends AbstractBaseController {
public
String
form
(
SysJob
sysJob
,
Model
model
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
form
(
SysJob
sysJob
,
Model
model
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
model
.
addAttribute
(
"action"
,
request
.
getParameter
(
"action"
));
model
.
addAttribute
(
"action"
,
request
.
getParameter
(
"action"
));
model
.
addAttribute
(
"sysJob"
,
sysJob
);
model
.
addAttribute
(
"sysJob"
,
sysJob
);
if
(
request
.
getParameter
(
"ViewFormType"
)!=
null
&&
request
.
getParameter
(
"ViewFormType"
).
equals
(
"FormTwo"
))
if
(
request
.
getParameter
(
"ViewFormType"
)!=
null
&&
"FormTwo"
.
equals
(
request
.
getParameter
(
"ViewFormType"
)))
{
return
"modules/job/sysJobFormTwo"
;
return
"modules/job/sysJobFormTwo"
;
}
return
"modules/job/sysJobForm"
;
return
"modules/job/sysJobForm"
;
}
}
...
@@ -247,7 +248,7 @@ public class SysJobController extends AbstractBaseController {
...
@@ -247,7 +248,7 @@ public class SysJobController extends AbstractBaseController {
addMessage
(
redirectAttributes
,
sysConfigService
.
isDemoModeDescription
());
addMessage
(
redirectAttributes
,
sysConfigService
.
isDemoModeDescription
());
return
"redirect:"
+
adminPath
+
"/job/sysJob/?repage"
;
return
"redirect:"
+
adminPath
+
"/job/sysJob/?repage"
;
}
}
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
sysJobService
.
delete
(
sysJobService
.
get
(
id
));
sysJobService
.
delete
(
sysJobService
.
get
(
id
));
}
}
...
@@ -265,7 +266,7 @@ public class SysJobController extends AbstractBaseController {
...
@@ -265,7 +266,7 @@ public class SysJobController extends AbstractBaseController {
addMessage
(
redirectAttributes
,
sysConfigService
.
isDemoModeDescription
());
addMessage
(
redirectAttributes
,
sysConfigService
.
isDemoModeDescription
());
return
"redirect:"
+
adminPath
+
"/job/sysJob/?repage"
;
return
"redirect:"
+
adminPath
+
"/job/sysJob/?repage"
;
}
}
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
sysJobService
.
deleteByLogic
(
sysJobService
.
get
(
id
));
sysJobService
.
deleteByLogic
(
sysJobService
.
get
(
id
));
}
}
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/job/web/SysJobLogController.java
View file @
7fa8137a
...
@@ -162,8 +162,9 @@ public class SysJobLogController extends AbstractBaseController {
...
@@ -162,8 +162,9 @@ public class SysJobLogController extends AbstractBaseController {
public
String
form
(
SysJobLog
sysJobLog
,
Model
model
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
form
(
SysJobLog
sysJobLog
,
Model
model
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
model
.
addAttribute
(
"action"
,
request
.
getParameter
(
"action"
));
model
.
addAttribute
(
"action"
,
request
.
getParameter
(
"action"
));
model
.
addAttribute
(
"sysJobLog"
,
sysJobLog
);
model
.
addAttribute
(
"sysJobLog"
,
sysJobLog
);
if
(
request
.
getParameter
(
"ViewFormType"
)!=
null
&&
request
.
getParameter
(
"ViewFormType"
).
equals
(
"FormTwo"
))
if
(
request
.
getParameter
(
"ViewFormType"
)!=
null
&&
"FormTwo"
.
equals
(
request
.
getParameter
(
"ViewFormType"
)))
{
return
"modules/job/sysJobLogFormTwo"
;
return
"modules/job/sysJobLogFormTwo"
;
}
return
"modules/job/sysJobLogForm"
;
return
"modules/job/sysJobLogForm"
;
}
}
...
@@ -225,7 +226,7 @@ public class SysJobLogController extends AbstractBaseController {
...
@@ -225,7 +226,7 @@ public class SysJobLogController extends AbstractBaseController {
addMessage
(
redirectAttributes
,
sysConfigService
.
isDemoModeDescription
());
addMessage
(
redirectAttributes
,
sysConfigService
.
isDemoModeDescription
());
return
"redirect:"
+
adminPath
+
"/job/sysJobLog/?repage"
;
return
"redirect:"
+
adminPath
+
"/job/sysJobLog/?repage"
;
}
}
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
sysJobLogService
.
delete
(
sysJobLogService
.
get
(
id
));
sysJobLogService
.
delete
(
sysJobLogService
.
get
(
id
));
}
}
...
@@ -243,7 +244,7 @@ public class SysJobLogController extends AbstractBaseController {
...
@@ -243,7 +244,7 @@ public class SysJobLogController extends AbstractBaseController {
addMessage
(
redirectAttributes
,
sysConfigService
.
isDemoModeDescription
());
addMessage
(
redirectAttributes
,
sysConfigService
.
isDemoModeDescription
());
return
"redirect:"
+
adminPath
+
"/job/sysJobLog/?repage"
;
return
"redirect:"
+
adminPath
+
"/job/sysJobLog/?repage"
;
}
}
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
sysJobLogService
.
deleteByLogic
(
sysJobLogService
.
get
(
id
));
sysJobLogService
.
deleteByLogic
(
sysJobLogService
.
get
(
id
));
}
}
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/monitor/service/MonitorService.java
View file @
7fa8137a
...
@@ -22,24 +22,29 @@ import com.jeespring.modules.monitor.dao.MonitorDao;
...
@@ -22,24 +22,29 @@ import com.jeespring.modules.monitor.dao.MonitorDao;
@Transactional
(
readOnly
=
true
)
@Transactional
(
readOnly
=
true
)
public
class
MonitorService
extends
AbstractBaseService
<
MonitorDao
,
Monitor
>
{
public
class
MonitorService
extends
AbstractBaseService
<
MonitorDao
,
Monitor
>
{
public
Monitor
get
(
String
id
)
{
@Override
public
Monitor
get
(
String
id
)
{
return
super
.
get
(
id
);
return
super
.
get
(
id
);
}
}
public
List
<
Monitor
>
findList
(
Monitor
monitor
)
{
@Override
public
List
<
Monitor
>
findList
(
Monitor
monitor
)
{
return
super
.
findList
(
monitor
);
return
super
.
findList
(
monitor
);
}
}
public
Page
<
Monitor
>
findPage
(
Page
<
Monitor
>
page
,
Monitor
monitor
)
{
@Override
public
Page
<
Monitor
>
findPage
(
Page
<
Monitor
>
page
,
Monitor
monitor
)
{
return
super
.
findPage
(
page
,
monitor
);
return
super
.
findPage
(
page
,
monitor
);
}
}
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
save
(
Monitor
monitor
)
{
public
void
save
(
Monitor
monitor
)
{
super
.
save
(
monitor
);
super
.
save
(
monitor
);
}
}
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
delete
(
Monitor
monitor
)
{
public
void
delete
(
Monitor
monitor
)
{
super
.
delete
(
monitor
);
super
.
delete
(
monitor
);
}
}
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/monitor/utils/Common.java
View file @
7fa8137a
...
@@ -424,8 +424,9 @@ public class Common {
...
@@ -424,8 +424,9 @@ public class Common {
* @version 1.0
* @version 1.0
*/
*/
public
static
<
T
extends
Object
>
T
flushObject
(
T
t
,
Map
<
String
,
Object
>
params
)
{
public
static
<
T
extends
Object
>
T
flushObject
(
T
t
,
Map
<
String
,
Object
>
params
)
{
if
(
params
==
null
||
t
==
null
)
if
(
params
==
null
||
t
==
null
)
{
return
t
;
return
t
;
}
Class
<?>
clazz
=
t
.
getClass
();
Class
<?>
clazz
=
t
.
getClass
();
for
(;
clazz
!=
Object
.
class
;
clazz
=
clazz
.
getSuperclass
())
{
for
(;
clazz
!=
Object
.
class
;
clazz
=
clazz
.
getSuperclass
())
{
...
@@ -459,8 +460,9 @@ public class Common {
...
@@ -459,8 +460,9 @@ public class Common {
* @version 1.0
* @version 1.0
*/
*/
public
static
String
htmltoString
(
String
content
)
{
public
static
String
htmltoString
(
String
content
)
{
if
(
content
==
null
)
if
(
content
==
null
)
{
return
""
;
return
""
;
}
String
html
=
content
;
String
html
=
content
;
html
=
html
.
replace
(
"'"
,
"'"
);
html
=
html
.
replace
(
"'"
,
"'"
);
html
=
html
.
replaceAll
(
"&"
,
"&"
);
html
=
html
.
replaceAll
(
"&"
,
"&"
);
...
@@ -484,8 +486,9 @@ public class Common {
...
@@ -484,8 +486,9 @@ public class Common {
* @version 1.0
* @version 1.0
*/
*/
public
static
String
stringtohtml
(
String
content
)
{
public
static
String
stringtohtml
(
String
content
)
{
if
(
content
==
null
)
if
(
content
==
null
)
{
return
""
;
return
""
;
}
String
html
=
content
;
String
html
=
content
;
html
=
html
.
replace
(
"'"
,
"'"
);
html
=
html
.
replace
(
"'"
,
"'"
);
html
=
html
.
replaceAll
(
"&"
,
"&"
);
html
=
html
.
replaceAll
(
"&"
,
"&"
);
...
@@ -620,6 +623,7 @@ public class Common {
...
@@ -620,6 +623,7 @@ public class Common {
// 如果存在 就获取包下的所有文件 包括目录
// 如果存在 就获取包下的所有文件 包括目录
File
[]
dirfiles
=
dir
.
listFiles
(
new
FileFilter
()
{
File
[]
dirfiles
=
dir
.
listFiles
(
new
FileFilter
()
{
// 自定义过滤规则 如果可以循环(包含子目录) 或则是以.class结尾的文件(编译好的java类文件)
// 自定义过滤规则 如果可以循环(包含子目录) 或则是以.class结尾的文件(编译好的java类文件)
@Override
public
boolean
accept
(
File
file
)
{
public
boolean
accept
(
File
file
)
{
return
(
recursive
&&
file
.
isDirectory
())
||
(
file
.
getName
().
endsWith
(
".class"
));
return
(
recursive
&&
file
.
isDirectory
())
||
(
file
.
getName
().
endsWith
(
".class"
));
}
}
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/monitor/utils/SystemInfo.java
View file @
7fa8137a
...
@@ -108,7 +108,7 @@ public class SystemInfo {
...
@@ -108,7 +108,7 @@ public class SystemInfo {
public
static
List
<
Map
>
cpuInfos
(
Sigar
sigar
)
{
public
static
List
<
Map
>
cpuInfos
(
Sigar
sigar
)
{
List
<
Map
>
monitorMaps
=
new
ArrayList
<
Map
>();
List
<
Map
>
monitorMaps
=
new
ArrayList
<
Map
>();
try
{
try
{
CpuPerc
cpuList
[]
=
sigar
.
getCpuPercList
();
CpuPerc
[]
cpuList
=
sigar
.
getCpuPercList
();
for
(
CpuPerc
cpuPerc
:
cpuList
)
{
for
(
CpuPerc
cpuPerc
:
cpuList
)
{
Map
<
String
,
Comparable
>
monitorMap
=
new
HashMap
();
Map
<
String
,
Comparable
>
monitorMap
=
new
HashMap
();
monitorMap
.
put
(
"cpuUserUse"
,
Math
.
round
(
cpuPerc
.
getUser
()*
100
));
// 用户使用率
monitorMap
.
put
(
"cpuUserUse"
,
Math
.
round
(
cpuPerc
.
getUser
()*
100
));
// 用户使用率
...
@@ -125,7 +125,7 @@ public class SystemInfo {
...
@@ -125,7 +125,7 @@ public class SystemInfo {
public
List
<
Map
>
diskInfos
(
Sigar
sigar
)
throws
Exception
{
public
List
<
Map
>
diskInfos
(
Sigar
sigar
)
throws
Exception
{
List
<
Map
>
monitorMaps
=
new
ArrayList
<
Map
>();
List
<
Map
>
monitorMaps
=
new
ArrayList
<
Map
>();
FileSystem
fslist
[]
=
sigar
.
getFileSystemList
();
FileSystem
[]
fslist
=
sigar
.
getFileSystemList
();
for
(
int
i
=
0
;
i
<
fslist
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
fslist
.
length
;
i
++)
{
Map
<
Object
,
Object
>
monitorMap
=
new
HashMap
();
Map
<
Object
,
Object
>
monitorMap
=
new
HashMap
();
FileSystem
fs
=
fslist
[
i
];
FileSystem
fs
=
fslist
[
i
];
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/mvvmoa/service/FormLeavemService.java
View file @
7fa8137a
...
@@ -22,24 +22,29 @@ import com.jeespring.modules.mvvmoa.dao.FormLeavemDao;
...
@@ -22,24 +22,29 @@ import com.jeespring.modules.mvvmoa.dao.FormLeavemDao;
@Transactional
(
readOnly
=
true
)
@Transactional
(
readOnly
=
true
)
public
class
FormLeavemService
extends
AbstractBaseService
<
FormLeavemDao
,
FormLeavem
>
{
public
class
FormLeavemService
extends
AbstractBaseService
<
FormLeavemDao
,
FormLeavem
>
{
public
FormLeavem
get
(
String
id
)
{
@Override
public
FormLeavem
get
(
String
id
)
{
return
super
.
get
(
id
);
return
super
.
get
(
id
);
}
}
public
List
<
FormLeavem
>
findList
(
FormLeavem
formLeavem
)
{
@Override
public
List
<
FormLeavem
>
findList
(
FormLeavem
formLeavem
)
{
return
super
.
findList
(
formLeavem
);
return
super
.
findList
(
formLeavem
);
}
}
public
Page
<
FormLeavem
>
findPage
(
Page
<
FormLeavem
>
page
,
FormLeavem
formLeavem
)
{
@Override
public
Page
<
FormLeavem
>
findPage
(
Page
<
FormLeavem
>
page
,
FormLeavem
formLeavem
)
{
return
super
.
findPage
(
page
,
formLeavem
);
return
super
.
findPage
(
page
,
formLeavem
);
}
}
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
save
(
FormLeavem
formLeavem
)
{
public
void
save
(
FormLeavem
formLeavem
)
{
super
.
save
(
formLeavem
);
super
.
save
(
formLeavem
);
}
}
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
delete
(
FormLeavem
formLeavem
)
{
public
void
delete
(
FormLeavem
formLeavem
)
{
super
.
delete
(
formLeavem
);
super
.
delete
(
formLeavem
);
}
}
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/mvvmoa/web/FormLeavemController.java
View file @
7fa8137a
...
@@ -145,7 +145,7 @@ public class FormLeavemController extends AbstractBaseController {
...
@@ -145,7 +145,7 @@ public class FormLeavemController extends AbstractBaseController {
//RequiresPermissions("mvvmoa:formLeavem:del")
//RequiresPermissions("mvvmoa:formLeavem:del")
@RequestMapping
(
value
=
"deleteAll"
)
@RequestMapping
(
value
=
"deleteAll"
)
public
String
deleteAll
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
public
String
deleteAll
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
for
(
String
id
:
idArray
){
for
(
String
id
:
idArray
){
formLeavemService
.
delete
(
formLeavemService
.
get
(
id
));
formLeavemService
.
delete
(
formLeavemService
.
get
(
id
));
}
}
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/oa/dao/TestAuditDao.java
View file @
7fa8137a
/**
/**
* Copyright © 2012-2016 <a href="https://git
hub
.com/
thinkgem/jeesite
">JeeS
ite
</a> All rights reserved.
* Copyright © 2012-2016 <a href="https://git
ee
.com/
JeeHuangBingGui/jeeSpringCloud
">JeeS
pring
</a> All rights reserved.
*/
*/
package
com.jeespring.modules.oa.dao
;
package
com.jeespring.modules.oa.dao
;
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/oa/entity/TestAudit.java
View file @
7fa8137a
/**
/**
* Copyright © 2012-2016 <a href="https://git
hub
.com/
thinkgem/jeesite
">JeeS
ite
</a> All rights reserved.
* Copyright © 2012-2016 <a href="https://git
ee
.com/
JeeHuangBingGui/jeeSpringCloud
">JeeS
pring
</a> All rights reserved.
*/
*/
package
com.jeespring.modules.oa.entity
;
package
com.jeespring.modules.oa.entity
;
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/oa/service/OaNotifyService.java
View file @
7fa8137a
...
@@ -28,7 +28,8 @@ public class OaNotifyService extends AbstractBaseService<OaNotifyDao, OaNotify>
...
@@ -28,7 +28,8 @@ public class OaNotifyService extends AbstractBaseService<OaNotifyDao, OaNotify>
@Autowired
@Autowired
private
OaNotifyRecordDao
oaNotifyRecordDao
;
private
OaNotifyRecordDao
oaNotifyRecordDao
;
public
OaNotify
get
(
String
id
)
{
@Override
public
OaNotify
get
(
String
id
)
{
OaNotify
entity
=
dao
.
get
(
id
);
OaNotify
entity
=
dao
.
get
(
id
);
return
entity
;
return
entity
;
}
}
...
@@ -58,7 +59,8 @@ public class OaNotifyService extends AbstractBaseService<OaNotifyDao, OaNotify>
...
@@ -58,7 +59,8 @@ public class OaNotifyService extends AbstractBaseService<OaNotifyDao, OaNotify>
return
dao
.
findCount
(
oaNotify
);
return
dao
.
findCount
(
oaNotify
);
}
}
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
save
(
OaNotify
oaNotify
)
{
public
void
save
(
OaNotify
oaNotify
)
{
super
.
save
(
oaNotify
);
super
.
save
(
oaNotify
);
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/oa/service/TestAuditService.java
View file @
7fa8137a
/**
/**
* Copyright © 2012-2016 <a href="https://git
hub
.com/
thinkgem/jeesite
">JeeS
ite
</a> All rights reserved.
* Copyright © 2012-2016 <a href="https://git
ee
.com/
JeeHuangBingGui/jeeSpringCloud
">JeeS
pring
</a> All rights reserved.
*/
*/
package
com.jeespring.modules.oa.service
;
package
com.jeespring.modules.oa.service
;
...
@@ -34,7 +34,8 @@ public class TestAuditService extends AbstractBaseService<TestAuditDao, TestAudi
...
@@ -34,7 +34,8 @@ public class TestAuditService extends AbstractBaseService<TestAuditDao, TestAudi
return
dao
.
getByProcInsId
(
procInsId
);
return
dao
.
getByProcInsId
(
procInsId
);
}
}
public
Page
<
TestAudit
>
findPage
(
Page
<
TestAudit
>
page
,
TestAudit
testAudit
)
{
@Override
public
Page
<
TestAudit
>
findPage
(
Page
<
TestAudit
>
page
,
TestAudit
testAudit
)
{
testAudit
.
setPage
(
page
);
testAudit
.
setPage
(
page
);
page
.
setList
(
dao
.
findList
(
testAudit
));
page
.
setList
(
dao
.
findList
(
testAudit
));
return
page
;
return
page
;
...
@@ -44,7 +45,8 @@ public class TestAuditService extends AbstractBaseService<TestAuditDao, TestAudi
...
@@ -44,7 +45,8 @@ public class TestAuditService extends AbstractBaseService<TestAuditDao, TestAudi
* 审核新增或编辑
* 审核新增或编辑
* @param testAudit
* @param testAudit
*/
*/
@Transactional
(
readOnly
=
false
)
@Override
@Transactional
(
readOnly
=
false
)
public
void
save
(
TestAudit
testAudit
)
{
public
void
save
(
TestAudit
testAudit
)
{
// 申请发起
// 申请发起
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/oa/web/OaNotifyController.java
View file @
7fa8137a
...
@@ -107,9 +107,9 @@ public class OaNotifyController extends AbstractBaseController {
...
@@ -107,9 +107,9 @@ public class OaNotifyController extends AbstractBaseController {
@RequiresPermissions
(
"oa:oaNotify:del"
)
@RequiresPermissions
(
"oa:oaNotify:del"
)
@RequestMapping
(
value
=
"deleteAll"
)
@RequestMapping
(
value
=
"deleteAll"
)
public
String
deleteAll
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
public
String
deleteAll
(
String
ids
,
RedirectAttributes
redirectAttributes
)
{
String
idArray
[]
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
long
successCount
=
0
,
failureCount
=
0
;
long
successCount
=
0
,
failureCount
=
0
;
String
failureMsg
=
""
;
String
failureMsg
=
""
;
...
...
JeeSpringCloud/src/main/java/com/jeespring/modules/oa/web/TestAuditController.java
View file @
7fa8137a
/**
/**
* Copyright © 2012-2016 <a href="https://git
hub
.com/
thinkgem/jeesite
">JeeS
ite
</a> All rights reserved.
* Copyright © 2012-2016 <a href="https://git
ee
.com/
JeeHuangBingGui/jeeSpringCloud
">JeeS
pring
</a> All rights reserved.
*/
*/
package
com.jeespring.modules.oa.web
;
package
com.jeespring.modules.oa.web
;
...
...
Prev
1
2
3
4
5
6
7
8
9
10
11
Next
Write
Preview
Supports
Markdown
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