今天遇到一个问题,半天没看出来问题,特意记录一下

Dao

ConfigEvaluation findConfigEvaluationByEvalpecent(BigDecimal evalPercent);

Mapper.xml

<select id="findConfigEvaluationByEvalpecent"  resultType="com.pacific.rspBonus.model.po.twBonus.mbg.ConfigEvaluation" parameterType="java.math.BigDecimal">
select * from Config_Evaluation
where #{evalPercent} between evalStart and evalEnd
</select>

Service
ConfigEvaluation configEvaluationByEvalpecent = configEvaluationMapperQuery.findConfigEvaluationByEvalpecent(new BigDecimal(8888));

我之前错把sql写成如下,导致半天没找到原因。所以以后遇到问题还是得仔细排查。
<select id="findConfigEvaluationByEvalpecent"  resultType="com.pacific.rspBonus.model.po.twBonus.mbg.ConfigEvaluation" parameterType="java.math.BigDecimal">
select * from Config_Evaluation
where evalPercent=#{evalPercent} between evalStart and evalEnd
</select>
 
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。