Commit 45d6c1e5 by hulei

bugfix: tdh查询

parent 12c5c849
......@@ -140,7 +140,7 @@
</select>
<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'
<where>
<choose>
......
......@@ -8,6 +8,8 @@ import com.brilliance.isc.common.login.res.LoginCacheVo;
import com.brilliance.isc.common.login.vo.LoginInfoVO;
import com.brilliance.isc.exception.RestBizException;
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.LoggerFactory;
import org.springframework.data.redis.core.RedisTemplate;
......@@ -18,6 +20,8 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.TimeUnit;
......@@ -45,22 +49,13 @@ public class ISCAuthInterceptor implements HandlerInterceptor{
@Resource
protected BizLocker bizLocker;
private void clearUserLock(String requestURI,SessionUserVo sessionUserVo){
if(requestURI.indexOf("/logout") > -1){
logger.info("退出释放等钱用户锁");
bizLocker.unlockAllOfUser(sessionUserVo.getLogName());
logger.info("Filter中锁释放完毕");
}
}
private Set<String> ignoreURI =
Sets.newHashSet("login/verify",
"login/changeRole",
"login/changeOrg");
/**
* 避免因为异常导致ThreadLocal未被清理
*/
private void clearCache(){
SettleContext.removeUserSession();
SettleContext.removeSessionUserVo();
BchServiceImpl.removeBranchCacheMap();
BchServiceImpl.removeBchInrCacheMap();
public Set<String> getIgnoreURI() {
return ignoreURI;
}
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException {
......@@ -68,7 +63,7 @@ public class ISCAuthInterceptor implements HandlerInterceptor{
String requestURI = request.getRequestURI();
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;
}
//
......@@ -103,6 +98,26 @@ public class ISCAuthInterceptor implements HandlerInterceptor{
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) {
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