提交
This commit is contained in:
@@ -104,14 +104,16 @@ public class MsgNotifyTitleController {
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object doSend(String id, String[] sendTypes, String content) {
|
||||
MsgNotify msgNotify = baseService.dao().fetch(MsgNotify.class, id);
|
||||
List<NutMap> msgNotifyUser = msgNotifyService.getMsgNotifyUser(id);
|
||||
List<String> userData = msgNotifyService.userData(msgNotifyUser);
|
||||
msgNotifyService.sendMsg(Arrays.asList(sendTypes), userData, content);
|
||||
msgNotifyUser.forEach(v -> {
|
||||
baseService.dao().update(MsgNotify.class, Chain.make("hold", true).add("sendTime", DateUtil.getDateTime()), Cnd.where("id", "=", v.getString("titleId")));
|
||||
|
||||
});
|
||||
|
||||
if (!msgNotify.isHold()){
|
||||
baseService.dao().update(MsgNotify.class,
|
||||
Chain.make("hold", true)
|
||||
.add("sendTime", DateUtil.getDateTime()),
|
||||
Cnd.where("id", "=", id));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user