Because you did not specify @Param 注解,当此时只有一个参数的时候,会自动拆开。Map 类型会按 <String, Object> 拆开。复杂数据类型会根据 getter to disassemble it in the method of mapper interface.
You can refer to this: https://my.oschina.net/triday... .
Owner, I am encountering the same problem as you. According to your comment reply, the parameter type in the mapper file is changed to hashMap. The DAO layer does not need any annotations. The value syntax in the sql statement is the same as yours, but it still does not work. Get the value and solve
Your map is null. You can post the error
Because you did not specify
@Param
注解,当此时只有一个参数的时候,会自动拆开。Map 类型会按<String, Object>
拆开。复杂数据类型会根据getter
to disassemble it in the method of mapper interface.You can refer to this: https://my.oschina.net/triday... .
You specify the key value of the Map in the interface
It may be that the interface Map does not have a specified type. It is recommended to make some modifications:
Owner, I am encountering the same problem as you. According to your comment reply, the parameter type in the mapper file is changed to hashMap. The DAO layer does not need any annotations. The value syntax in the sql statement is the same as yours, but it still does not work. Get the value and solve