時間:2024-03-09 11:51作者:下載吧人氣:21
第一種:返回值通過out輸出 sqlserver存儲
testMapper.xml
兩種都能接收到數(shù)據(jù)的, 因為我的實體類字段與數(shù)據(jù)庫的不一致,上面圖片是按照數(shù)據(jù)庫字段定義的,下圖是按照實體類定義的,接收輸出參數(shù)是按照你定義的名稱返回
serviceImpl
Map<String,String> objectsMap = new HashMap<>();
objectsMap.put(“sno”,”123″);
objectsMap.put(“sname”,”123″);
testMapper.test(objectsMap);
System.out.println(map.get(“Return_rescode”));
System.out.println(map.get(“Return_resmsg”));
盖楼回复X
(您的评论需要经过审核才能显示)
網(wǎng)友評論