Commit b08e4fa368ae222561fdf114d91ac0a9984f24f2
1 parent
6f4fa76d00
Exists in
master
and in
1 other branch
导出
Showing 1 changed file with 8 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java
View file @
b08e4fa
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | import com.lyms.platform.pojo.*; |
| 14 | 14 | import com.lyms.platform.query.*; |
| 15 | 15 | |
| 16 | +import com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException; | |
| 16 | 17 | import org.apache.commons.codec.binary.*; |
| 17 | 18 | import org.apache.commons.codec.binary.Base64; |
| 18 | 19 | import org.apache.commons.collections.CollectionUtils; |
| ... | ... | @@ -213,7 +214,13 @@ |
| 213 | 214 | { |
| 214 | 215 | organizationService.execSql(sql); |
| 215 | 216 | } |
| 216 | - } catch (Exception e) { | |
| 217 | + } | |
| 218 | + catch (MySQLIntegrityConstraintViolationException e) | |
| 219 | + { | |
| 220 | + ExceptionUtils.catchException(e,"MySQLIntegrityConstraintViolationException error. JSONDATA="+json); | |
| 221 | + return true; | |
| 222 | + } | |
| 223 | + catch (Exception e) { | |
| 217 | 224 | ExceptionUtils.catchException(e,"exce sql error. JSONDATA="+json); |
| 218 | 225 | return false; |
| 219 | 226 | } |