rk
4 天以前 e39dda2f25df9680e66c9e0dd3a606149e21bcc5
server/services/src/main/java/com/doumee/config/jwt/WebMvcConfig.java
@@ -160,7 +160,7 @@
            }
            String openid = shop.getOpenid();
            Integer shopId = getTokenId(token);
            Integer isDeleted = dao.queryForObject(" select COALESCE(ISDELETED,0)  from shop_info where id  = ?", Integer.class, shopId);
            Integer isDeleted = dao.queryForObject(" select COALESCE(DELETED,0)  from shop_info where id  = ?", Integer.class, shopId);
            if(isDeleted== Constants.ONE){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"商户已删除,请联系管理员");
            }
@@ -168,11 +168,11 @@
            if(isForbidden == Constants.ONE){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"商户已禁用,请联系管理员");
            }
            String dbOpenid = dao.queryForObject(" select ifnull(openid,'')  from shop where id  = ?", String.class, shopId);
            String dbOpenid = dao.queryForObject(" select ifnull(openid,'')  from shop_info where id  = ?", String.class, shopId);
            if(StringUtils.isBlank(dbOpenid)||!openid.equals(dbOpenid)){
                throw new BusinessException(ResponseStatus.TOKEN_EXCEED_TIME);
            }
            Integer count = dao.queryForObject("select count(1) from shop where id  = ?", Integer.class, shopId);
            Integer count = dao.queryForObject("select count(1) from shop_info where id  = ?", Integer.class, shopId);
            if (count != null && count > 0) {
                request.setAttribute(JwtTokenUtil.SHOP_ID, shop.getId());
                return true;