in the configuration file. There are two types of enumeration classes that come with them.
<!-- handle enum --> <typeHandlers> <typeHandler handler="org.apache.ibatis.type.EnumOrdinalTypeHandler"javaType="com.ryt.manage.entity.OrderType"/> </typeHandlers>
There is no need to do any processing in Mapper.xml
<result property="orderType" column="order_type"/>
Remember that there is a default construction method in the Entity class. If not, it will result in an error of no construction.