mybatis的 choose -- when test -- otherwise 标签和 if test 标签
1.choose标签是按顺序判断其内部when标签中的test条件出否成立,如果有一个成立,则 choose 结束。当 choose 中所有 when 的条件都不满则时,则执行 otherwise 中的sql。类似于Java 的 switch 语句,choose 为 switch,when 为 case,otherwise 则为 default。例如下面例子,同样把所有可以限制的条件都写上,...