liurunyu
4 天以前 4b99aedffe4e64425c059611dbb89d7d28b9ed06
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/config/VirtualCardInUseInterceptor.java
@@ -42,16 +42,16 @@
        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方法时,会抛出异常
                }
                if (setInUse != null) {
                    setInUse.invoke(entity, 0);
                    setInUse.invoke(entity, (byte)0);
                }
                invocation.getArgs()[PARAMETER_INDEX] = entity;
            }