1.在接口中定义相对应的方法
    image.png

    2.在mapper文件中写sql语句
    image.png

    image.png

    3.测试
    image.png
    image.png