|
@@ -114,6 +114,9 @@ public class CommunityArticleController extends BaseController {
|
|
|
@Autowired
|
|
|
private RedisCache redisCache;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CommunityReportController communityReportController;
|
|
|
+
|
|
|
private static final String CACHE_PREFIX = "article:list:"; // 缓存前缀
|
|
|
private static final long CACHE_EXPIRE_TIME = 30; // 缓存过期时间(分钟)
|
|
|
@Autowired
|
|
@@ -133,9 +136,6 @@ public class CommunityArticleController extends BaseController {
|
|
|
@Autowired
|
|
|
private CommunityArticleRecommendMapper recommendMapper;
|
|
|
|
|
|
- @Autowired
|
|
|
- private CommunityReportController communityReportController;
|
|
|
-
|
|
|
@Autowired
|
|
|
private SysUserMapper sysUserMapper;
|
|
|
|
|
@@ -199,6 +199,7 @@ public class CommunityArticleController extends BaseController {
|
|
|
String userState = sysUser.getUserState();
|
|
|
Date reportTime = sysUser.getReportTime();
|
|
|
if ("2".equals(userState) && reportTime != null) {
|
|
|
+ communityReportController.adminReportPunish(SecurityUtils.getUserId());
|
|
|
// 获取当前时间
|
|
|
Date currentTime = new Date();
|
|
|
System.out.println(reportTime);
|
|
@@ -438,6 +439,7 @@ public class CommunityArticleController extends BaseController {
|
|
|
String userState = sysUser.getUserState();
|
|
|
Date reportTime = sysUser.getReportTime();
|
|
|
if ("2".equals(userState) && reportTime != null) {
|
|
|
+ communityReportController.adminReportPunish(SecurityUtils.getUserId());
|
|
|
// 获取当前时间
|
|
|
Date currentTime = new Date();
|
|
|
// 检查 reportTime 小于当前时间
|