<if test="dtEnum == @com.xxx.xxx.TestTypeEnum@HOUR">
  DATE_FORMAT(TM,'%Y-%m-%d %H') as keyStr,
</if>

TestTypeEnum定义如下:

HOUR("hour"),
DAY("day"),
MONTH("month"),
YEAR("year");

 YesOrNoEnum定义如下:
YES(1, "是"),
NO(2, "否")


<if test="e.chip ==@com.rongyi.platform.cloudwalk.enums.YesOrNoEnum@YES">
and pid != 0
</if>
<if test="e.chip == @com.rongyi.platform.cloudwalk.enums.YesOrNoEnum@NO">
and pid = 0
</if>
<if test="e.status !=null">
and status = #{e.status, jdbcType=INTEGER}
</if>
posted on 2021-01-29 18:49  毛会懂  阅读(2784)  评论(1编辑  收藏  举报