Long companyAuthId = SeqkeyUtil.getSeqKey(vids, "COMPANY_AUTH_ID");
CompanyAuth comtmp = companyList.get(0);
String sql = "merge into COMPANY_AUTH auth using (select ? MOBILE from dual) tmp on (auth.mobile=tmp.mobile)"+
" WHEN MATCHED THEN"+
" UPDATE SET auth.reserve=?"+
" WHEN NOT MATCHED THEN"+
" INSERT (id,MOBILE) VALUES (?, ?)";
vids.update(sql, new Object[]{comtmp.getMobile(),comtmp.getReserve(),companyAuthId+"",comtmp.getMobile()});
2、多条数据(批处理)
Long companyAuthId = SeqkeyUtil.getSeqKey(vids, "COMPANY_AUTH_ID");//seqs 表主键使用
List