蔡香满屋
站在牛顿头上吃苹果

 判断0.0,需要加 .toString()进行判断

dto接收前端传入进来的0的数字,经过后端的dto接收后,变成了0.0Double类型的数据。

/**
 * 绩点
*/ @ApiModelProperty("绩点") @JsonProperty(value="GPAValue") private java.lang.Double GPAValue;

在xml文件需要加上'0'.toString()如:

 <if test="GPAValue != null and GPAValue != '' or GPAValue == '0'.toString() ">
          and  JD = #{GPAValue,jdbcType=NUMERIC}
 </if>

  

posted on 2019-05-07 20:05  蔡香满屋  阅读(1037)  评论(0)    收藏  举报