场景

接口返回productDate为2020-06-01这样的字符串。
A表中productDate为String。
B表中productDate为Date。

那么查询时,A表字段不用动。
B表字段需要加to_char(productDate,‘yyyy-MM-dd’)

插入、更新时:
B表字段不用变化。

变化

版本大变更,A类 productDate 类型由String变为Date

查询时:
A表productDate都要加to_char(productDate,‘yyyy-DD-mm’)
B表仍保留之前的to_char(productDate,‘yyyy-MM-dd’)

插入、更新时:
暂时不用动。

其他

要不要直接改mapper.xml

当然不要改,因为mapper.xml可能被不止一个方法调用。
适配了一处,可能还会引发其他问题,所以最好找到调用处,看是如何调用的,然后再决定如何处理。