org.jeecg.common.util.DateUtils Java Examples
The following examples show how to use
org.jeecg.common.util.DateUtils.
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: QueryGenerator.java From jeecg-cloud with Apache License 2.0 | 6 votes |
private static void addRuleToQueryWrapper(SysPermissionDataRuleModel dataRule, String name, Class propertyType, QueryWrapper<?> queryWrapper) { QueryRuleEnum rule = QueryRuleEnum.getByValue(dataRule.getRuleConditions()); if(rule.equals(QueryRuleEnum.IN) && ! propertyType.equals(String.class)) { String[] values = dataRule.getRuleValue().split(","); Object[] objs = new Object[values.length]; for (int i = 0; i < values.length; i++) { objs[i] = NumberUtils.parseNumber(values[i], propertyType); } addEasyQuery(queryWrapper, name, rule, objs); }else { if (propertyType.equals(String.class)) { addEasyQuery(queryWrapper, name, rule, converRuleValue(dataRule.getRuleValue())); }else if (propertyType.equals(Date.class)) { String dateStr =converRuleValue(dataRule.getRuleValue()); if(dateStr.length()==10){ addEasyQuery(queryWrapper, name, rule, DateUtils.str2Date(dateStr,DateUtils.date_sdf.get())); }else{ addEasyQuery(queryWrapper, name, rule, DateUtils.str2Date(dateStr,DateUtils.datetimeFormat.get())); } }else { addEasyQuery(queryWrapper, name, rule, NumberUtils.parseNumber(dataRule.getRuleValue(), propertyType)); } } }
Example #2
Source File: QueryGenerator.java From jeecg-boot with Apache License 2.0 | 6 votes |
private static void addRuleToQueryWrapper(SysPermissionDataRuleModel dataRule, String name, Class propertyType, QueryWrapper<?> queryWrapper) { QueryRuleEnum rule = QueryRuleEnum.getByValue(dataRule.getRuleConditions()); if(rule.equals(QueryRuleEnum.IN) && ! propertyType.equals(String.class)) { String[] values = dataRule.getRuleValue().split(","); Object[] objs = new Object[values.length]; for (int i = 0; i < values.length; i++) { objs[i] = NumberUtils.parseNumber(values[i], propertyType); } addEasyQuery(queryWrapper, name, rule, objs); }else { if (propertyType.equals(String.class)) { addEasyQuery(queryWrapper, name, rule, converRuleValue(dataRule.getRuleValue())); }else if (propertyType.equals(Date.class)) { String dateStr =converRuleValue(dataRule.getRuleValue()); if(dateStr.length()==10){ addEasyQuery(queryWrapper, name, rule, DateUtils.str2Date(dateStr,DateUtils.date_sdf.get())); }else{ addEasyQuery(queryWrapper, name, rule, DateUtils.str2Date(dateStr,DateUtils.datetimeFormat.get())); } }else { addEasyQuery(queryWrapper, name, rule, NumberUtils.parseNumber(dataRule.getRuleValue(), propertyType)); } } }
Example #3
Source File: SysUserCacheInfo.java From teaching with Apache License 2.0 | 4 votes |
public String getSysDate() { return DateUtils.formatDate(); }
Example #4
Source File: SampleJob.java From jeecg-boot with Apache License 2.0 | 4 votes |
@Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { log.info(String.format(" Jeecg-Boot 普通定时任务 SampleJob ! 时间:" + DateUtils.getTimestamp())); }
Example #5
Source File: SampleParamJob.java From jeecg-boot with Apache License 2.0 | 4 votes |
@Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { log.info(String.format("welcome %s! Jeecg-Boot 带参数定时任务 SampleParamJob ! 时间:" + DateUtils.now(), this.parameter)); }
Example #6
Source File: JeecgDemoController.java From jeecg-boot with Apache License 2.0 | 4 votes |
/** * redis操作 -- set */ @GetMapping(value = "/redisSet") public void redisSet() { redisUtil.set("name", "张三" + DateUtils.now()); }
Example #7
Source File: SysUserCacheInfo.java From jeecg-boot with Apache License 2.0 | 4 votes |
public String getSysTime() { return DateUtils.now(); }
Example #8
Source File: SysUserCacheInfo.java From jeecg-boot with Apache License 2.0 | 4 votes |
public String getSysDate() { return DateUtils.formatDate(); }
Example #9
Source File: SampleJob.java From teaching with Apache License 2.0 | 4 votes |
@Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { log.info(String.format(" Jeecg-Boot 普通定时任务 SampleJob ! 时间:" + DateUtils.getTimestamp())); }
Example #10
Source File: SampleParamJob.java From teaching with Apache License 2.0 | 4 votes |
@Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { log.info(String.format("welcome %s! Jeecg-Boot 带参数定时任务 SampleParamJob ! 时间:" + DateUtils.now(), this.parameter)); }
Example #11
Source File: JeecgDemoController.java From teaching with Apache License 2.0 | 4 votes |
/** * redis操作 -- set */ @GetMapping(value = "/redisSet") public void redisSet() { redisUtil.set("name", "张三" + DateUtils.now()); }
Example #12
Source File: SysUserCacheInfo.java From teaching with Apache License 2.0 | 4 votes |
public String getSysTime() { return DateUtils.now(); }
Example #13
Source File: JeecgDemoController.java From jeecg-cloud with Apache License 2.0 | 4 votes |
/** * redis操作 -- set */ @GetMapping(value = "/redisSet") public void redisSet() { redisUtil.set("name", "张三" + DateUtils.now()); }
Example #14
Source File: SampleJob.java From jeecg-boot-with-activiti with MIT License | 4 votes |
@Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { log.info(String.format(" Jeecg-Boot 普通定时任务 SampleJob ! 时间:" + DateUtils.getTimestamp())); }
Example #15
Source File: SampleParamJob.java From jeecg-boot-with-activiti with MIT License | 4 votes |
@Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { log.info(String.format("welcome %s! Jeecg-Boot 带参数定时任务 SampleParamJob ! 时间:" + DateUtils.now(), this.parameter)); }
Example #16
Source File: JeecgDemoController.java From jeecg-boot-with-activiti with MIT License | 4 votes |
/** * redis操作 -- set */ @GetMapping(value = "/redisSet") public void redisSet() { redisUtil.set("name", "张三" + DateUtils.now()); }
Example #17
Source File: SysUserCacheInfo.java From jeecg-boot-with-activiti with MIT License | 4 votes |
public String getSysTime() { return DateUtils.now(); }
Example #18
Source File: SysUserCacheInfo.java From jeecg-boot-with-activiti with MIT License | 4 votes |
public String getSysDate() { return DateUtils.formatDate(); }
Example #19
Source File: SysUserCacheInfo.java From jeecg-cloud with Apache License 2.0 | 4 votes |
public String getSysTime() { return DateUtils.now(); }
Example #20
Source File: SysUserCacheInfo.java From jeecg-cloud with Apache License 2.0 | 4 votes |
public String getSysDate() { return DateUtils.formatDate(); }
Example #21
Source File: SampleJob.java From jeecg-cloud with Apache License 2.0 | 4 votes |
@Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { log.info(String.format(" Jeecg-Boot 普通定时任务 SampleJob ! 时间:" + DateUtils.getTimestamp())); }
Example #22
Source File: SampleParamJob.java From jeecg-cloud with Apache License 2.0 | 4 votes |
@Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { log.info(String.format("welcome %s! Jeecg-Boot 带参数定时任务 SampleParamJob ! 时间:" + DateUtils.now(), this.parameter)); }