Java Code Examples for com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper#set()
The following examples show how to use
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper#set() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SysAnnouncementSendController.java From jeecg-cloud with Apache License 2.0 | 6 votes |
/** * @功能:更新用户系统消息阅读状态 * @param json * @return */ @PutMapping(value = "/editByAnntIdAndUserId") public Result<SysAnnouncementSend> editById(@RequestBody JSONObject json) { Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>(); String anntId = json.getString("anntId"); LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId(); LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where annt_id ='"+anntId+"' and user_id ='"+userId+"'"); SysAnnouncementSend announcementSend = new SysAnnouncementSend(); sysAnnouncementSendService.update(announcementSend, updateWrapper); result.setSuccess(true); return result; }
Example 2
Source File: SysAnnouncementSendController.java From jeecg-cloud with Apache License 2.0 | 6 votes |
/** * @功能:一键已读 * @return */ @PutMapping(value = "/readAll") public Result<SysAnnouncementSend> readAll() { Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>(); LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId(); LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where user_id ='"+userId+"'"); SysAnnouncementSend announcementSend = new SysAnnouncementSend(); sysAnnouncementSendService.update(announcementSend, updateWrapper); result.setSuccess(true); result.setMessage("全部已读"); return result; }
Example 3
Source File: SysAnnouncementSendController.java From jeecg-boot-with-activiti with MIT License | 6 votes |
/** * @功能:更新用户系统消息阅读状态 * @param json * @return */ @PutMapping(value = "/editByAnntIdAndUserId") public Result<SysAnnouncementSend> editById(@RequestBody JSONObject json) { Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>(); String anntId = json.getString("anntId"); LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId(); LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where annt_id ='"+anntId+"' and user_id ='"+userId+"'"); SysAnnouncementSend announcementSend = new SysAnnouncementSend(); sysAnnouncementSendService.update(announcementSend, updateWrapper); result.setSuccess(true); return result; }
Example 4
Source File: SysAnnouncementSendController.java From jeecg-boot-with-activiti with MIT License | 6 votes |
/** * @功能:一键已读 * @return */ @PutMapping(value = "/readAll") public Result<SysAnnouncementSend> readAll() { Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>(); LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId(); LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where user_id ='"+userId+"'"); SysAnnouncementSend announcementSend = new SysAnnouncementSend(); sysAnnouncementSendService.update(announcementSend, updateWrapper); result.setSuccess(true); result.setMessage("全部已读"); return result; }
Example 5
Source File: SysAnnouncementSendController.java From teaching with Apache License 2.0 | 6 votes |
/** * @功能:更新用户系统消息阅读状态 * @param json * @return */ @PutMapping(value = "/editByAnntIdAndUserId") public Result<SysAnnouncementSend> editById(@RequestBody JSONObject json) { Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>(); String anntId = json.getString("anntId"); LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId(); LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where annt_id ='"+anntId+"' and user_id ='"+userId+"'"); SysAnnouncementSend announcementSend = new SysAnnouncementSend(); sysAnnouncementSendService.update(announcementSend, updateWrapper); result.setSuccess(true); return result; }
Example 6
Source File: SysAnnouncementSendController.java From teaching with Apache License 2.0 | 6 votes |
/** * @功能:一键已读 * @return */ @PutMapping(value = "/readAll") public Result<SysAnnouncementSend> readAll() { Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>(); LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId(); LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where user_id ='"+userId+"'"); SysAnnouncementSend announcementSend = new SysAnnouncementSend(); sysAnnouncementSendService.update(announcementSend, updateWrapper); result.setSuccess(true); result.setMessage("全部已读"); return result; }
Example 7
Source File: SysAnnouncementSendController.java From jeecg-boot with Apache License 2.0 | 6 votes |
/** * @功能:更新用户系统消息阅读状态 * @param json * @return */ @PutMapping(value = "/editByAnntIdAndUserId") public Result<SysAnnouncementSend> editById(@RequestBody JSONObject json) { Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>(); String anntId = json.getString("anntId"); LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId(); LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where annt_id ='"+anntId+"' and user_id ='"+userId+"'"); SysAnnouncementSend announcementSend = new SysAnnouncementSend(); sysAnnouncementSendService.update(announcementSend, updateWrapper); result.setSuccess(true); return result; }
Example 8
Source File: SysAnnouncementSendController.java From jeecg-boot with Apache License 2.0 | 6 votes |
/** * @功能:一键已读 * @return */ @PutMapping(value = "/readAll") public Result<SysAnnouncementSend> readAll() { Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>(); LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId(); LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where user_id ='"+userId+"'"); SysAnnouncementSend announcementSend = new SysAnnouncementSend(); sysAnnouncementSendService.update(announcementSend, updateWrapper); result.setSuccess(true); result.setMessage("全部已读"); return result; }
Example 9
Source File: SysBaseApiImpl.java From jeecg-cloud with Apache License 2.0 | 5 votes |
@Override public void updateSysAnnounReadFlag(String busType, String busId) { SysAnnouncement announcement = sysAnnouncementMapper.selectOne(new QueryWrapper<SysAnnouncement>().eq("bus_type",busType).eq("bus_id",busId)); if(announcement != null){ LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId(); LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where annt_id ='"+announcement.getId()+"' and user_id ='"+userId+"'"); SysAnnouncementSend announcementSend = new SysAnnouncementSend(); sysAnnouncementSendMapper.update(announcementSend, updateWrapper); } }
Example 10
Source File: SysBaseApiImpl.java From teaching with Apache License 2.0 | 5 votes |
@Override public void updateSysAnnounReadFlag(String busType, String busId) { SysAnnouncement announcement = sysAnnouncementMapper.selectOne(new QueryWrapper<SysAnnouncement>().eq("bus_type",busType).eq("bus_id",busId)); if(announcement != null){ LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId(); LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where annt_id ='"+announcement.getId()+"' and user_id ='"+userId+"'"); SysAnnouncementSend announcementSend = new SysAnnouncementSend(); sysAnnouncementSendMapper.update(announcementSend, updateWrapper); } }
Example 11
Source File: SysBaseApiImpl.java From jeecg-boot with Apache License 2.0 | 5 votes |
@Override public void updateSysAnnounReadFlag(String busType, String busId) { SysAnnouncement announcement = sysAnnouncementMapper.selectOne(new QueryWrapper<SysAnnouncement>().eq("bus_type",busType).eq("bus_id",busId)); if(announcement != null){ LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal(); String userId = sysUser.getId(); LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda(); updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG); updateWrapper.set(SysAnnouncementSend::getReadTime, new Date()); updateWrapper.last("where annt_id ='"+announcement.getId()+"' and user_id ='"+userId+"'"); SysAnnouncementSend announcementSend = new SysAnnouncementSend(); sysAnnouncementSendMapper.update(announcementSend, updateWrapper); } }