Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
132 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/main/java/com/qiang/modules/sys/service/impl/ScheduledServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.qiang.modules.sys.service.impl; | ||
|
||
import com.qiang.common.utils.Constant; | ||
import com.qiang.common.utils.RedisOperator; | ||
import com.qiang.modules.sys.dao.IndexDao; | ||
import com.qiang.modules.sys.service.ScheduledService; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.scheduling.annotation.Scheduled; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Propagation; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
/** | ||
* @Author: qiang | ||
* @ProjectName: adminsystem | ||
* @Package: com.qiang.modules.sys.service.impl | ||
* @Description: | ||
* @Date: 2019/8/9 0009 16:35 | ||
**/ | ||
@Service | ||
public class ScheduledServiceImpl implements ScheduledService { | ||
|
||
@Autowired | ||
private IndexDao indexDao; | ||
|
||
@Autowired | ||
private RedisOperator redisOperator; | ||
|
||
/** | ||
* second(秒),minute(分),hour(时),day of month(日),month(月),day of week(周几) | ||
* 0 * * * * MON-FRI | ||
*/ | ||
@Scheduled(cron = "0 0/10 * * * ?") | ||
@Transactional(propagation = Propagation.REQUIRED) | ||
@Override | ||
public void visitorCustom() { | ||
indexDao.updWebVisitorCount((int)redisOperator.get(Constant.BLOG_VISIT_COUNT)); | ||
} | ||
|
||
@Scheduled(cron = "0 5 * * * ?") | ||
@Transactional(propagation = Propagation.REQUIRED) | ||
@Override | ||
public void lookBlog() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,8 @@ | |
} | ||
|
||
.qz-friend li a{ | ||
color: #64308f; | ||
|
||
color: #4e4e4e; | ||
font-size: 15px; | ||
|
||
} | ||
.qz-friend li a:hover{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
|
||
$.ajax({ | ||
type: 'HEAD', // 获取头信息,type=HEAD即可 | ||
url : window.location.href, | ||
async:false, | ||
success:function (data, status, xhr) { | ||
var lastUrl = xhr.getResponseHeader("lastUrl"); | ||
if(lastUrl != null){ | ||
window.location.replace(lastUrl); | ||
} | ||
$.ajax({ | ||
type: 'HEAD', // 获取头信息,type=HEAD即可 | ||
url : window.location.href, | ||
async:false, | ||
success:function (data, status, xhr) { | ||
var lastUrl = xhr.getResponseHeader("lastUrl"); | ||
if(lastUrl != null){ | ||
location.href = lastUrl; | ||
} | ||
}); | ||
} | ||
}); | ||
|
||
// var forward = document.referrer; | ||
// console.log(forward); | ||
// if (forward == "" || forward == undefined || forward == null) { | ||
// location.href = "/"; | ||
// } | ||
// else { | ||
// location.href = "" + forward + ""; | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
</head> | ||
<body> | ||
|
||
</body> | ||
<script src="assets/js/jquery-1.12.4.min.js"></script> | ||
<script src="style/js/lastUrl.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters