package com.example.demo.mybatis;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
/**
 * <p>
 *
 * </p>
 *
 * @author shyane
 * @date 2019/12/9
 */
@Mapper
public interface EntityMapper {

    @Insert("INSERT INTO entity (id, name, context) VALUES(#{id}, #{name}, #{context})")
    void insert(Entity entity);

    @Select("SELECT id, name, context FROM entity WHERE id = #{id}")
    City findById(String id);

}
