单个新增 :
/**
* 插入菜单
* @param menuInfo
* @return
*/
int insertMenuInfo(MenuInfo menuInfo);
xml:
<insert id="insertMenuInfo" parameterType="com.XXXX..MenuInfo" keyProperty="id" useGeneratedKeys="true">
核心是 :
keyProperty="id" useGeneratedKeys="true"
批量新增 :
int insertMenuInfoBatch(List<MenuInfo > menuInfoList );
xml:
也是一样的