liurunyu
昨天 d3e363c454df3cc457f1cf8b46d18cae3bc14eb5
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/config/VirtualCardInUseInterceptor.java
@@ -17,7 +17,7 @@
import java.lang.reflect.Method;
/**
 * 拦截虚拟卡表的更新操作,设置占用状态操作的使不能
 * 拦截虚拟卡表的更新操作,使不能设置占用状态操作。
 */
@Intercepts({
        @Signature(
@@ -42,11 +42,11 @@
        if (entity instanceof SeVirtualCard) {
            MappedStatement mappedStatement = (MappedStatement) invocation.getArgs()[MAPPED_STATEMENT_INDEX];
            SqlCommandType commandType = mappedStatement.getSqlCommandType();
            if (commandType.equals(SqlCommandType.INSERT)) {
            if (commandType.equals(SqlCommandType.UPDATE)) {
                Class<?> entityClass = entity.getClass();
                Method setInUse = null;
                try {
                    setInUse = entityClass.getMethod(BASE_FIELD_SET_PRIMARY_KEY_FUNTION_SETINUSE, Long.class);
                    setInUse = entityClass.getMethod(BASE_FIELD_SET_PRIMARY_KEY_FUNTION_SETINUSE, Byte.class);
                } catch (Exception e) {
                    //当entityClass没有setInUse方法时,会抛出异常
                }