Artikel ini terutama memperkenalkan cara menyimpan data entitas. Konten spesifik adalah sebagai berikut;
1. Sampel XML
<? Xml Version = "1.0" encoding = "gbk"?> <!-1..1-> <cisreports batno = "query batch number" unitname = "nama unit kueri" suborgan = "nama cabang" queryUserid = "query name login" querycount = "query name" querymed = "query name login" querycount = "query name dari queryMyMed" query "query" querycount = "query name dari querymy" query "query" query "query" query "query" query "query" query "query" query "query" query "query" HH24:mm:ss"> <!-- The following are the query results for each query application 1..n --> <cisReport reportID="Report number" buildEndTime="Report generation end time, format YYYY-MM-DD HH24:mm:ss" queryReasonID="Query reason ID, see the data dictionary for details" subReportTypes="Query fee subreport ID, multiple fee subreport IDs are separated by commas" treatmentResult="Compact fee count times of fee subreport, corresponding to subReportTypes, is a set of values greater than or equal to 0, separated by commas" subReportTypesShortCaption="Query fee subreport Chinese name" refID="Query ID, is the reference ID in the query application condition" hasSystemError="Is there a system error, true: there is an error, false: no error" isFrozen="Whether the customer is frozen, true: frozen, false: not frozen"> <!-- 1Query condition information 1..1 --> <queryConditions> <!-- 1..n --> <item> <name>Query Condition English Name</name> <caption>Query Condition Chinese Name</caption> <value>Query Condition Value</value> </item> </queryconditions> <!-2 Authentication1entity1..1-> <policeCheckInfo subreportType = "10602" SubreportTypeCost = "96040" TOBATIONRESULT = "LITE SUBREPORT STATUS, 1: Temukan, 2: Tidak Ditemukan, 3: Tidak Ditemukan untuk Alasan lain" LIHAT DERRECTC = KODEP = KODEP = NOT YANG BULU Kamus Saat Treatresult! = 3, Properti ini tidak ada "errorMessage =" Kesalahan Deskripsi Informasi Ketika Treatresult = 3, Ketika Treatresult! = 3, Nilai Properti ini kosong "> <name> <name> Nama queryee </name> <documentno> Nama Queryee </documentno> <!-1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, result, 1, consistent 2, inconsistent</result> </item> </policeCheckInfo> <!-- 3 persons mobile number verification 1..1 --> <mobileCheckInfo subReportType="13612" subReportTypeCost="96040" treatmentResult="Subreport query status, 1: Find, 2: Not found, 3: Not found for other reasons" "Error Code = "TreatreSult = 3, lihat kamus data untuk detailnya. Ketika TreatreSult! = 3, atributnya tidak ada." errorMessage="Error description information when treatResult=3, when treatResult!=3, the value of this attribute is empty"> <!---treatresult is 2 and 3, there are no following nodes--> <item> <nameCheckResult> Name verification results, including: consistent, basically consistent, inconsistent, and inconsistent</nameCheckResult> <documentNoCheckResult> Document number verification results, including: consistent, inconsistent, and inconsistent</documentNoCheckResult> <phoneCheckResult>Mobile number verification results: consistent, uncheckable</phoneCheckResult> <areaInfo>Number Attribution</areaInfo> <operator>Operator 1: China Telecom 2: China Mobile 3: China Unicom</operator> </item> </mobileCheckInfo> <!-Ringkasan 4 Risiko Anti-Penipuan Pribadi 1..1-> <PersonantispoofingDescinfo SubreportType = "14225" SubreportTypeCost = "96040" TreatesResult = "Kode Kode Terbaik, 1: 1: Ditemukan, 2: Tidak Ditemukan, 3: Tidak Ditemukan untuk Alasan lainnya. Treatsult! = 3, atribut tidak ada. Seperti dalam contoh berikut, mungkin kosong, dan mungkin ada 0 atau n dari mereka, yang dapat dikembalikan sesuai dengan hasil spesifik. 1. Skor risiko anti-penipuan adalah 100 poin, tingkat risikonya tinggi, dan disarankan untuk menolak. 2. Nomor ponsel telekomunikasi 131 **** 1542 telah digunakan selama kurang dari 1 bulan. 3. Tekan daftar pesta wol. 4. Daftar risiko penipuan hit. 5. Daftar personel berisiko tinggi. 6. Ada 7 catatan kredit yang terlambat. 7. Ada 40 informasi ringkasan risiko pribadi. 8. Dalam dua tahun terakhir, informasi pribadi saya telah ditanya 23 kali. --> <personAntiSpoofingDesc> Personal Anti-Fraud Review Information</personAntiSpoofingDesc> </personAntiSpoofingDesc> <!--5 Personal Anti-Fraud Risk Score Information 1..1 --> <personAntiSpoofingInfo subReportType="14224" subReportTypeCost="96040" treatmentResult="SubReport query status, 1: Find, 2: Not Diperiksa, 3: Tidak diperiksa untuk alasan lain "kode kesalahan saat treaterrorcode =" Treatresult = 3, lihat kamus data untuk detailnya. errorMessage = "Kesalahan Deskripsi Informasi Ketika Treatresult = 3, Saat Treatresult! = 3, Nilai properti ini kosong"> <! ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 6 Informasi Status Nomor Ponsel 1..1 -> <MobileStatusInfo SubreportType = "13611" SubreportTypeCost = "96040" TreatesResult = "Status Kueri Subreportasi, 1: Temukan, tidak ditemukan, 3: tidak ditemukan karena alasan lain" "Kode kesalahan =" TREATRESULT = 3, lihat DATA DATA; errorMessage="Error description information when treatResult=3, when treatResult!=3, the value of this attribute is empty"> <!--When treatreatresult is 2 or 3, there are no following nodes--> <item> <operator>Operator 1: China Telecom 2: China Mobile 3: China Unicom</operator> <areaInfo>Mobile number attribution</areaInfo> <phoneStatus>Mobile status 1: Penggunaan Normal 2: Shutdown 3: Tidak Diaktifkan 4: Angka Dibatalkan 5-lainnya 6: Pra-Kekelsa </phonestatus> <T TimeLength> Nomor ponsel di Internet, seperti: waktu di internet, kurang dari 1 bulan, 1-2 bulan, 7 bulan, 7-12 bulan </timelength> <celtime> Jumlah Kankelasi </7 bulan </TimeLengt </TimeLengt> Apakah akan menekan daftar pihak wol 1..1-> <econnoisserurinfo subreportType = "14228" subreporttypeCost = "96040" TOBATIRRESULT = "Subreport Query Status, 1: Temukan, 2: Tidak Ditemukan, 3: Tidak Ditemukan Untuk Alasan Lain" "Kode Kesalahan =" Kode Kesalahan. Ketika Treatresult! = 3, atribut tidak ada "errorMessage =" informasi deskripsi kesalahan ketika treatresult = 3, ketika treatresult! = 3, nilai atribut ini kosong "> <! --------------------------------------------------------------------------------------------------------------------------------------------------------------- SubreportTypeCost = "96040" TOBATIRRESULT = "Status kueri subreport, 1: temukan, 2: tidak ditemukan, 3: tidak ditemukan karena alasan lain" "treaterrorcode =" TreatreSult = 3 Kode kesalahan, lihat KAMPREAN DATA, KAPAN TREATRESULT! = 3, Proughesult tidak ada "kesalahan DATREARTE =" TREADRESULTE! Nilai properti ini kosong "> <!-Ketika Treatreatresult adalah 2 atau 3, tidak ada node berikut-> <tate> apakah akan mencapai daftar risiko penipuan, nilai: 0/1, 0 berarti melewatkan daftar risiko penipuan, 1 berarti mengenai daftar risiko penipuan 26" </faudriskinfo> <!-9 Apakah akan mengenai daftar risiko tertinggi 26. SubreportTypeCost = "96040" TOBATIRRESULT = "Status kueri subreport, 1: temukan, 2: tidak diperiksa, 3: tidak ditemukan karena alasan lain" "treaterrorcode =" Treatresult = 3, lihat Kamus Data = TREATRESULT! = 3, atribut tidak ada "Errormessage =" TreABRESULTE DESKRIPSULT! value of this attribute is empty"> <!--When treatreatresult is 2 or 3, there are no following nodes--> <checkResult> Whether to hit the high-risk list 1: Yes, 2: No</checkResult> </personRiskAssess> <!-- 10 online loan overdue information 1..1 --> <microNearlyThreeYearsOverdueInfo subReportType="13204" SubreportTypeCost = "96040" TOVERSITRESULT = "Status kueri Subreport, 1: Temukan, 2: tidak ditemukan, 3: Tidak ditemukan karena alasan lain" kode kesalahan saat treaterrorcode = "TreatreSult = 3, lihat Kamus Data untuk detailnya. Ketika Treatresult! = 3, atributnya tidak ada. "ErrorMessage =" Informasi Deskripsi Kesalahan Ketika Treatresult = 3, Ketika TreatreSult! = 3, nilai atribut ini kosong "> <!-Ketika Treatreatresult adalah 2 atau 3, tidak ada node Overdue> <!-Overdue Ringkasan 0..1-> Ondue Oveream> <! Informasi Dasar dari Pinjaman </OrdUeamount> <Everduedays> Interval hari yang sudah lewat, Nilai Range: Overlue One Day (inklusif) atau lebih </overduedays> <denduecount> Jumlah transaksi dalam jumlah banyak hari. <Overdueamount> Kepala Sekolah Tertunggu, Unit: Berdasarkan Mata Uang Informasi Dasar Pinjaman </Overdueamount> <deniedays> Interval hari yang sudah lewat, kisaran nilai: 1-6 hari, overdue 7-29 hari, jumlah berlebihan, overdue overdue, overdue, lebih dari 90 hari, lebih dari 90 hari, lebih dari 90 hari. Interval hari yang sudah lewat </overduecount> </t Item> </tip> </micronearlytheyearsoverdueInfo> <!-11 informasi risiko 1..1-> <personriskinfo subreportType = tidak ada yang lain: SubreportTypeT = "96040" TOVERRESULT = "14227" SubreportTypy = "96040" TOVERSULT = "SUBREPOR LAINN." Alasan "Kode Kesalahan Saat TreaterRorCode =" TreatreSult = 3, lihat kamus data untuk detailnya. Ketika Treatresult! = 3, atribut tidak ada. "ErrorMessage =" TreatreSult = 3, informasi deskripsi kesalahan saat TreatreSult! = 3, nilai atribut ini kosong ">> <! ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <cqggcount> Jumlah informasi tentang pengumuman perekrutan </cqggcount> <wdyqcount> Jumlah informasi tentang pinjaman online yang sudah lewat </wdyqcount> </tat stat> <!-informasi ringkasan akhir-> <!-informasi ringkasan 0..1-> <!-informasi ringkasan 0..1-<als> <!-Kontak Ringkasan 0..1-Ringkasan Informasi 0..1-<als> <! -> <Tip> <CackId> Nomor Rekam </checkId> <bt> Judul </bt> <Ajlx> Jenis kasus </Ajlx> <sjnf> tahun ulasan, format: yyyy </sjnf> <dsrlx> Jenis Pihak </dsrlx> </item> </als> <! Summary information of judicial enforcement information 1..n --> <item> <recordId>Record number</recordId> <bt>Title</bt> <zxbd>Execution object, unit: currency shall prevail</zxbd> <larq>Filing date, format YYYY-MM-DD</larq> </item> </zxs> <!-- Summary information of judicial breach of trust 0..1 --> <sxs> <!-- Summary information of judicial breach of trust information 1..n --> <item> <recordId>Record number</recordId> <bt>Title</bt> <larq>Filing date, format YYYY-MM-DD</larq> <fbrq>Release date, format YYYY-MM-DD</fbrq> </item> </sxs> <!-- Tax Administrative Law Enforcement Information Summary Information 0..1 --> <sws> <!-- Tax Administrative Law Enforcement Information Summary Information Content 1..n --> <item> <recordId>Record Number</recordId> <bt>Title</bt> <ggrq>Announcement Date, format YYYY-MM-DD</ggrq> </item> </sws> <!-- >Authorization Announcement Information Summary Information 0..1 --> <cqs> <!-- Tax Administrative Law Informasi Penegakan Konten Ringkasan Informasi 1..n-> <TEMET> <CackId> Nomor Rekam </checkId> <bt> Judul </bt> <fbrq> Tanggal rilis, format yyyy-mm-dd </fbrq> </t Item> </cqs> <!-informasi ringkasan overdue pinjaman online 0..1 --1-</cqs> <! <sekaman> Nomor Rekam </checkId> <bt> judul </bt> <fbrq> Tanggal rilis, format yyyy-mm-dd </fbrq> </temem> </wdyqs> </summary> </sonentriskInfo> <!-Catatan kueri historis 12 orang dalam dua tahun terakhir 1..1-> Sejarah <> SISTHEMPPLE = SHORISTIME 12 orang dalam dua tahun terakhir 1..1-> SISTHEKSIMPLEIPSIPEPLEKSIPS dalam dua tahun terakhir 1..1-> SISTHEKSIPSIPERIPERPOTE DALAM SINGKAT PERSON DALAM DUA TAHUN 1..1-> <> SISTHEKS 12 orang terakhir SubreportTypeCost = "96040" TOBATANRESULT = "Status kueri Subreport, 1: Periksa, 2: Tidak ditemukan, 3: Tidak ditemukan karena alasan lain" "Kode kesalahan =" Treatresult = 3, lihat Data Kamus untuk Rinciannya. Ketika TreeArt! kosong "> <! --- Ketika Treatreatresult adalah 2 dan 3, tidak ada node berikut-> <!-0..1-> <semsem> <!-1..n-> <TEMBUT> <NUT UNITERMember> Nama Jenis Unit </unitmember> <Trast1month> Last NOMETHE PERTANYAAN DALAM BULAN DI BULAN LALU </Last1month> </Last 2month dari Tiga Bulan Tiga Bulan Tiga Bulan Tiga Bulan Terakhir </Last1month> </Last 2month dari Tiga Bulan Tiga Bulan Tiga Bulan Tiga Bulan Terakhir </Last1Month> </Last 2month dari Tiga Bulan Tiga Bulan Tiga Bulan Tiga Bulan Tiga Last query records in the past 6 months</last6Month> <last12Month>Number of query records in the past 12 months</last12Month> <last18Month>Number of query records in the past 18 months</last18Month> <last24Month>Number of query records in the past 24 months</last24Month> </item> </items> <!--0..1--> <count> <last1Month>Total number of query records in the past 1 month</last1Month> <last3Month>Total number of query records in the past 3 months</last3Month> <last6Month>Total number of query records in the past 6 months</last6Month> <last12Month>Total number of query records in the past 12 months</last12Month> <last18Month>Total number of query records of each unit type in the past 18 Bulan </last18month> <Last24Month> Total jumlah catatan kueri dari setiap jenis unit dalam 24 bulan terakhir </tast24month> </count> </shorthSimpleQueryInfo> </cisreport> </cisreports>
2. Desain Struktur Tabel
1. Nomor Batch: Setiap tabel dikaitkan dengan nomor batch terluar.
2. Tabel Utama: Artinya, semua bidang dari setiap lapisan disimpan dalam satu tabel.
Tiga, desain fisik
Ini dibagi menjadi tiga lapisan: cisreportroot, cisreportchild, pelapor
kelas publik cisreportroot memperluas Basepojo mengimplementasikan serializable {private string docid; Private String batno; // query batch number @jsonfield (serialize = false) Private String xmlid; Private CisreportChild Cisreportchild;/*** 2017/7/21. *Laporkan Properti Node dan Node Anak*/Kelas Publik CisReportChild Memperluas Basepojo {/***Laporan Generasi Akhir Waktu **/Private String BuildEndtime; / ***Apakah ada kesalahan sistem yang benar bahwa ada salah yang berarti tidak ada **/ private string hassystemerror; / ***apakah pelanggan beku **/ string pribadi isfrozen; Reporelement Reporelement Private; ReportElement kelas publik memperluas Basepojo {Private String Phone; private PoliceCheckInfo policeCheckInfo;//Identity authentication private MobileCheckInfo mobileCheckInfo;//Person mobile phone number verification private PersonAntiSpoofingDescInfo personAntiSpoofingDescInfo;//Personal Anti-fraud risk review information private PersonAntiSpoofingInfo personAntiSpoofingInfo;//Personal Anti-fraud risk score information private MobileStatusInfo Mobilestatusinfo; // Nomor Ponsel Status Informasi Status Private Econnoisserurinfo Econnoisserurinfo; // memang mengenai daftar pesta wol fraudriskinfo fraudriskinfo; // memang mengenai daftar risiko penipuan personelkassess private. MicronearlyTheYearSoverdueInfo; // Pinjaman Online Informasi Penanggulangan Pribadi Personriskinfo Personriskinfo; // Informasi Risiko Sejarah Pribadi SimpleQueryInfo Sejarah SimpleQueryInfo; // Catatan Permintaan Sejarah Pribadi dalam dua tahun terakhir dalam dua tahun terakhirEmpat, kode
<1> Transaksi tunggal, tidak ada kunci primer yang diperlukan dalam batch
Data dapat disimpan dalam peta dalam transaksi atau batch tunggal, dan data dapat diperoleh melalui kunci peta di SQL.
menyukai:
private void savepersonriskInfo (string batno, personriskinfo personriskinfo) melempar pengecualian {peta <string, objek> peta = hashmap baru <> (); Map.put ("Batno", Batno); // single-hand map.put ("item", personriskinfo); pymapper.savepersonriskinfo (peta); if (! listutil.isempty (personriskinfo.getAllist ())) {// batch map.put ("list", personriskinfo.getAllist ()); pymapper.savealinfolist (MAP); }SQL:
<!--Personal Risk Record--> //Single<insert id="savePersonRiskInfo" parameterType="java.util.Map"> INSERT INTO TABLE_PERSON_RISK_INFO(BATNO,TOTLECOUNT,ALCOUNT,ZXCOUNT,SXCOUNT,SWCOUNT,CQGGCOUNT,WDYQCOUNT) VALUES (#{batNo,jdbcType=VARCHAR}, #{item.totlecount, jdbctype = numeric}, #{item.alcount, jdbctype = numeric},#{item.zxcount, jdbctype = numeric},#{item.sxcount, jdbctype = numeric},#{ item.swcount, jdbctype = numeric},#{item.cqggcount, jdbctype = numeric},#{item.wdyqcount, jdbctype = numeric}) </insert> <!--Detailed Record of Overdue--> //Batch <insert id="saveMicroNearlyThreeYearsOverdueInfoList" parameterType="java.util.Map"> INSERT INTO TABLE_MNTYOI (BATNO,OVERDUEAMOUNT,OVERDUEDAYS,OVERDUECOUNT) <foreach collection="list" item="item" separator="union all"> ( SELECT #{batNo,jdbcType=VARCHAR}, #{item.overdueAmount,jdbcType=VARCHAR}, #{item.overdueDays,jdbcType=VARCHAR}, #{item.overdueCount,jdbcType=NUMERIC} FROM DUAL ) </foreach> </insert> private CisReportRoot invokePy(PyQueryBean pyquerybean) melempar pengecualian {pyquerybean.setQueryFrompy (query_from_py); // hubungi layanan py cisreportroot cisreportroot = querycisreportfrompyserver (pyquerybean); cisreportroot.getCisReportChild (). getReportelement (). SetPhone (pyquerybean.getPhone ()); //cacheservice.save(cisreportroot); // (1) simpan data savecisreport (cisreportroot); mengembalikan cisreportroot; }(1) Simpan data
@Transactional (rollbackfor = exception.class) @Override public cisreportroot savecisreport (cisreportroot cisreportroot) melempar pengecualian {coba {getReportelement = cisreportroot.getCisreportChild (). GetReportelement (); Personriskinfo personriskinfo = ReportElement.getPersonRiskInfo (); // (2) tabel utama, simpan semua informasi node XML (tidak termasuk informasi risiko pribadi), simpan data tunggal pymapper.savecisreport (cisreportroot); if (success.equals (cisreportroot.getCisReportChild (). getReportElement (). getPersonRiskInfo (). gettreatresult ())) {savepersonRiskInfo (cisreportroot.getbatno (), personriskinfo); } if (cisreportroot.getCisReportChild (). getReportelement (). getHistorySimpleQueryInfo (). gettreatresult (). setara (sukses)) {peta <string, objek> peta = hashmap baru <> (); // (3) Simpan peta data batch.put ("batno", cisreportroot.getbatno ()); if (! listutil.isempty (cisreportroot.getCisReportChild (). getReportelement (). getHistorySimpleQueryInfo (). getItemlist ())) {peta.put ("Daftar", cisreportroot.getCisReportChild (). getReportelement (). getHistorySimpleQueryInfo (). getItemlist ()); Pymapper.SavehistorySimpleQueryInfolist (MAP); } if (! listutil.isempty (cisreportroot.getCisreportChild (). getReportelement (). getMicronearlyTheYearSoverdueInfo (). getList ())) {peta.put ("Daftar", cisreportroot.getCisReportChild (). getReportelement (). getMicronearlyThreeyearsoverdueInfo (). getList ()); pymapper.savemicronylytheyearsoverdueInfolist (MAP); }} return cisreportroot; } catch (Exception e) {logger.error ("savecisreport@pyserviceImpl_exception", e); lempar e; }}(2) Simpan tabel utama
<masukkan id = "savecisreport" parameTerType = "java.util.map"> masukkan ke table_cisreport (batno, buildendtime, isfrozen, MCI_NAMECHECKRESULT, MCI_AREAINFO, MCI_DOCUMENTNOCKECRESULT, MCI_Operator, MCI_PHONECHECKRESULT, PCI_DOCUMENTNO, PCI_NAME, PCI_RISK, PASDI_DESC, PASI_HITTYPES, PASI_RISKLICKLI_DESC, PASI_HITTYPES, PASI_RISKLECKLESC, PASI_HITTYPES, PASI_RISKLECLES MS_AREAINFO,MS_CAnCELTIME,MS_OPERATOR,MS_PHONESTATUS,MS_TIMELENGTH, ECONNOISSERUR, FRAUDRISK, PRA_CHECKRESULT, MNTYOI_OVERDUEAMOUNT,MNTYOI_OVERDUECOUNT,MNTYOI_OVERDUECOUNT,MNTYOI_OVERDUEDAYS, Hs_last1month, hs_last3month, hs_last6month, hs_last12month, hs_last18month, hs_last24month, phone, xmlid) nilai (#{batno, jdbctype = varchar}, to_date (#{{batno, jdbctype = varchar}, to_date (#{{Batno, jdbctype = varchar}, to_date (#{{Batno, JDBCTYP hh24: mi: ss '), #{cisreportchild.isfrozen, jdbctype = varchar}, #{cisreportchild.reportelement.mobileCheckinfo.namecheckresult, jdbctype = varchar}, #{cisreportchild.reportelement.mobileCheckInfo.areAnfo, jdbctype = varchar}, #{cisreportchild.reportelement.mobileCheckinfo.documentnocheckresult, jdbctype = varchar}, #{cisreportchild.reportelement.mobileCheckInfo.operator, jdbctype = numeric}, #{cisreportchild.reportelement.mobileCheckinfo.phonecheckResult, jdbctype = varchar}, #{cisreportchild.reportelement.policecheckinfo.documentno, jdbctype = varchar}, #{cisreportchild.reportelement.policecheckinfo.result, jdbctype = numerik}, #{cisReportChild.reportelement.PersonSpoofingDescinfo.PersonantispoofingDesc, jdbctype = varchar}, #{cisreportchild.reportelement.personantispoofingInfo.hittypes, jdbctype = varchar},, #{cisreportchild.reportelement.personantispoofingInfo.risklevel, jdbctype = varchar}, #{cisreportchild.reportelement.personSpoofingInfo.riskscore, jdbctype = varchar}, #{cisreportchild.reportelement.personantispoofingInfo.suggest, jdbctype = varchar}, #{cisreportchild.reportelement.mobilestatusinfo.arainfo, jdbctype = varchar}, #{cisreportchild.reportelement.mobilestatusinfo.canceltime, jdbctype = varchar}, #{cisreportchild.reportelement.mobilestatusinfo.operator, jdbctype = numerik}, #{cisreportchild.reportelement.mobilestatusinfo.phonestatus, jdbctype = numeric}, #{cisreportchild.reportelement.mobilestatusinfo.timeLength, jdbctype = varchar}, #{cisreportchild.reportelement.econnoisserurinfo.state, jdbctype = numeric}, #{cisreportchild.reportelement.fraudriskinfo.state, jdbctype = numerik}, #{cisreportchild.reportelement.personRiskAssess.checkResult, jdbctype = numeric}, #{cisreportchild.reportelement.micronearlytheyearsoverdueInfo.overdueamount, jdbctype = varchar}, #{cisreportchild.reportelement.micronearlythreeyearsoverdueInfo.overduecount, jdbctype = numeric}, #{cisreportchild.reportelement.micronearearreearsoverdueInfo.overduedays, jdbctype = varchoreearsoverdueInfo.overduedays, jdbctype = varchoearsoverdueInfo #{cisReportChild.reportElement.historySimpleQueryInfo.totalCount.last1Month,jdbcType=NUMERIC}, #{cisReportChild.reportElement.historySimpleQueryInfo.totalCount.last3Month,jdbcType=NUMERIC}, #{cisreportchild.reportelement.HistorySimpleQueryInfo.totalCount.Last6month, jdbctype = numeric}, #{cisreportchild.reportelement.historysimpleIninfo.totalcount.Last12monderth, jdqueryinfo.totalcount.last12monderth, jdqueryinfo.totalcount.last12monderth, jdqueryinfo.totalcount.last12monderth, jdqueryinfo.totalcount.last12monderth, jdqueryinfo.totalcount.last12monderth, jdqueryinfo.totalcount.last12monderth, nummonderth, numcloyin #{cisReportChild.reportElement.historySimpleQueryInfo.totalCount.last18Month,jdbcType=NUMERIC}, #{cisReportChild.reportElement.historySimpleQueryInfo.totalCount.last24Month,jdbcType=NUMERIC}, #{cisreportchild.reportelement.phone, jdbctype = varchar}, #{xmlid, jdbctype = varchar})(3) Simpan data batch (tidak ada tombol utama yang dihasilkan secara otomatis)
<!--Personal historical query record for the past two years--> <insert id="saveHistorySimpleQueryInfoList" parameterType="java.util.Map"> INSERT INTO TABLE_HISTORY_SIMPLE_QUERY (BATNO,UNIT_MEMBER,LAST1MONTH,LAST3MONTH,LAST6MONTH,LAST12MONTH,LAST18MONTH,LAST24MONTH) <foreach collection="list" item="item" separator="union all"> ( SELECT #{batNo,jdbcType=VARCHAR}, #{item.unitMember,jdbcType=VARCHAR}, #{item.last1Month,jdbcType=NUMERIC}, #{item.last3Month,jdbcType=NUMERIC}, #{item.Last6month, jdbctype = numerik}, #{item.Last12month, jdbctype = numeric}, #{item.last18month, jdbctype = numeric}, #{item.last24month, jdbctype = numerik} dari dual) </item.last24month, jdbctype = numerik} dari dual) </item.last24month, jdbctype = numerik} dari dual) </item.last24month, jdbctype = numerik} dari dual) </item.Last24Manth, jdbctype = numerik} dari dual) </item.Last24Manth, jdbctype = numerik} dari dual) </item.last24, <2> Single Stroke, batch perlu dimasukkan ke kunci primer
Stroke tunggal mengandung kunci primer
DataServicedEtailResult DataServicedEtAndResult = tDService.GetDataServIdETeArResult (tDreportroot); int n = tdDataServerMapper.InsertDataServicedEtAndResult (DataServicedEtAndResult); <!-Antarmuka Verifikasi Informasi-> <!-DataService-> <Insert ID = "InsertDataServicedEtAndResult" ParameTerType = "DataServicedEtAndResult"> <SelectKey keyProperty = "id" instance = "BigDecimal" order = "Sebelum"> Pilih SEQ_ICS_TD_DATEP. ICS_TD_DataService (id, RecordId, Reason_desc, Reason_code, Success) Value ( #{id, jdbctype = decimal}, #{{{recordId, jdbctype = decimal}, #{reasondesc, jdbctype = varchar}, #{raletcode, jdbbces #{Success, jdbctype = decimal}) </insert>Batch Save berisi kunci utama
if (! listutil.isempty (antarmacesList)) {map.put ("recordId", id); Map.put ("Daftar", Daftar Antarmuka); tdDataSerVicemapper.AddBatchInterfaces (MAP); }SQL:
<!-Batch Save Interfaces-> <Insert ID = "AddBatchInterfaces" ParameterType = "java.util.list"> <!-Komentar adalah metode penyisipan MySQL. Itu dapat dimasukkan, tetapi data tidak dapat digulung kembali. Berikut ini adalah metode penyisipan Oracle: Perhatikan bahwa parameterType: java.util.list atau java.util.map dapat dimulai <foreach collection = "list" item = "item" index = "index" separator = ""> masukkan ke dalam ics_td_interfaces (ID, recordid, type) nilai (bloancrdata.spaces. #{recordId, jdbctype = decimal}, #{item.type, jdbctype = varchar}); </tandingeach> komit; End;-> INSERT INTO ICS_TD_INTERFACES (ID, RecordID, Type) Pilih SEQ_ICS_TD_INTERFACES.NEXTVAL ID, A.* Dari (<foreach collection = "Daftar" item = "item" index = "index" PARATOR = "Union all"> SELECT #{recordId, jdbctype = decimal} {{forphara {{{{{{{JDBCTYPETEP = {{{decimal {decimal, A </sert>Meringkaskan
Di atas adalah metode menyimpan data fisik dalam satu batch oleh editor. Saya harap ini akan membantu semua orang. Jika Anda memiliki pertanyaan, silakan tinggalkan saya pesan dan editor akan membalas semua orang tepat waktu. Terima kasih banyak atas dukungan Anda ke situs web Wulin.com!