Java Code Examples for org.jeecg.modules.system.entity.SysAnnouncement#setSendStatus()

The following examples show how to use org.jeecg.modules.system.entity.SysAnnouncement#setSendStatus() . 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 vote down vote up
/**
 *	 更新撤销操作
 * @param id
 * @return
 */
@RequestMapping(value = "/doReovkeData", method = RequestMethod.GET)
public Result<SysAnnouncement> doReovkeData(@RequestParam(name="id",required=true) String id, HttpServletRequest request) {
	Result<SysAnnouncement> result = new Result<SysAnnouncement>();
	SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id);
	if(sysAnnouncement==null) {
		result.error500("未找到对应实体");
	}else {
		sysAnnouncement.setSendStatus(CommonSendStatus.REVOKE_STATUS_2);//撤销发布
		sysAnnouncement.setCancelTime(new Date());
		boolean ok = sysAnnouncementService.updateById(sysAnnouncement);
		if(ok) {
			result.success("该系统通知撤销成功");
		}
	}

	return result;
}
 
Example 2
Source File: SysAnnouncementController.java    From jeecg-boot-with-activiti with MIT License 6 votes vote down vote up
/**
 *	 更新撤销操作
 * @param id
 * @return
 */
@RequestMapping(value = "/doReovkeData", method = RequestMethod.GET)
public Result<SysAnnouncement> doReovkeData(@RequestParam(name="id",required=true) String id, HttpServletRequest request) {
	Result<SysAnnouncement> result = new Result<SysAnnouncement>();
	SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id);
	if(sysAnnouncement==null) {
		result.error500("未找到对应实体");
	}else {
		sysAnnouncement.setSendStatus(CommonSendStatus.REVOKE_STATUS_2);//撤销发布
		sysAnnouncement.setCancelTime(new Date());
		boolean ok = sysAnnouncementService.updateById(sysAnnouncement);
		if(ok) {
			result.success("该系统通知撤销成功");
		}
	}

	return result;
}
 
Example 3
Source File: SysAnnouncementController.java    From teaching with Apache License 2.0 6 votes vote down vote up
/**
 *	 更新撤销操作
 * @param id
 * @return
 */
@RequestMapping(value = "/doReovkeData", method = RequestMethod.GET)
public Result<SysAnnouncement> doReovkeData(@RequestParam(name="id",required=true) String id, HttpServletRequest request) {
	Result<SysAnnouncement> result = new Result<SysAnnouncement>();
	SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id);
	if(sysAnnouncement==null) {
		result.error500("未找到对应实体");
	}else {
		sysAnnouncement.setSendStatus(CommonSendStatus.REVOKE_STATUS_2);//撤销发布
		sysAnnouncement.setCancelTime(new Date());
		boolean ok = sysAnnouncementService.updateById(sysAnnouncement);
		if(ok) {
			result.success("该系统通知撤销成功");
		}
	}

	return result;
}
 
Example 4
Source File: SysAnnouncementController.java    From jeecg-boot with Apache License 2.0 6 votes vote down vote up
/**
 *	 更新撤销操作
 * @param id
 * @return
 */
@RequestMapping(value = "/doReovkeData", method = RequestMethod.GET)
public Result<SysAnnouncement> doReovkeData(@RequestParam(name="id",required=true) String id, HttpServletRequest request) {
	Result<SysAnnouncement> result = new Result<SysAnnouncement>();
	SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(id);
	if(sysAnnouncement==null) {
		result.error500("未找到对应实体");
	}else {
		sysAnnouncement.setSendStatus(CommonSendStatus.REVOKE_STATUS_2);//撤销发布
		sysAnnouncement.setCancelTime(new Date());
		boolean ok = sysAnnouncementService.updateById(sysAnnouncement);
		if(ok) {
			result.success("该系统通知撤销成功");
		}
	}

	return result;
}
 
Example 5
Source File: SysAnnouncementController.java    From jeecg-cloud with Apache License 2.0 5 votes vote down vote up
/**
  *   添加
 * @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 6
Source File: SysAnnouncementServiceImpl.java    From jeecg-cloud with Apache License 2.0 5 votes vote down vote up
@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 7
Source File: SysAnnouncementController.java    From jeecg-boot-with-activiti with MIT License 5 votes vote down vote up
/**
  *   添加
 * @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 8
Source File: SysAnnouncementServiceImpl.java    From jeecg-boot-with-activiti with MIT License 5 votes vote down vote up
@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 9
Source File: SysAnnouncementController.java    From teaching with Apache License 2.0 5 votes vote down vote up
/**
  *   添加
 * @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 10
Source File: SysAnnouncementServiceImpl.java    From teaching with Apache License 2.0 5 votes vote down vote up
@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 vote down vote up
/**
  *   添加
 * @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: SysAnnouncementServiceImpl.java    From jeecg-boot with Apache License 2.0 5 votes vote down vote up
@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);
}