Java Code Examples for org.jeecg.modules.system.entity.SysAnnouncement#setDelFlag()
The following examples show how to use
org.jeecg.modules.system.entity.SysAnnouncement#setDelFlag() .
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: SysAnnouncementController.java From jeecg-cloud with Apache License 2.0 | 6 votes |
/** * 通过id删除 * @param id * @return */ @RequestMapping(value = "/delete", method = RequestMethod.DELETE) public Result<SysAnnouncement> delete(@RequestParam(name="id",required=true) String id) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id); if(sysAnnouncement==null) { result.error500("未找到对应实体"); }else { sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_1.toString()); boolean ok = sysAnnouncementService.updateById(sysAnnouncement); if(ok) { result.success("删除成功!"); } } return result; }
Example 2
Source File: SysAnnouncementController.java From jeecg-cloud with Apache License 2.0 | 6 votes |
/** * 批量删除 * @param ids * @return */ @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE) public Result<SysAnnouncement> deleteBatch(@RequestParam(name="ids",required=true) String ids) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); if(ids==null || "".equals(ids.trim())) { result.error500("参数不识别!"); }else { String[] id = ids.split(","); for(int i=0;i<id.length;i++) { SysAnnouncement announcement = sysAnnouncementService.getById(id[i]); announcement.setDelFlag(CommonConstant.DEL_FLAG_1.toString()); sysAnnouncementService.updateById(announcement); } result.success("删除成功!"); } return result; }
Example 3
Source File: SysAnnouncementController.java From jeecg-boot with Apache License 2.0 | 6 votes |
/** * 批量删除 * @param ids * @return */ @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE) public Result<SysAnnouncement> deleteBatch(@RequestParam(name="ids",required=true) String ids) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); if(ids==null || "".equals(ids.trim())) { result.error500("参数不识别!"); }else { String[] id = ids.split(","); for(int i=0;i<id.length;i++) { SysAnnouncement announcement = sysAnnouncementService.getById(id[i]); announcement.setDelFlag(CommonConstant.DEL_FLAG_1.toString()); sysAnnouncementService.updateById(announcement); } result.success("删除成功!"); } return result; }
Example 4
Source File: SysAnnouncementController.java From jeecg-boot with Apache License 2.0 | 6 votes |
/** * 通过id删除 * @param id * @return */ @RequestMapping(value = "/delete", method = RequestMethod.DELETE) public Result<SysAnnouncement> delete(@RequestParam(name="id",required=true) String id) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id); if(sysAnnouncement==null) { result.error500("未找到对应实体"); }else { sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_1.toString()); boolean ok = sysAnnouncementService.updateById(sysAnnouncement); if(ok) { result.success("删除成功!"); } } return result; }
Example 5
Source File: SysAnnouncementController.java From jeecg-boot-with-activiti with MIT License | 6 votes |
/** * 通过id删除 * @param id * @return */ @RequestMapping(value = "/delete", method = RequestMethod.DELETE) public Result<SysAnnouncement> delete(@RequestParam(name="id",required=true) String id) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id); if(sysAnnouncement==null) { result.error500("未找到对应实体"); }else { sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_1.toString()); boolean ok = sysAnnouncementService.updateById(sysAnnouncement); if(ok) { result.success("删除成功!"); } } return result; }
Example 6
Source File: SysAnnouncementController.java From jeecg-boot-with-activiti with MIT License | 6 votes |
/** * 批量删除 * @param ids * @return */ @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE) public Result<SysAnnouncement> deleteBatch(@RequestParam(name="ids",required=true) String ids) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); if(ids==null || "".equals(ids.trim())) { result.error500("参数不识别!"); }else { String[] id = ids.split(","); for(int i=0;i<id.length;i++) { SysAnnouncement announcement = sysAnnouncementService.getById(id[i]); announcement.setDelFlag(CommonConstant.DEL_FLAG_1.toString()); sysAnnouncementService.updateById(announcement); } result.success("删除成功!"); } return result; }
Example 7
Source File: SysAnnouncementController.java From teaching with Apache License 2.0 | 6 votes |
/** * 批量删除 * @param ids * @return */ @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE) public Result<SysAnnouncement> deleteBatch(@RequestParam(name="ids",required=true) String ids) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); if(ids==null || "".equals(ids.trim())) { result.error500("参数不识别!"); }else { String[] id = ids.split(","); for(int i=0;i<id.length;i++) { SysAnnouncement announcement = sysAnnouncementService.getById(id[i]); announcement.setDelFlag(CommonConstant.DEL_FLAG_1.toString()); sysAnnouncementService.updateById(announcement); } result.success("删除成功!"); } return result; }
Example 8
Source File: SysAnnouncementController.java From teaching with Apache License 2.0 | 6 votes |
/** * 通过id删除 * @param id * @return */ @RequestMapping(value = "/delete", method = RequestMethod.DELETE) public Result<SysAnnouncement> delete(@RequestParam(name="id",required=true) String id) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id); if(sysAnnouncement==null) { result.error500("未找到对应实体"); }else { sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_1.toString()); boolean ok = sysAnnouncementService.updateById(sysAnnouncement); if(ok) { result.success("删除成功!"); } } return result; }
Example 9
Source File: SysAnnouncementController.java From teaching with Apache License 2.0 | 5 votes |
/** * 分页列表查询 * @param sysAnnouncement * @param pageNo * @param pageSize * @param req * @return */ @RequestMapping(value = "/list", method = RequestMethod.GET) public Result<IPage<SysAnnouncement>> queryPageList(SysAnnouncement sysAnnouncement, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { Result<IPage<SysAnnouncement>> result = new Result<IPage<SysAnnouncement>>(); sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); QueryWrapper<SysAnnouncement> queryWrapper = new QueryWrapper<SysAnnouncement>(sysAnnouncement); Page<SysAnnouncement> page = new Page<SysAnnouncement>(pageNo,pageSize); //排序逻辑 处理 String column = req.getParameter("column"); String order = req.getParameter("order"); if(oConvertUtils.isNotEmpty(column) && oConvertUtils.isNotEmpty(order)) { if("asc".equals(order)) { queryWrapper.orderByAsc(oConvertUtils.camelToUnderline(column)); }else { queryWrapper.orderByDesc(oConvertUtils.camelToUnderline(column)); } } IPage<SysAnnouncement> pageList = sysAnnouncementService.page(page, queryWrapper); log.info("查询当前页:"+pageList.getCurrent()); log.info("查询当前页数量:"+pageList.getSize()); log.info("查询结果数量:"+pageList.getRecords().size()); log.info("数据总数:"+pageList.getTotal()); result.setSuccess(true); result.setResult(pageList); return result; }
Example 10
Source File: SysAnnouncementServiceImpl.java From jeecg-boot with Apache License 2.0 | 5 votes |
@Override public void saveSysAnnouncement(String title, String msgContent) { SysAnnouncement announcement = new SysAnnouncement(); announcement.setTitile(title); announcement.setMsgContent(msgContent); announcement.setSender("JEECG BOOT"); announcement.setPriority(CommonConstant.PRIORITY_L); announcement.setMsgType(CommonConstant.MSG_TYPE_ALL); announcement.setSendStatus(CommonConstant.HAS_SEND); announcement.setSendTime(new Date()); announcement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); sysAnnouncementMapper.insert(announcement); }
Example 11
Source File: SysAnnouncementController.java From jeecg-boot with Apache License 2.0 | 5 votes |
/** * 添加 * @param sysAnnouncement * @return */ @RequestMapping(value = "/add", method = RequestMethod.POST) public Result<SysAnnouncement> add(@RequestBody SysAnnouncement sysAnnouncement) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); try { sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); sysAnnouncement.setSendStatus(CommonSendStatus.UNPUBLISHED_STATUS_0);//未发布 sysAnnouncementService.saveAnnouncement(sysAnnouncement); result.success("添加成功!"); } catch (Exception e) { log.error(e.getMessage(),e); result.error500("操作失败"); } return result; }
Example 12
Source File: SysAnnouncementController.java From jeecg-boot with Apache License 2.0 | 5 votes |
/** * 分页列表查询 * @param sysAnnouncement * @param pageNo * @param pageSize * @param req * @return */ @RequestMapping(value = "/list", method = RequestMethod.GET) public Result<IPage<SysAnnouncement>> queryPageList(SysAnnouncement sysAnnouncement, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { Result<IPage<SysAnnouncement>> result = new Result<IPage<SysAnnouncement>>(); sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); QueryWrapper<SysAnnouncement> queryWrapper = new QueryWrapper<SysAnnouncement>(sysAnnouncement); Page<SysAnnouncement> page = new Page<SysAnnouncement>(pageNo,pageSize); //排序逻辑 处理 String column = req.getParameter("column"); String order = req.getParameter("order"); if(oConvertUtils.isNotEmpty(column) && oConvertUtils.isNotEmpty(order)) { if("asc".equals(order)) { queryWrapper.orderByAsc(oConvertUtils.camelToUnderline(column)); }else { queryWrapper.orderByDesc(oConvertUtils.camelToUnderline(column)); } } IPage<SysAnnouncement> pageList = sysAnnouncementService.page(page, queryWrapper); log.info("查询当前页:"+pageList.getCurrent()); log.info("查询当前页数量:"+pageList.getSize()); log.info("查询结果数量:"+pageList.getRecords().size()); log.info("数据总数:"+pageList.getTotal()); result.setSuccess(true); result.setResult(pageList); return result; }
Example 13
Source File: SysAnnouncementServiceImpl.java From teaching with Apache License 2.0 | 5 votes |
@Override public void saveSysAnnouncement(String title, String msgContent) { SysAnnouncement announcement = new SysAnnouncement(); announcement.setTitile(title); announcement.setMsgContent(msgContent); announcement.setSender("JEECG BOOT"); announcement.setPriority(CommonConstant.PRIORITY_L); announcement.setMsgType(CommonConstant.MSG_TYPE_ALL); announcement.setSendStatus(CommonConstant.HAS_SEND); announcement.setSendTime(new Date()); announcement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); sysAnnouncementMapper.insert(announcement); }
Example 14
Source File: SysAnnouncementController.java From teaching with Apache License 2.0 | 5 votes |
/** * 添加 * @param sysAnnouncement * @return */ @RequestMapping(value = "/add", method = RequestMethod.POST) public Result<SysAnnouncement> add(@RequestBody SysAnnouncement sysAnnouncement) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); try { sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); sysAnnouncement.setSendStatus(CommonSendStatus.UNPUBLISHED_STATUS_0);//未发布 sysAnnouncementService.saveAnnouncement(sysAnnouncement); result.success("添加成功!"); } catch (Exception e) { log.error(e.getMessage(),e); result.error500("操作失败"); } return result; }
Example 15
Source File: SysAnnouncementController.java From jeecg-cloud with Apache License 2.0 | 5 votes |
/** * 分页列表查询 * @param sysAnnouncement * @param pageNo * @param pageSize * @param req * @return */ @RequestMapping(value = "/list", method = RequestMethod.GET) public Result<IPage<SysAnnouncement>> queryPageList(SysAnnouncement sysAnnouncement, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { Result<IPage<SysAnnouncement>> result = new Result<IPage<SysAnnouncement>>(); sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); QueryWrapper<SysAnnouncement> queryWrapper = new QueryWrapper<SysAnnouncement>(sysAnnouncement); Page<SysAnnouncement> page = new Page<SysAnnouncement>(pageNo,pageSize); //排序逻辑 处理 String column = req.getParameter("column"); String order = req.getParameter("order"); if(oConvertUtils.isNotEmpty(column) && oConvertUtils.isNotEmpty(order)) { if("asc".equals(order)) { queryWrapper.orderByAsc(oConvertUtils.camelToUnderline(column)); }else { queryWrapper.orderByDesc(oConvertUtils.camelToUnderline(column)); } } IPage<SysAnnouncement> pageList = sysAnnouncementService.page(page, queryWrapper); log.info("查询当前页:"+pageList.getCurrent()); log.info("查询当前页数量:"+pageList.getSize()); log.info("查询结果数量:"+pageList.getRecords().size()); log.info("数据总数:"+pageList.getTotal()); result.setSuccess(true); result.setResult(pageList); return result; }
Example 16
Source File: SysAnnouncementServiceImpl.java From jeecg-boot-with-activiti with MIT License | 5 votes |
@Override public void saveSysAnnouncement(String title, String msgContent) { SysAnnouncement announcement = new SysAnnouncement(); announcement.setTitile(title); announcement.setMsgContent(msgContent); announcement.setSender("JEECG BOOT"); announcement.setPriority(CommonConstant.PRIORITY_L); announcement.setMsgType(CommonConstant.MSG_TYPE_ALL); announcement.setSendStatus(CommonConstant.HAS_SEND); announcement.setSendTime(new Date()); announcement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); sysAnnouncementMapper.insert(announcement); }
Example 17
Source File: SysAnnouncementController.java From jeecg-boot-with-activiti with MIT License | 5 votes |
/** * 添加 * @param sysAnnouncement * @return */ @RequestMapping(value = "/add", method = RequestMethod.POST) public Result<SysAnnouncement> add(@RequestBody SysAnnouncement sysAnnouncement) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); try { sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); sysAnnouncement.setSendStatus(CommonSendStatus.UNPUBLISHED_STATUS_0);//未发布 sysAnnouncementService.saveAnnouncement(sysAnnouncement); result.success("添加成功!"); } catch (Exception e) { log.error(e.getMessage(),e); result.error500("操作失败"); } return result; }
Example 18
Source File: SysAnnouncementController.java From jeecg-boot-with-activiti with MIT License | 5 votes |
/** * 分页列表查询 * @param sysAnnouncement * @param pageNo * @param pageSize * @param req * @return */ @RequestMapping(value = "/list", method = RequestMethod.GET) public Result<IPage<SysAnnouncement>> queryPageList(SysAnnouncement sysAnnouncement, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { Result<IPage<SysAnnouncement>> result = new Result<IPage<SysAnnouncement>>(); sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); QueryWrapper<SysAnnouncement> queryWrapper = new QueryWrapper<SysAnnouncement>(sysAnnouncement); Page<SysAnnouncement> page = new Page<SysAnnouncement>(pageNo,pageSize); //排序逻辑 处理 String column = req.getParameter("column"); String order = req.getParameter("order"); if(oConvertUtils.isNotEmpty(column) && oConvertUtils.isNotEmpty(order)) { if("asc".equals(order)) { queryWrapper.orderByAsc(oConvertUtils.camelToUnderline(column)); }else { queryWrapper.orderByDesc(oConvertUtils.camelToUnderline(column)); } } IPage<SysAnnouncement> pageList = sysAnnouncementService.page(page, queryWrapper); log.info("查询当前页:"+pageList.getCurrent()); log.info("查询当前页数量:"+pageList.getSize()); log.info("查询结果数量:"+pageList.getRecords().size()); log.info("数据总数:"+pageList.getTotal()); result.setSuccess(true); result.setResult(pageList); return result; }
Example 19
Source File: SysAnnouncementServiceImpl.java From jeecg-cloud with Apache License 2.0 | 5 votes |
@Override public void saveSysAnnouncement(String title, String msgContent) { SysAnnouncement announcement = new SysAnnouncement(); announcement.setTitile(title); announcement.setMsgContent(msgContent); announcement.setSender("JEECG BOOT"); announcement.setPriority(CommonConstant.PRIORITY_L); announcement.setMsgType(CommonConstant.MSG_TYPE_ALL); announcement.setSendStatus(CommonConstant.HAS_SEND); announcement.setSendTime(new Date()); announcement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); sysAnnouncementMapper.insert(announcement); }
Example 20
Source File: SysAnnouncementController.java From jeecg-cloud with Apache License 2.0 | 5 votes |
/** * 添加 * @param sysAnnouncement * @return */ @RequestMapping(value = "/add", method = RequestMethod.POST) public Result<SysAnnouncement> add(@RequestBody SysAnnouncement sysAnnouncement) { Result<SysAnnouncement> result = new Result<SysAnnouncement>(); try { sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); sysAnnouncement.setSendStatus(CommonSendStatus.UNPUBLISHED_STATUS_0);//未发布 sysAnnouncementService.saveAnnouncement(sysAnnouncement); result.success("添加成功!"); } catch (Exception e) { log.error(e.getMessage(),e); result.error500("操作失败"); } return result; }