解决jdbctemplate查询参数为集合类型时,查不出数据的问题

This commit is contained in:
aoshiguchen
2022-08-06 20:35:55 +08:00
parent bc7ecaac6e
commit 484ff4e555
5 changed files with 48 additions and 19 deletions
@@ -22,6 +22,7 @@
package fun.asgc.neutrino.proxy.server.dal;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.annotation.Param;
import fun.asgc.neutrino.core.db.annotation.ResultType;
import fun.asgc.neutrino.core.db.annotation.Select;
import fun.asgc.neutrino.core.db.mapper.SqlMapper;
@@ -55,6 +56,6 @@ public interface UserMapper extends SqlMapper {
UserDO findById(Integer id);
@ResultType(UserDO.class)
@Select("select * from user where id in (?)")
List<UserDO> findByIds(Set<Integer> ids);
@Select("select * from user where id in (:ids)")
List<UserDO> findByIds(@Param("ids") Set<Integer> ids);
}