枚举参数使用

  1. <!-- 直接比较枚举 -->
  2. <if test="xxEnum = @xx.xx.XxEnum@FieldEnum">
  3. ...
  4. </if>
  5. <if test="dto.projectTypeEnum == @com.hbte.sharp.common.enums.projectEnum.ProjectTypeEnum@PROJECT">
  6. <include refid="if_project_entity"/>
  7. </if>
  8. <if test="dto.projectTypeEnum == @com.hbte.sharp.common.enums.projectEnum.ProjectTypeEnum@TASK">
  9. <include refid="if_project_task"/>
  10. </if>
  11. <!-- 比较枚举的值 -->
  12. <if test="xxVal = @xx.xx.XxEnum@FieldEnum.getXxVal">
  13. ...
  14. </if>
  15. <if test="cityName == @com.weather.weatherexpert.common.utils.City@XINZHOU.getName">
  16. and city_name=#{cityName}
  17. </if>