yuxc
2024-06-04 93f7335e1a52591662d5d37f41ac352860b2ca2a
Source/platformProject/vci-platform-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmSessionForLoginImpl.java
@@ -1,6 +1,7 @@
package com.vci.frameworkcore.compatibility.impl;
import com.vci.corba.common.VCIError;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.data.AttributeValue;
import com.vci.starter.web.annotation.log.VciUnLog;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.interceptor.VciSessionForLoginI;
@@ -18,7 +19,6 @@
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import plm.bs.bom.common.AttributeValue;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
@@ -88,7 +88,7 @@
        WebUtil.alertNotNull(userId,"用户名");
        try{
            platformClientUtil.getBOFactoryService().executeUpdateSql("delete from VCI_SESSIONINFO where userid ='" + userId.trim() + "'");
        }catch (VCIError e){
        }catch (PLException e){
            throw WebUtil.getVciBaseException(e);
        }
    }
@@ -110,7 +110,7 @@
            platformClientUtil.getBOFactoryService().executeUpdateSqlByParams("    insert into VCI_SESSIONINFO (USERID, TOKEN, JSONSTRING,lastRequestTime\n" +
                    "      )\n" +
                    " VALUES (?,?,?," + System.currentTimeMillis() + " )", attrs);
        }catch (VCIError e){
        }catch (PLException e){
            throw WebUtil.getVciBaseException(e);
        }
    }
@@ -143,7 +143,7 @@
        WebUtil.alertNotNull(userToken,"会话许可码");
        try{
            platformClientUtil.getBOFactoryService().executeUpdateSql("update VCI_SESSIONINFO set lastRequestTime = " + String.valueOf(System.currentTimeMillis()) + " where TOKEN ='" + userToken.trim() + "'");
        }catch (VCIError e){
        }catch (PLException e){
            throw WebUtil.getVciBaseException(e);
        }
    }
@@ -180,7 +180,7 @@
        WebUtil.alertNotNull(userToken,"用户许可");
        try{
            platformClientUtil.getBOFactoryService().executeUpdateSql("delete from VCI_SESSIONINFO where TOKEN ='" + userToken.trim() + "'");
        }catch (VCIError e){
        }catch (PLException e){
            throw WebUtil.getVciBaseException(e);
        }
    }
@@ -224,7 +224,7 @@
                WebUtil.switchCollectionForOracleIn(tokenList).stream().forEach(tokens -> {
                    try {
                        platformClientUtil.getBOFactoryService().executeUpdateSql("delete from VCI_SESSIONINFO where TOKEN in (" + WebUtil.toInSql(tokens.toArray(new String[0])) + ")");
                    } catch (VCIError e) {
                    } catch (PLException e) {
                        if (logger.isErrorEnabled()) {
                            logger.error("删除会话信息", e);
                        }