From da06aad66dedd725301964cf4ed47d9d2e6dda7c Mon Sep 17 00:00:00 2001 From: anthonyywj2 <353682448@qq.com> Date: Mon, 27 Jun 2022 00:06:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E8=AE=BE=E7=BD=AE=E6=9C=AA?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=8D=95=E6=8D=AE=E7=B1=BB=E5=9E=8B=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BF=9D=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/admin/controller/info/SyncDataSetController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/info/SyncDataSetController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/info/SyncDataSetController.java index e538abd3..88743d85 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/info/SyncDataSetController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/info/SyncDataSetController.java @@ -1,5 +1,6 @@ package com.glxp.api.admin.controller.info; +import cn.hutool.core.collection.CollUtil; import com.alibaba.fastjson.JSON; import com.glxp.api.admin.annotation.AuthRuleAnnotation; import com.glxp.api.admin.entity.info.SyncDataBustypeEntity; @@ -44,7 +45,8 @@ public class SyncDataSetController { BeanUtils.copyProperties(syncDataSetResponse, syncDataSetEntity); List busTypes = syncDataSetResponse.getBusTypes(); syncDataBustypeService.deleteAll(); - syncDataBustypeService.inserts(busTypes); + if (CollUtil.isNotEmpty(busTypes)) + syncDataBustypeService.inserts(busTypes); syncDataSetEntity.setBusTypes(null); boolean b = syncDataSetService.insert(syncDataSetEntity); if (!b) {