概述
public Result<Integer> readUnread(@RequestParam(name="employeeId",required=true) String employeeId) {
Result<Integer> result = new Result<Integer>();
int num = 0;
QueryWrapper<SysAnnouncement> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_ids",employeeId);
queryWrapper.eq("del_flag",AppInfoConstant.READ_0);
queryWrapper.in("titile", "会议信息通知","家属信箱信息通知","请假审批提醒","加班调休审批提醒", "报警提醒");
List<SysAnnouncement> sysAnnouncements = sysAnnouncementService.list(queryWrapper);
for (SysAnnouncement sysAnnouncement : sysAnnouncements) {
//删除通告阅读标记表
QueryWrapper<SysAnnouncementSend> qs = new QueryWrapper<>();
qs.eq("annt_id",sysAnnouncement.getId());
qs.eq("read_flag",AppInfoConstant.READ_0);
List<SysAnnouncementSend> sysAnnouncementSends = sysAnnouncementSendService.list(qs);
if (CollectionUtils.isNotEmpty(sysAnnouncementSends)){
num++;
}
}
***if(num>0) {
result.setResult(num);
result.success("查询成功");
}else {
result.setResult(num);
result.error500("查询失败");
}
return result;***
}
最后
以上就是激情秀发为你收集整理的嵌套返回result ,返回success的全部内容,希望文章能够帮你解决嵌套返回result ,返回success所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复