Java Code Examples for org.jeecg.common.system.vo.SysUserCacheInfo#getSysDate()
The following examples show how to use
org.jeecg.common.system.vo.SysUserCacheInfo#getSysDate() .
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: JwtUtil.java From jeecg-cloud with Apache License 2.0 | 4 votes |
/** * 从当前用户中获取变量 * @param key * @param user * @return */ //TODO 急待改造 sckjkdsjsfjdk public static String getUserSystemData(String key,SysUserCacheInfo user) { if(user==null) { user = JeecgDataAutorUtils.loadUserInfo(); } //#{sys_user_code}% // 获取登录用户信息 LoginUser sysUser = JwtUtil.getLoginUser(); String moshi = ""; if(key.indexOf("}")!=-1){ moshi = key.substring(key.indexOf("}")+1); } String returnValue = null; //针对特殊标示处理#{sysOrgCode},判断替换 if (key.contains("#{")) { key = key.substring(2,key.indexOf("}")); } else { key = key; } //替换为系统登录用户帐号 if (key.equals(DataBaseConstant.SYS_USER_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_USER_CODE_TABLE)) { if(user==null) { returnValue = sysUser.getUsername(); }else { returnValue = user.getSysUserCode(); } } //替换为系统登录用户真实名字 else if (key.equals(DataBaseConstant.SYS_USER_NAME)|| key.toLowerCase().equals(DataBaseConstant.SYS_USER_NAME_TABLE)) { if(user==null) { returnValue = sysUser.getRealname(); }else { returnValue = user.getSysUserName(); } } //替换为系统用户登录所使用的机构编码 else if (key.equals(DataBaseConstant.SYS_ORG_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_ORG_CODE_TABLE)) { if(user==null) { returnValue = sysUser.getOrgCode(); }else { returnValue = user.getSysOrgCode(); } } //替换为系统用户所拥有的所有机构编码 else if (key.equals(DataBaseConstant.SYS_MULTI_ORG_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE)) { if(user.isOneDepart()) { returnValue = user.getSysMultiOrgCode().get(0); }else { returnValue = Joiner.on(",").join(user.getSysMultiOrgCode()); } } //替换为当前系统时间(年月日) else if (key.equals(DataBaseConstant.SYS_DATE)|| key.toLowerCase().equals(DataBaseConstant.SYS_DATE_TABLE)) { returnValue = user.getSysDate(); } //替换为当前系统时间(年月日时分秒) else if (key.equals(DataBaseConstant.SYS_TIME)|| key.toLowerCase().equals(DataBaseConstant.SYS_TIME_TABLE)) { returnValue = user.getSysTime(); } //流程状态默认值(默认未发起) else if (key.equals(DataBaseConstant.BPM_STATUS)|| key.toLowerCase().equals(DataBaseConstant.BPM_STATUS_TABLE)) { returnValue = "1"; } if(returnValue!=null){returnValue = returnValue + moshi;} return returnValue; }
Example 2
Source File: JwtUtil.java From jeecg-boot-with-activiti with MIT License | 4 votes |
/** * 从当前用户中获取变量 * @param key * @param user * @return */ //TODO 急待改造 sckjkdsjsfjdk public static String getUserSystemData(String key,SysUserCacheInfo user) { if(user==null) { user = JeecgDataAutorUtils.loadUserInfo(); } //#{sys_user_code}% // 获取登录用户信息 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); String moshi = ""; if(key.indexOf("}")!=-1){ moshi = key.substring(key.indexOf("}")+1); } String returnValue = null; //针对特殊标示处理#{sysOrgCode},判断替换 if (key.contains("#{")) { key = key.substring(2,key.indexOf("}")); } else { key = key; } //替换为系统登录用户帐号 if (key.equals(DataBaseConstant.SYS_USER_CODE)|| key.equals(DataBaseConstant.SYS_USER_CODE_TABLE)) { if(user==null) { returnValue = sysUser.getUsername(); }else { returnValue = user.getSysUserCode(); } } //替换为系统登录用户真实名字 else if (key.equals(DataBaseConstant.SYS_USER_NAME)|| key.equals(DataBaseConstant.SYS_USER_NAME_TABLE)) { if(user==null) { returnValue = sysUser.getRealname(); }else { returnValue = user.getSysUserName(); } } //替换为系统用户登录所使用的机构编码 else if (key.equals(DataBaseConstant.SYS_ORG_CODE)|| key.equals(DataBaseConstant.SYS_ORG_CODE_TABLE)) { if(user==null) { returnValue = sysUser.getOrgCode(); }else { returnValue = user.getSysOrgCode(); } } //替换为系统用户所拥有的所有机构编码 else if (key.equals(DataBaseConstant.SYS_MULTI_ORG_CODE)|| key.equals(DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE)) { if(user.isOneDepart()) { returnValue = user.getSysMultiOrgCode().get(0); }else { returnValue = Joiner.on(",").join(user.getSysMultiOrgCode()); } } //替换为当前系统时间(年月日) else if (key.equals(DataBaseConstant.SYS_DATE)|| key.equals(DataBaseConstant.SYS_DATE_TABLE)) { returnValue = user.getSysDate(); } //替换为当前系统时间(年月日时分秒) else if (key.equals(DataBaseConstant.SYS_TIME)|| key.equals(DataBaseConstant.SYS_TIME_TABLE)) { returnValue = user.getSysTime(); } //流程状态默认值(默认未发起) else if (key.equals(DataBaseConstant.BPM_STATUS)|| key.equals(DataBaseConstant.BPM_STATUS_TABLE)) { returnValue = "1"; } if(returnValue!=null){returnValue = returnValue + moshi;} return returnValue; }
Example 3
Source File: JwtUtil.java From teaching with Apache License 2.0 | 4 votes |
/** * 从当前用户中获取变量 * @param key * @param user * @return */ //TODO 急待改造 sckjkdsjsfjdk public static String getUserSystemData(String key,SysUserCacheInfo user) { if(user==null) { user = JeecgDataAutorUtils.loadUserInfo(); } //#{sys_user_code}% // 获取登录用户信息 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); String moshi = ""; if(key.indexOf("}")!=-1){ moshi = key.substring(key.indexOf("}")+1); } String returnValue = null; //针对特殊标示处理#{sysOrgCode},判断替换 if (key.contains("#{")) { key = key.substring(2,key.indexOf("}")); } else { key = key; } //替换为系统登录用户帐号 if (key.equals(DataBaseConstant.SYS_USER_CODE)|| key.equals(DataBaseConstant.SYS_USER_CODE_TABLE)) { if(user==null) { returnValue = sysUser.getUsername(); }else { returnValue = user.getSysUserCode(); } } //替换为系统登录用户真实名字 else if (key.equals(DataBaseConstant.SYS_USER_NAME)|| key.equals(DataBaseConstant.SYS_USER_NAME_TABLE)) { if(user==null) { returnValue = sysUser.getRealname(); }else { returnValue = user.getSysUserName(); } } //替换为系统用户登录所使用的机构编码 else if (key.equals(DataBaseConstant.SYS_ORG_CODE)|| key.equals(DataBaseConstant.SYS_ORG_CODE_TABLE)) { if(user==null) { returnValue = sysUser.getOrgCode(); }else { returnValue = user.getSysOrgCode(); } } //替换为系统用户所拥有的所有机构编码 else if (key.equals(DataBaseConstant.SYS_MULTI_ORG_CODE)|| key.equals(DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE)) { if(user.isOneDepart()) { returnValue = user.getSysMultiOrgCode().get(0); }else { returnValue = Joiner.on(",").join(user.getSysMultiOrgCode()); } } //替换为当前系统时间(年月日) else if (key.equals(DataBaseConstant.SYS_DATE)|| key.equals(DataBaseConstant.SYS_DATE_TABLE)) { returnValue = user.getSysDate(); } //替换为当前系统时间(年月日时分秒) else if (key.equals(DataBaseConstant.SYS_TIME)|| key.equals(DataBaseConstant.SYS_TIME_TABLE)) { returnValue = user.getSysTime(); } //流程状态默认值(默认未发起) else if (key.equals(DataBaseConstant.BPM_STATUS)|| key.equals(DataBaseConstant.BPM_STATUS_TABLE)) { returnValue = "1"; } if(returnValue!=null){returnValue = returnValue + moshi;} return returnValue; }
Example 4
Source File: JwtUtil.java From jeecg-boot with Apache License 2.0 | 4 votes |
/** * 从当前用户中获取变量 * @param key * @param user * @return */ //TODO 急待改造 sckjkdsjsfjdk public static String getUserSystemData(String key,SysUserCacheInfo user) { if(user==null) { user = JeecgDataAutorUtils.loadUserInfo(); } //#{sys_user_code}% // 获取登录用户信息 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); String moshi = ""; if(key.indexOf("}")!=-1){ moshi = key.substring(key.indexOf("}")+1); } String returnValue = null; //针对特殊标示处理#{sysOrgCode},判断替换 if (key.contains("#{")) { key = key.substring(2,key.indexOf("}")); } else { key = key; } //替换为系统登录用户帐号 if (key.equals(DataBaseConstant.SYS_USER_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_USER_CODE_TABLE)) { if(user==null) { returnValue = sysUser.getUsername(); }else { returnValue = user.getSysUserCode(); } } //替换为系统登录用户真实名字 else if (key.equals(DataBaseConstant.SYS_USER_NAME)|| key.toLowerCase().equals(DataBaseConstant.SYS_USER_NAME_TABLE)) { if(user==null) { returnValue = sysUser.getRealname(); }else { returnValue = user.getSysUserName(); } } //替换为系统用户登录所使用的机构编码 else if (key.equals(DataBaseConstant.SYS_ORG_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_ORG_CODE_TABLE)) { if(user==null) { returnValue = sysUser.getOrgCode(); }else { returnValue = user.getSysOrgCode(); } } //替换为系统用户所拥有的所有机构编码 else if (key.equals(DataBaseConstant.SYS_MULTI_ORG_CODE)|| key.toLowerCase().equals(DataBaseConstant.SYS_MULTI_ORG_CODE_TABLE)) { if(user.isOneDepart()) { returnValue = user.getSysMultiOrgCode().get(0); }else { returnValue = Joiner.on(",").join(user.getSysMultiOrgCode()); } } //替换为当前系统时间(年月日) else if (key.equals(DataBaseConstant.SYS_DATE)|| key.toLowerCase().equals(DataBaseConstant.SYS_DATE_TABLE)) { returnValue = user.getSysDate(); } //替换为当前系统时间(年月日时分秒) else if (key.equals(DataBaseConstant.SYS_TIME)|| key.toLowerCase().equals(DataBaseConstant.SYS_TIME_TABLE)) { returnValue = user.getSysTime(); } //流程状态默认值(默认未发起) else if (key.equals(DataBaseConstant.BPM_STATUS)|| key.toLowerCase().equals(DataBaseConstant.BPM_STATUS_TABLE)) { returnValue = "1"; } if(returnValue!=null){returnValue = returnValue + moshi;} return returnValue; }