| | |
| | | Map.Entry<String, Object> entry = (Map.Entry<String, Object>) iterator.next(); |
| | | if (entry.getKey().startsWith("param")) { |
| | | Object v = entry.getValue(); |
| | | EncryptQueryClass encryptQueryClass = AnnotationUtils.findAnnotation(v.getClass(), EncryptQueryClass.class); |
| | | if (Objects.nonNull(encryptQueryClass)) { |
| | | Field[] declaredFields = v.getClass().getDeclaredFields(); |
| | | for (Field field : declaredFields) { |
| | | if (field.isAnnotationPresent(EncryptQuery.class)) { |
| | | try { |
| | | final Object encrypt = encryptDecrypt.encrypt(new Field[]{field}, v); |
| | | paramMap.put("encrypted", true); |
| | | } catch (IllegalAccessException e) { |
| | | e.printStackTrace(); |
| | | if(v!=null) { |
| | | EncryptQueryClass encryptQueryClass = AnnotationUtils.findAnnotation(v.getClass(), EncryptQueryClass.class); |
| | | if (Objects.nonNull(encryptQueryClass)) { |
| | | Field[] declaredFields = v.getClass().getDeclaredFields(); |
| | | for (Field field : declaredFields) { |
| | | if (field.isAnnotationPresent(EncryptQuery.class)) { |
| | | try { |
| | | final Object encrypt = encryptDecrypt.encrypt(new Field[]{field}, v); |
| | | paramMap.put("encrypted", true); |
| | | } catch (IllegalAccessException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |