| | |
| | | && NacosConfigCache.getAdminUserInfo().getUserName().equals(AuthUtil.getUserName()); |
| | | } |
| | | |
| | | /** |
| | | * 从map中获取值,并且可以忽略大小写 |
| | | * @param map |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public static Object getMapValueIgnoreCase(Map<String, Object> map,String key){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | if (entry.getKey().equalsIgnoreCase(key)) { |
| | | return entry.getValue(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 从map中获取值,并且可以忽略大小写 |
| | | * @param map |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public static String getMapStrValueIgnoreCase(Map<String, String> map,String key){ |
| | | for (Map.Entry<String, String> entry : map.entrySet()) { |
| | | if (entry.getKey().equalsIgnoreCase(key)) { |
| | | return entry.getValue(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static String getPk() { |
| | | return String.valueOf(getPKLong(1,1)); |
| | | } |
| | |
| | | } |
| | | String value = tableField.value(); |
| | | if(net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils.isNotBlank(value)){ |
| | | fieldMap.put(declaredField.getName(), value); |
| | | fieldMap.put(declaredField.getName(), value.trim()); |
| | | } |
| | | } |
| | | } |
| | |
| | | ((!"".equals(existField) && !existField.contains(propertyName.toLowerCase()+","))||"data".equals(propertyName))) { |
| | | Method readMethod = descriptor.getReadMethod(); |
| | | Object result = readMethod.invoke(bean, new Object[0]); |
| | | if(result instanceof String){ |
| | | result=((String) result).trim(); |
| | | } |
| | | |
| | | if (result != null) { |
| | | if ("data".equals(propertyName)){ |
| | |
| | | && Func.isBlank(String.valueOf(mapData.get(o)))){ |
| | | continue; |
| | | } |
| | | returnMap.put(String.valueOf(o).toLowerCase(),mapData.get(o)); |
| | | Object result=mapData.get(o); |
| | | if(result instanceof String){ |
| | | result=((String) result).trim(); |
| | | } |
| | | returnMap.put(String.valueOf(o).toLowerCase(),result); |
| | | } |
| | | } |
| | | return returnMap; |
| | |
| | | } |
| | | return sum; |
| | | } |
| | | /*** |
| | | * 校验是否是罗马数字 |
| | | * @param s |
| | | * @return |
| | | */ |
| | | public static boolean isRoman(String s) { |
| | | // 检查输入的字符串是否为空 |
| | | if (s == null || s.length() == 0) { |
| | | return false; |
| | | } |
| | | // 将输入的字符串转换为大写字母 |
| | | s = s.toUpperCase(); |
| | | // 返回结果 |
| | | Pattern pattern = Pattern.compile("^M{0,3}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$"); |
| | | return pattern.matcher(s ).matches(); |
| | | } |
| | | |
| | | public static String intToRomanTwo(int num) { |
| | | String M[] = {"", "M", "MM", "MMM"}; |