By default, datetime is stored in the format yyyY-MM-DD HH: SS: MM.

If mybatis or Plus uses this field as a filter, mybatis will use timestamp by default, that is, the date will be converted to a long value in milliseconds.

Mysql datetime is converted to timestamps, which are converted to seconds by default.

Mybatis does not use datetime as the default datetime.

Solution:

1. Change the field type to datetime(4), i.e., to the millisecond

2. Pass in the date string

3. Format the date