浏览代码

Merge remote-tracking branch 'origin/yonge' into yonge

Joburgess 5 年之前
父节点
当前提交
2ab67d6f7a

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -156,7 +156,7 @@
 				and id_ = #{id}
 			</if>
         	<if test="type != null">
-				and type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+				and type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 			</if>
         	<if test="groupType != null">
 				and group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
@@ -183,7 +183,7 @@
 				and id_ = #{id}
 			</if>
         	<if test="type != null">
-				and type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+				and type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 			</if>
         	<if test="groupType != null">
 				and group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}

+ 4 - 4
mec-gateway/mec-gateway-web/src/main/java/com/ym/mec/gateway/web/filter/AuthFilter.java

@@ -12,7 +12,7 @@ import com.netflix.zuul.exception.ZuulException;
 public class AuthFilter extends ZuulFilter {
 
 	@Override
-	public Object run() throws ZuulException {
+	public Object run() throws ZuulException {//过滤器核心业务方法
 		RequestContext requestContext = RequestContext.getCurrentContext();
 		HttpServletRequest request = requestContext.getRequest();
 
@@ -21,17 +21,17 @@ public class AuthFilter extends ZuulFilter {
 	}
 
 	@Override
-	public boolean shouldFilter() {
+	public boolean shouldFilter() {// 返回true,必须执行过滤器;false,不执行过滤器
 		return true;
 	}
 
 	@Override
-	public int filterOrder() {
+	public int filterOrder() {// 过滤器的执行顺序,数字越小越先执行
 		return 0;
 	}
 
 	@Override
-	public String filterType() {
+	public String filterType() {// 过滤类型,前置过滤器,后置过滤器
 		return "pre";
 	}