package tju.MyBtsBasic.mapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import tju.MyBtsBasic.domain.Season;
public interface XinwenMapper {
@Insert("insert into xinwen(content,happenSeason,reportSeason) values(#{content},#{happenSeason},#{reportSeason})")
//@Insert("insert into xinwen values(null,#{content},#{happenSeason},#{reportSeason})")
int addXinwen(@Param("content") String content,@Param("happenSeason") Season happenSeason,@Param("reportSeason")Season reportSeason);
}
MyBatis: Mapper中方法定义多个参数要加@Param(“xxx“)注解
最新推荐文章于 2024-08-18 17:24:43 发布