Commit 73eb3501 authored by ZhengJie's avatar ZhengJie
Browse files

[代码优化](v2.5): @Query 加入 INNER 查询

close https://github.com/elunez/eladmin/issues/415
parent a24d4f77
......@@ -80,8 +80,8 @@ public @interface Query {
* 适用于简单连接查询,复杂的请自定义该注解,或者使用sql查询
*/
enum Join {
/** jie 2019-6-4 13:18:30 左右连接 */
LEFT, RIGHT
/** jie 2019-6-4 13:18:30 */
LEFT, RIGHT, INNER
}
}
......
......@@ -100,6 +100,13 @@ public class QueryHelp {
join = root.join(name, JoinType.RIGHT);
}
break;
case INNER:
if(ObjectUtil.isNotNull(join) && ObjectUtil.isNotNull(val)){
join = join.join(name, JoinType.INNER);
} else {
join = root.join(name, JoinType.INNER);
}
break;
default: break;
}
}
......
Supports Markdown
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