如果传参类型是字符串类型,要将对比的参数字符串化,不然,参数不能被识别为字符串,比较就不成功 <choose> <when test="dateType == '1'.toString()"> date_format(a.QQSJ, '%h') as qqsj, </when> <otherwise> date_format(a.QQSJ, '%Y-%m-%d') as qqsj, </otherwise> </choose>
mybatis <choose><when> 的判断条件不生效
最新推荐文章于 2025-02-26 09:29:19 发布