错误详情:
### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'f433bda2158d426e98fa7a5d29c61098-49adb23841asw3118' for key 'idx_party_code_and_branch_code'
### The error may exist in com/arpa/ntocc/common/mapper/arpapay/ArpaMerchantMapper.java (best guess)
### The error may involve com.arpa.ntocc.common.mapper.arpapay.ArpaMerchantMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO base_arpa_merchant (code, branch_code, party_code, party_type, merchant_type, merchant_name, merchant_short_name, contact_phone, contact_mail, certificate_type, certificate_number, certificate_validity_begin, certificate_validity_end, certificate_photo_a_url, certificate_photo_b_url, province, province_name, city, city_name, county, county_name, address, card_type, card_number, card_bank_phone, card_acc_name, bank_name, bank_code, bank_child_name, bank_child_code, card_acc_type, lep_name, lep_phone, lep_certificate_type, lep_certificate_number, lep_certificate_validity_begin, lep_certificate_validity_end, lep_certificate_photo_a_url, lep_certificate_photo_b_url, bank_card_code, modified_by_name, created_by, modified_by, gmt_created, gmt_modified) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
### Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'f433bda2158d426e98fa7a5d29c61098-49adb23841asw3118' for key 'idx_party_code_and_branch_code'
; Duplicate entry 'f433bda2158d426e98fa7a5d29c61098-49adb23841asw3118' for key 'idx_party_code_and_branch_code'; nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'f433bda2158d426e98fa7a5d29c61098-49adb23841asw3118' for key 'idx_party_code_and_branch_code'
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:243) ~[spring-jdbc-5.2.0.RELEASE.jar!/:5.2.0.RELEASE]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) ~[spring-jdbc-5.2.0.RELEASE.jar!/:5.2.0.RELEASE]
错误原因:数据库加了唯一索引idx_party_code_and_branch_code,索引具体字段是party_code、branch_code,也就是说相同的party_code、branch_code在数据库中只能有一条,把索引删除就好了。