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

The following examples show how to use org.jeecg.modules.system.entity.SysAnnouncement#setCancelTime() . 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;
}