0
点赞
收藏
分享

微信扫一扫

MyBatis: Mapper中方法定义多个参数要加@Param(“xxx“)注解


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);

}


举报

相关推荐

0 条评论