Java Code Examples for com.xxl.job.admin.core.model.XxlJobInfo#setGlueRemark()
The following examples show how to use
com.xxl.job.admin.core.model.XxlJobInfo#setGlueRemark() .
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: JobCodeController.java From open-capacity-platform with Apache License 2.0 | 5 votes |
@RequestMapping("/save") @ResponseBody public ReturnT<String> save(Model model, int id, String glueSource, String glueRemark) { // valid if (glueRemark==null) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobinfo_glue_remark")) ); } if (glueRemark.length()<4 || glueRemark.length()>100) { return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_remark_limit")); } XxlJobInfo exists_jobInfo = xxlJobInfoDao.loadById(id); if (exists_jobInfo == null) { return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid")); } // update new code exists_jobInfo.setGlueSource(glueSource); exists_jobInfo.setGlueRemark(glueRemark); exists_jobInfo.setGlueUpdatetime(new Date()); xxlJobInfoDao.update(exists_jobInfo); // log old code XxlJobLogGlue xxlJobLogGlue = new XxlJobLogGlue(); xxlJobLogGlue.setJobId(exists_jobInfo.getId()); xxlJobLogGlue.setGlueType(exists_jobInfo.getGlueType()); xxlJobLogGlue.setGlueSource(glueSource); xxlJobLogGlue.setGlueRemark(glueRemark); xxlJobLogGlueDao.save(xxlJobLogGlue); // remove code backup more than 30 xxlJobLogGlueDao.removeOld(exists_jobInfo.getId(), 30); return ReturnT.SUCCESS; }
Example 2
Source File: JobCodeController.java From microservices-platform with Apache License 2.0 | 5 votes |
@RequestMapping("/save") @ResponseBody public ReturnT<String> save(Model model, int id, String glueSource, String glueRemark) { // valid if (glueRemark==null) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobinfo_glue_remark")) ); } if (glueRemark.length()<4 || glueRemark.length()>100) { return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_remark_limit")); } XxlJobInfo exists_jobInfo = xxlJobInfoDao.loadById(id); if (exists_jobInfo == null) { return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid")); } // update new code exists_jobInfo.setGlueSource(glueSource); exists_jobInfo.setGlueRemark(glueRemark); exists_jobInfo.setGlueUpdatetime(new Date()); xxlJobInfoDao.update(exists_jobInfo); // log old code XxlJobLogGlue xxlJobLogGlue = new XxlJobLogGlue(); xxlJobLogGlue.setJobId(exists_jobInfo.getId()); xxlJobLogGlue.setGlueType(exists_jobInfo.getGlueType()); xxlJobLogGlue.setGlueSource(glueSource); xxlJobLogGlue.setGlueRemark(glueRemark); xxlJobLogGlueDao.save(xxlJobLogGlue); // remove code backup more than 30 xxlJobLogGlueDao.removeOld(exists_jobInfo.getId(), 30); return ReturnT.SUCCESS; }
Example 3
Source File: JobCodeController.java From zuihou-admin-boot with Apache License 2.0 | 5 votes |
@RequestMapping("/save") @ResponseBody public ReturnT<String> save(Model model, Integer id, String glueSource, String glueRemark) { // valid if (glueRemark == null) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobinfo_glue_remark"))); } if (glueRemark.length() < 4 || glueRemark.length() > 100) { return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_remark_limit")); } XxlJobInfo existsJobinfo = xxlJobInfoDao.loadById(id); if (existsJobinfo == null) { return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid")); } // update new code existsJobinfo.setGlueSource(glueSource); existsJobinfo.setGlueRemark(glueRemark); existsJobinfo.setGlueUpdatetime(new Date()); xxlJobInfoDao.update(existsJobinfo); // log old code XxlJobLogGlue xxlJobLogGlue = new XxlJobLogGlue(); xxlJobLogGlue.setJobId(existsJobinfo.getId()); xxlJobLogGlue.setGlueType(existsJobinfo.getGlueType()); xxlJobLogGlue.setGlueSource(glueSource); xxlJobLogGlue.setGlueRemark(glueRemark); xxlJobLogGlueDao.save(xxlJobLogGlue); // remove code backup more than 30 xxlJobLogGlueDao.removeOld(existsJobinfo.getId(), 30); return ReturnT.SUCCESS; }
Example 4
Source File: JobCodeController.java From zuihou-admin-cloud with Apache License 2.0 | 5 votes |
@RequestMapping("/save") @ResponseBody public ReturnT<String> save(Model model, Integer id, String glueSource, String glueRemark) { // valid if (glueRemark == null) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobinfo_glue_remark"))); } if (glueRemark.length() < 4 || glueRemark.length() > 100) { return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_remark_limit")); } XxlJobInfo existsJobinfo = xxlJobInfoDao.loadById(id); if (existsJobinfo == null) { return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid")); } // update new code existsJobinfo.setGlueSource(glueSource); existsJobinfo.setGlueRemark(glueRemark); existsJobinfo.setGlueUpdatetime(new Date()); xxlJobInfoDao.update(existsJobinfo); // log old code XxlJobLogGlue xxlJobLogGlue = new XxlJobLogGlue(); xxlJobLogGlue.setJobId(existsJobinfo.getId()); xxlJobLogGlue.setGlueType(existsJobinfo.getGlueType()); xxlJobLogGlue.setGlueSource(glueSource); xxlJobLogGlue.setGlueRemark(glueRemark); xxlJobLogGlueDao.save(xxlJobLogGlue); // remove code backup more than 30 xxlJobLogGlueDao.removeOld(existsJobinfo.getId(), 30); return ReturnT.SUCCESS; }
Example 5
Source File: JobCodeController.java From xxl-job with GNU General Public License v3.0 | 5 votes |
@RequestMapping("/save") @ResponseBody public ReturnT<String> save(Model model, int id, String glueSource, String glueRemark) { // valid if (glueRemark==null) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobinfo_glue_remark")) ); } if (glueRemark.length()<4 || glueRemark.length()>100) { return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_remark_limit")); } XxlJobInfo exists_jobInfo = xxlJobInfoDao.loadById(id); if (exists_jobInfo == null) { return new ReturnT<String>(500, I18nUtil.getString("jobinfo_glue_jobid_unvalid")); } // update new code exists_jobInfo.setGlueSource(glueSource); exists_jobInfo.setGlueRemark(glueRemark); exists_jobInfo.setGlueUpdatetime(new Date()); exists_jobInfo.setUpdateTime(new Date()); xxlJobInfoDao.update(exists_jobInfo); // log old code XxlJobLogGlue xxlJobLogGlue = new XxlJobLogGlue(); xxlJobLogGlue.setJobId(exists_jobInfo.getId()); xxlJobLogGlue.setGlueType(exists_jobInfo.getGlueType()); xxlJobLogGlue.setGlueSource(glueSource); xxlJobLogGlue.setGlueRemark(glueRemark); xxlJobLogGlue.setAddTime(new Date()); xxlJobLogGlue.setUpdateTime(new Date()); xxlJobLogGlueDao.save(xxlJobLogGlue); // remove code backup more than 30 xxlJobLogGlueDao.removeOld(exists_jobInfo.getId(), 30); return ReturnT.SUCCESS; }
Example 6
Source File: XxlJobInfoDaoTest.java From microservices-platform with Apache License 2.0 | 4 votes |
@Test public void save_load(){ XxlJobInfo info = new XxlJobInfo(); info.setJobGroup(1); info.setJobCron("jobCron"); info.setJobDesc("desc"); info.setAuthor("setAuthor"); info.setAlarmEmail("setAlarmEmail"); info.setExecutorRouteStrategy("setExecutorRouteStrategy"); info.setExecutorHandler("setExecutorHandler"); info.setExecutorParam("setExecutorParam"); info.setExecutorBlockStrategy("setExecutorBlockStrategy"); info.setGlueType("setGlueType"); info.setGlueSource("setGlueSource"); info.setGlueRemark("setGlueRemark"); info.setChildJobId("1"); int count = xxlJobInfoDao.save(info); XxlJobInfo info2 = xxlJobInfoDao.loadById(info.getId()); info2.setJobCron("jobCron2"); info2.setJobDesc("desc2"); info2.setAuthor("setAuthor2"); info2.setAlarmEmail("setAlarmEmail2"); info2.setExecutorRouteStrategy("setExecutorRouteStrategy2"); info2.setExecutorHandler("setExecutorHandler2"); info2.setExecutorParam("setExecutorParam2"); info2.setExecutorBlockStrategy("setExecutorBlockStrategy2"); info2.setGlueType("setGlueType2"); info2.setGlueSource("setGlueSource2"); info2.setGlueRemark("setGlueRemark2"); info2.setGlueUpdatetime(new Date()); info2.setChildJobId("1"); int item2 = xxlJobInfoDao.update(info2); xxlJobInfoDao.delete(info2.getId()); List<XxlJobInfo> list2 = xxlJobInfoDao.getJobsByGroup(1); int ret3 = xxlJobInfoDao.findAllCount(); }
Example 7
Source File: XxlJobInfoDaoTest.java From xxl-job with GNU General Public License v3.0 | 4 votes |
@Test public void save_load(){ XxlJobInfo info = new XxlJobInfo(); info.setJobGroup(1); info.setJobCron("jobCron"); info.setJobDesc("desc"); info.setAuthor("setAuthor"); info.setAlarmEmail("setAlarmEmail"); info.setExecutorRouteStrategy("setExecutorRouteStrategy"); info.setExecutorHandler("setExecutorHandler"); info.setExecutorParam("setExecutorParam"); info.setExecutorBlockStrategy("setExecutorBlockStrategy"); info.setGlueType("setGlueType"); info.setGlueSource("setGlueSource"); info.setGlueRemark("setGlueRemark"); info.setChildJobId("1"); info.setAddTime(new Date()); info.setUpdateTime(new Date()); info.setGlueUpdatetime(new Date()); int count = xxlJobInfoDao.save(info); XxlJobInfo info2 = xxlJobInfoDao.loadById(info.getId()); info2.setJobCron("jobCron2"); info2.setJobDesc("desc2"); info2.setAuthor("setAuthor2"); info2.setAlarmEmail("setAlarmEmail2"); info2.setExecutorRouteStrategy("setExecutorRouteStrategy2"); info2.setExecutorHandler("setExecutorHandler2"); info2.setExecutorParam("setExecutorParam2"); info2.setExecutorBlockStrategy("setExecutorBlockStrategy2"); info2.setGlueType("setGlueType2"); info2.setGlueSource("setGlueSource2"); info2.setGlueRemark("setGlueRemark2"); info2.setGlueUpdatetime(new Date()); info2.setChildJobId("1"); info2.setUpdateTime(new Date()); int item2 = xxlJobInfoDao.update(info2); xxlJobInfoDao.delete(info2.getId()); List<XxlJobInfo> list2 = xxlJobInfoDao.getJobsByGroup(1); int ret3 = xxlJobInfoDao.findAllCount(); }