Skip to content

Commit 643890d

Browse files
committed
vipshop#470 修复作业配置 groups 为null时,导致显示不出来的问题
1 parent 5ce0a5a commit 643890d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

saturn-console-api/src/main/resources/mapper/CurrentJobConfigMapper.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@
6767
<where>
6868
namespace = #{namespace,jdbcType=VARCHAR}
6969
<if test="condition.groups != null">
70-
and groups = #{condition.groups}
70+
and (
71+
groups = #{condition.groups}
72+
<if test="condition.groups == ''">
73+
or groups is NULL
74+
</if>
75+
)
7176
</if>
7277
<if test="condition.isEnabled != null">
7378
and is_enabled = #{condition.isEnabled}
@@ -99,7 +104,12 @@
99104
<where>
100105
namespace = #{namespace,jdbcType=VARCHAR}
101106
<if test="condition.groups != null">
102-
and groups = #{condition.groups}
107+
and (
108+
groups = #{condition.groups}
109+
<if test="condition.groups == ''">
110+
or groups is NULL
111+
</if>
112+
)
103113
</if>
104114
<if test="condition.isEnabled != null">
105115
and is_enabled = #{condition.isEnabled}

0 commit comments

Comments
 (0)