例子如下:
当iouStatus为1的时候,我们查询状态7006的数据。
当iouStatus为3的时候,我们查询状态7006,7007的数据。
当iouStatus为4的时候,我们查询状态7007的数据。
<choose>
<when test='dto.iouStatus=="1"'>and t3.iou_state in(7006)
</when>
<when test='dto.iouStatus=="3"'>
and t3.iou_state in(7006,7007)
</when>
<when test='dto.iouStatus=="4"'>
and t3.iou_state in(7007)
</when>
<otherwise>
</otherwise>
</choose>
本文介绍了一个根据变量iouStatus的不同值进行数据库状态查询的例子。当iouStatus取不同值时,会查询对应的一组状态数据。使用了类似XML的标签来表示不同的条件分支。
3649

被折叠的 条评论
为什么被折叠?



