From f2057bd69558d42de70a4b8a169a2b86e49b9b19 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期二, 16 九月 2025 10:12:48 +0800 Subject: [PATCH] 经停站点 --- ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TLineController.java | 9 +++++++-- ManagementOKTravel/guns-admin/src/main/resources/application.yml | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TLineController.java b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TLineController.java index ff1377f..610b158 100644 --- a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TLineController.java +++ b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TLineController.java @@ -13,6 +13,7 @@ import com.stylefeng.guns.modular.system.service.*; import com.stylefeng.guns.modular.system.util.ResultUtil; import org.springframework.stereotype.Controller; +import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.ui.Model; @@ -196,7 +197,9 @@ stopover.setType(3); stopoverList.add(stopover); } - itLineSiteService.insertBatch(stopoverList); + if(!CollectionUtils.isEmpty(stopoverList)){ + itLineSiteService.insertBatch(stopoverList); + } //添加价格设置 addPrice(tLine.getId(), subArr); @@ -397,7 +400,9 @@ stopover.setType(3); stopoverList.add(stopover); } - itLineSiteService.insertBatch(stopoverList); + if(!CollectionUtils.isEmpty(stopoverList)){ + itLineSiteService.insertBatch(stopoverList); + } //删除线路价格 itLinePriceService.delete(new EntityWrapper<TLinePrice>().eq("lineId",tLine.getId())); diff --git a/ManagementOKTravel/guns-admin/src/main/resources/application.yml b/ManagementOKTravel/guns-admin/src/main/resources/application.yml index f7c496f..947f81a 100644 --- a/ManagementOKTravel/guns-admin/src/main/resources/application.yml +++ b/ManagementOKTravel/guns-admin/src/main/resources/application.yml @@ -59,7 +59,7 @@ profiles: local datasource: db-name: xianning #用来搜集数据库的所有表 -# url: jdbc:mysql://127.0.0.1:3306/xianning?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true +# url: jdbc:mysql://192.168.110.111:3306/xianning?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true # username: root # password: 123456 url: jdbc:mysql://127.0.0.1:10633/xianning?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true -- Gitblit v1.7.1