|
@@ -43,15 +43,15 @@ public class WebServiceImpl implements WebService {
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Result checkMessage(String type) {
|
|
|
- Boolean flag = false;
|
|
|
+ public Result checkMessage() {
|
|
|
+// Boolean flag = false;
|
|
|
|
|
|
Long tokenUserId = getTokenUserId();
|
|
|
|
|
|
// 权限标签
|
|
|
Boolean permFlag = false;
|
|
|
Set<String> permissionKey = sysResourceService.getPermissionByUserId(tokenUserId);
|
|
|
- if (permissionKey.contains("comment:display") || permissionKey.contains("barrage:display")){
|
|
|
+ if (permissionKey.contains("comment:display")){
|
|
|
log.info("该用户有留言权限: {}", tokenUserId);
|
|
|
permFlag = true;
|
|
|
}
|
|
@@ -61,21 +61,21 @@ public class WebServiceImpl implements WebService {
|
|
|
// 2.没有留言、弹幕是否显示权限:不提醒,返回false
|
|
|
// 3.有权限、没有留言: 需要提醒,返回true;
|
|
|
|
|
|
- if ("comment".equals(type)){
|
|
|
- Integer n = commentService.countByUserId(tokenUserId);
|
|
|
- if (n == 0 && permFlag){
|
|
|
- flag = true;
|
|
|
- log.info("留言需要提醒");
|
|
|
- }
|
|
|
- } else {
|
|
|
- Integer n = barrageService.countByUserId(tokenUserId);
|
|
|
- if (n == 0 && permFlag){
|
|
|
- flag = true;
|
|
|
- log.info("弹幕需要提醒");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return Result.success(flag);
|
|
|
+// if ("comment".equals(type)){
|
|
|
+// Integer n = commentService.countByUserId(tokenUserId);
|
|
|
+// if (n == 0 && permFlag){
|
|
|
+// flag = true;
|
|
|
+// log.info("留言需要提醒");
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// Integer n = barrageService.countByUserId(tokenUserId);
|
|
|
+// if (n == 0 && permFlag){
|
|
|
+// flag = true;
|
|
|
+// log.info("弹幕需要提醒");
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
+ return Result.success(permFlag);
|
|
|
}
|
|
|
|
|
|
|