<if test="rq.status != null and rq.status != ''">
<choose>
<when test="rq.status == '2'.toString()">
and (status='2' or (CONCAT(promEndDate,CONCAT(' ',promEndTime)) < date_format(now(), '%Y-%m-%d %H:%i')))
</when>
<when test="rq.status == '1'.toString()">
and (status='1' and (CONCAT(promEndDate,CONCAT(' ',promEndTime)) >= date_format(now(), '%Y-%m-%d %H:%i')))
</when>
<when test="rq.status == '0'.toString()">
and (status='0' and (CONCAT(promEndDate,CONCAT(' ',promEndTime)) >= date_format(now(), '%Y-%m-%d %H:%i')))
</when>
<otherwise>
and status = #{rq.status}
</otherwise>
</choose>
</if>```
java如何实现(数据库中没有对应的字段值)状态查询,启用,禁用,结束
猜你喜欢
转载自blog.csdn.net/linyiwwy/article/details/131836046
今日推荐
周排行