Commit 45d6c1e5 by hulei

bugfix: tdh查询

parent 12c5c849
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
</select> </select>
<select id="listTdh" resultMap="VoResultMap"> <select id="listTdh" resultMap="VoResultMap">
select distinct a.INR INR, a.CUR CUR,concat (a.cur,' - ',b.TXT) curname, a.DATESOURCE DATESOURCE, a.DAT DAT, a.DATEDAY DATEDAY, select a.INR INR, a.CUR CUR,concat (a.cur,' - ',b.TXT) curname, a.DATESOURCE DATESOURCE, a.DAT DAT, a.DATEDAY DATEDAY,
date_format(a.DAT, '%Y-%m-%d') DAT_STR from TDH a left join stb b on b.TBL = 'CURTXT' and a.CUR = b.COD and b.UIL = 'EN' date_format(a.DAT, '%Y-%m-%d') DAT_STR from TDH a left join stb b on b.TBL = 'CURTXT' and a.CUR = b.COD and b.UIL = 'EN'
<where> <where>
<choose> <choose>
......
...@@ -8,6 +8,8 @@ import com.brilliance.isc.common.login.res.LoginCacheVo; ...@@ -8,6 +8,8 @@ import com.brilliance.isc.common.login.res.LoginCacheVo;
import com.brilliance.isc.common.login.vo.LoginInfoVO; import com.brilliance.isc.common.login.vo.LoginInfoVO;
import com.brilliance.isc.exception.RestBizException; import com.brilliance.isc.exception.RestBizException;
import com.brilliance.isc.vo.manager.SessionUserVo; import com.brilliance.isc.vo.manager.SessionUserVo;
import jdk.nashorn.internal.ir.annotations.Ignore;
import org.apache.commons.compress.utils.Sets;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
...@@ -18,6 +20,8 @@ import javax.annotation.Resource; ...@@ -18,6 +20,8 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
...@@ -45,22 +49,13 @@ public class ISCAuthInterceptor implements HandlerInterceptor{ ...@@ -45,22 +49,13 @@ public class ISCAuthInterceptor implements HandlerInterceptor{
@Resource @Resource
protected BizLocker bizLocker; protected BizLocker bizLocker;
private void clearUserLock(String requestURI,SessionUserVo sessionUserVo){ private Set<String> ignoreURI =
if(requestURI.indexOf("/logout") > -1){ Sets.newHashSet("login/verify",
logger.info("退出释放等钱用户锁"); "login/changeRole",
bizLocker.unlockAllOfUser(sessionUserVo.getLogName()); "login/changeOrg");
logger.info("Filter中锁释放完毕");
}
}
/** public Set<String> getIgnoreURI() {
* 避免因为异常导致ThreadLocal未被清理 return ignoreURI;
*/
private void clearCache(){
SettleContext.removeUserSession();
SettleContext.removeSessionUserVo();
BchServiceImpl.removeBranchCacheMap();
BchServiceImpl.removeBchInrCacheMap();
} }
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException { public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException {
...@@ -68,7 +63,7 @@ public class ISCAuthInterceptor implements HandlerInterceptor{ ...@@ -68,7 +63,7 @@ public class ISCAuthInterceptor implements HandlerInterceptor{
String requestURI = request.getRequestURI(); String requestURI = request.getRequestURI();
logger.info("本次请求的url["+requestURI+"]"); logger.info("本次请求的url["+requestURI+"]");
if (requestURI.contains("login/verify") || requestURI.contains("login/changeRole") || requestURI.contains("login/changeOrg")){ if(ignoreURI.stream().filter(requestURI::startsWith).findFirst().isPresent()){
return true; return true;
} }
// //
...@@ -103,6 +98,26 @@ public class ISCAuthInterceptor implements HandlerInterceptor{ ...@@ -103,6 +98,26 @@ public class ISCAuthInterceptor implements HandlerInterceptor{
return true; return true;
} }
private void clearUserLock(String requestURI, SessionUserVo sessionUserVo){
if(requestURI.indexOf("/logout") > -1){
logger.info("退出释放等钱用户锁");
bizLocker.unlockAllOfUser(sessionUserVo.getLogName());
logger.info("Filter中锁释放完毕");
}
}
/**
* 避免因为异常导致ThreadLocal未被清理
*/
private void clearCache(){
SettleContext.removeUserSession();
SettleContext.removeSessionUserVo();
BchServiceImpl.removeBranchCacheMap();
BchServiceImpl.removeBchInrCacheMap();
}
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) { public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) {
System.out.println("postHandle: " + request.getRequestURI()); System.out.println("postHandle: " + request.getRequestURI());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment