提交 ff13c3e4 authored 作者:  狄熙卜's avatar 狄熙卜

替换example类的引用

上级 8d0aff2d
......@@ -11,7 +11,6 @@ import cn.gtmap.bdcdj.core.encrypt.adapter.encrypt.EmptyEncryptAdapter;
import cn.gtmap.bdcdj.core.encrypt.adapter.encrypt.EncryptAdapter;
import cn.gtmap.bdcdj.core.encrypt.adapter.encrypt.SimpleEncryptAdapter;
import cn.gtmap.bdcdj.core.encrypt.annotation.EncryptField;
import cn.gtmap.estateplat.core.support.mybatis.mapper.CommonMapper;
import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -48,7 +47,7 @@ public class EncryptAdapterBuilder {
return EMPTY_ENCRYPT_ADAPTER;
} else if (method != null && !ArrayUtils.isEmpty(method.getParameterTypes())) {
//优先确定是否是commonmapper,这种情况下不会有sql的配置,也不会有注解
if (method.getDeclaringClass().equals(CommonMapper.class)) {
if (method.getDeclaringClass().getName().contains("CommonMapper")) {
return new CommonEncryptAdapter(method, cryptProperties);
} else if (hasParamEncryptAnnotation(method)) {//如果参数上有注解,将参数加密
return new AnnotationEncryptAdapter(cryptProperties);
......@@ -66,7 +65,7 @@ public class EncryptAdapterBuilder {
if (!cryptProperties.isCryptEnable()) {
return EMPTY_DECRYPT_ADAPTER;
} else if (method != null && method.getReturnType() != Void.class) {
if (method.getDeclaringClass().equals(CommonMapper.class)) {
if (method.getDeclaringClass().getName().contains("CommonMapper")) {
return new CommonDecryptAdapter(this.entityClass, cryptProperties);
}else if(hasMethodEnctyptAnnotation(method)){
return new AnnotationDecryptAdapter(cryptProperties);
......
......@@ -5,7 +5,7 @@ import cn.gtmap.bdcdj.core.encrypt.LogicalOperatorEnum;
import cn.gtmap.bdcdj.core.encrypt.handler.CryptHandler;
import cn.gtmap.bdcdj.core.encrypt.handler.CryptHandlerFactory;
import cn.gtmap.bdcdj.core.encrypt.handler.ListCryptHandler;
import cn.gtmap.estateplat.core.support.mybatis.mapper.Example;
import cn.gtmap.bdcdj.core.mybatisMapper.entity.Example;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
......
package cn.gtmap.bdcdj.core.exception;
/**
*
* @author jane
* @date 14-1-7
*/
public class BdcdjException extends RuntimeException{
public BdcdjException() {
super();
}
/**
* @param msg
*/
public BdcdjException(String msg){
super(msg);
}
/**
* @param cause
*/
public BdcdjException(Throwable cause) {
super(cause);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论