|
@@ -208,6 +208,7 @@ public class MessageServiceImpl implements MessageService {
|
|
|
Object messageId = jsonObject.get("messageId");
|
|
Object messageId = jsonObject.get("messageId");
|
|
|
Object receiverUu = jsonObject.get("receiverUu");
|
|
Object receiverUu = jsonObject.get("receiverUu");
|
|
|
Object receiverEnuu = jsonObject.get("receiverEnuu");
|
|
Object receiverEnuu = jsonObject.get("receiverEnuu");
|
|
|
|
|
+ Object consumerApp = jsonObject.get("consumerApp");
|
|
|
if (StringUtils.isEmpty(messageId)) {
|
|
if (StringUtils.isEmpty(messageId)) {
|
|
|
throw new ParameterMissingException("消息id为空,请重新确认消息信息");
|
|
throw new ParameterMissingException("消息id为空,请重新确认消息信息");
|
|
|
} else {
|
|
} else {
|
|
@@ -220,7 +221,7 @@ public class MessageServiceImpl implements MessageService {
|
|
|
throw new IllegalOperatorException("消息不存在,请重新确认消息信息");
|
|
throw new IllegalOperatorException("消息不存在,请重新确认消息信息");
|
|
|
}
|
|
}
|
|
|
if (receiverUu == null || StringUtils.isEmpty(String.valueOf(receiverEnuu)) || receiverEnuu == null
|
|
if (receiverUu == null || StringUtils.isEmpty(String.valueOf(receiverEnuu)) || receiverEnuu == null
|
|
|
- || StringUtils.isEmpty(String.valueOf(receiverUu))) {
|
|
|
|
|
|
|
+ || StringUtils.isEmpty(String.valueOf(receiverUu)) || StringUtils.isEmpty(String.valueOf(consumerApp))) {
|
|
|
throw new ParameterMissingException("用户信息为空,无法读取消息");
|
|
throw new ParameterMissingException("用户信息为空,无法读取消息");
|
|
|
}
|
|
}
|
|
|
if (!Long.valueOf(String.valueOf(receiverEnuu)).equals(message.getReceiverEnuu())
|
|
if (!Long.valueOf(String.valueOf(receiverEnuu)).equals(message.getReceiverEnuu())
|
|
@@ -230,6 +231,14 @@ public class MessageServiceImpl implements MessageService {
|
|
|
if (Constant.YES.equals(message.getIsRead())) {
|
|
if (Constant.YES.equals(message.getIsRead())) {
|
|
|
throw new IllegalOperatorException("消息已阅读");
|
|
throw new IllegalOperatorException("消息已阅读");
|
|
|
}
|
|
}
|
|
|
|
|
+ App app = appDao.findByName(String.valueOf(consumerApp));
|
|
|
|
|
+ if (app == null) {
|
|
|
|
|
+ throw new IllegalOperatorException("消费应用不存在,请重新确认用户信息");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!message.getConsumerApp().contains(app)) {
|
|
|
|
|
+ throw new IllegalOperatorException("消息不属于当前应用");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
message.setIsRead(Constant.YES);
|
|
message.setIsRead(Constant.YES);
|
|
|
messages.add(message);
|
|
messages.add(message);
|
|
|
}
|
|
}
|