commit
This commit is contained in:
@@ -172,14 +172,14 @@ public class MsgNotifyController {
|
|||||||
msgNotifyUser.setSendUser(ShiroUtil.getUserId());
|
msgNotifyUser.setSendUser(ShiroUtil.getUserId());
|
||||||
msgNotifyUser.setTitle(msgNotify.getTitle());
|
msgNotifyUser.setTitle(msgNotify.getTitle());
|
||||||
msgNotifyUser.setContent(msgNotify.getContent());
|
msgNotifyUser.setContent(msgNotify.getContent());
|
||||||
msgNotifyUser.setLink(msgNotify.getUrl());
|
msgNotifyUser.setLink(msgNotify.getLink());
|
||||||
msgNotifyUser.setApiModule("消息管理系统");
|
msgNotifyUser.setApiModule("消息管理系统");
|
||||||
|
|
||||||
if (msgNotify.getSendMode().equals("one")) {
|
if (msgNotify.getSendMode().equals("one")) {
|
||||||
List<NutMap> list = msgNotifyService.getUserByRoleIds(msgNotify.getModule(), msgNotify.getTeacherMeetingId(), msgNotify.getRoleIds());
|
List<NutMap> list = msgNotifyService.getUserByRoleIds(msgNotify.getModule(), msgNotify.getTeacherMeetingId(), msgNotify.getRoleIds());
|
||||||
if (flag) {
|
if (flag) {
|
||||||
List<String> loginNames = list.stream().map(v -> v.getString("loginName")).toList();
|
List<String> loginNames = list.stream().map(v -> v.getString("loginName")).toList();
|
||||||
msgNotifyService.sendMsg2(msgNotify.getSendTypes(), loginNames, msgNotify.getContent(),msgNotify.getTitle(),msgNotify.getUrl());
|
msgNotifyService.sendMsg2(msgNotify.getSendTypes(), loginNames, msgNotify.getContent(),msgNotify.getTitle(),msgNotify.getLink());
|
||||||
}
|
}
|
||||||
list.forEach(v -> {
|
list.forEach(v -> {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
@@ -196,7 +196,7 @@ public class MsgNotifyController {
|
|||||||
List<NutMap> userScopes = msgNotifyService.getUserScopes(msgNotify.getActivityGroupId());
|
List<NutMap> userScopes = msgNotifyService.getUserScopes(msgNotify.getActivityGroupId());
|
||||||
if (flag) {
|
if (flag) {
|
||||||
List<String> loginNames = userScopes.stream().map(v -> v.getString("loginName")).toList();
|
List<String> loginNames = userScopes.stream().map(v -> v.getString("loginName")).toList();
|
||||||
msgNotifyService.sendMsg2(msgNotify.getSendTypes(), loginNames, msgNotify.getContent(),msgNotify.getTitle(),msgNotify.getUrl());
|
msgNotifyService.sendMsg2(msgNotify.getSendTypes(), loginNames, msgNotify.getContent(),msgNotify.getTitle(),msgNotify.getLink());
|
||||||
}
|
}
|
||||||
userScopes.forEach(v -> {
|
userScopes.forEach(v -> {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
@@ -212,7 +212,7 @@ public class MsgNotifyController {
|
|||||||
if (flag) {
|
if (flag) {
|
||||||
List<User> user = dao.query(User.class, Cnd.where("id", "in", users));
|
List<User> user = dao.query(User.class, Cnd.where("id", "in", users));
|
||||||
List<String> loginNames = user.stream().map(User::getLoginname).toList();
|
List<String> loginNames = user.stream().map(User::getLoginname).toList();
|
||||||
msgNotifyService.sendMsg2(msgNotify.getSendTypes(), loginNames, msgNotify.getContent(),msgNotify.getTitle(),msgNotify.getUrl());
|
msgNotifyService.sendMsg2(msgNotify.getSendTypes(), loginNames, msgNotify.getContent(),msgNotify.getTitle(),msgNotify.getLink());
|
||||||
}
|
}
|
||||||
for (String u : users) {
|
for (String u : users) {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
@@ -229,7 +229,7 @@ public class MsgNotifyController {
|
|||||||
List<String> loginNames = redisService.lrange(existsLoginNameRedisKey, 0, -1);
|
List<String> loginNames = redisService.lrange(existsLoginNameRedisKey, 0, -1);
|
||||||
List<User> userList = dao.query(User.class, Cnd.where("loginname", "in", loginNames));
|
List<User> userList = dao.query(User.class, Cnd.where("loginname", "in", loginNames));
|
||||||
|
|
||||||
msgNotifyService.sendMsg2(msgNotify.getSendTypes(), loginNames, msgNotify.getContent(),msgNotify.getTitle(),msgNotify.getUrl());
|
msgNotifyService.sendMsg2(msgNotify.getSendTypes(), loginNames, msgNotify.getContent(),msgNotify.getTitle(),msgNotify.getLink());
|
||||||
|
|
||||||
msgNotify.setSendTime(DateUtil.getDateTime());
|
msgNotify.setSendTime(DateUtil.getDateTime());
|
||||||
for (User u : userList) {
|
for (User u : userList) {
|
||||||
|
|||||||
Reference in New Issue
Block a user