1. 程式人生 > >MyBatis註解select in引數

MyBatis註解select in引數

/**
 * 
 * @param ids '1,2,3'
 * @return
 */

@Select("select * from user_info where id in (${ids})")

List<UserInfo> getUserbyIds(@Param("ids")String ids);

引數需要使用${}來引用,#{}不能識別。