From 0af5efbcac903cdc6ba1e7978cb9ac32220e8cde Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期四, 31 十月 2024 16:05:36 +0800
Subject: [PATCH] 修改

---
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java
index 6eae9d5..0c55471 100644
--- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java
@@ -83,7 +83,8 @@
 				}
 			}
 		}else{
-			siteIds = new HashSet<>(siteId);
+			siteIds = new HashSet<>();
+			siteIds.add(siteId);
 		}
 		PageInfo<TChargingPileNotification> pageInfo = new PageInfo<>(basePage.getPageCurr(), basePage.getPageSize());
 		List<TChargingPileNotification> list = this.baseMapper.chargingPileNotificationPageList(pageInfo, siteIds);
@@ -97,17 +98,18 @@
 		switch (type){
 			case 1:
 				// 验证码
-				notification.setPhone(phone);
-				notification.setContent(data);
+				notification.setSiteId(null);
+				notification.setChargingPileId(null);
 				break;
 			default:
 				// 停车占位
 				notification.setSiteId(siteId);
 				notification.setChargingPileId(chargingPileId);
-				notification.setPhone(phone);
-				notification.setContent(data);
 				break;
 		}
+		notification.setPhone(phone);
+		notification.setContent(data);
+		this.save(notification);
 	}
 
 }

--
Gitblit v1.7.1