| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |