Skip to content
Justice-love edited this page Jun 23, 2017 · 1 revision

mapper配置

@Mapper
public interface UserMapper {

    @KeyParam("#root")
    List<User> selectById(Integer id);

    @KeyParam("#root")
    int insert(String name);

    @KeyParam("id")
    int update(User user);

    @KeyParam("#root")
    int delete(Integer id);
}
  • @KeyParam: 定义需要进行Sql重写的接口。 value:ognl表达式

Clone this wiki locally