From 9619e60e3075a432d692f3cd8b76787568c53aad Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 07 五月 2025 15:56:58 +0800
Subject: [PATCH] 1、完善代码;2、禁止输出SpringBoot启动时Banner。
---
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/client/ClientSv.java | 86 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 86 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/client/ClientSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/client/ClientSv.java
new file mode 100644
index 0000000..08640b5
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/client/ClientSv.java
@@ -0,0 +1,86 @@
+package com.dy.pipIrrWechat.client;
+
+import com.dy.pipIrrGlobal.daoSe.SeClientMapper;
+import com.dy.pipIrrGlobal.daoSe.SeCodeVerifyMapper;
+import com.dy.pipIrrGlobal.daoSe.SeOpenIdMapper;
+import com.dy.pipIrrGlobal.pojoSe.SeCodeVerify;
+import com.dy.pipIrrGlobal.pojoSe.SeOpenId;
+import com.dy.pipIrrGlobal.voSe.VoClientWechat;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-06-19 14:25
+ * @LastEditTime 2024-06-19 14:25
+ * @Description
+ */
+
+@Slf4j
+@Service
+public class ClientSv {
+ @Autowired
+ private SeClientMapper seClientMapper;
+ @Autowired
+ private SeCodeVerifyMapper seCodeVerifyMapper;
+ @Autowired
+ private SeOpenIdMapper seOpenIdMapper;
+
+ /**
+ * 鏍规嵁鐢佃瘽鍙风爜鑾峰彇鍐滄埛ID
+ * @param phoneNumber
+ * @return
+ */
+ public Long getClientIdByPhone(String phoneNumber) {
+ return seClientMapper.getClientIdByPhone(phoneNumber);
+ }
+
+ /**
+ * 娣诲姞寰俊鐢ㄦ埛璐︽埛璁板綍
+ * @param po
+ * @return
+ */
+ public Long addOpenId(SeOpenId po) {
+ seOpenIdMapper.insert(po);
+ //return po.getClientId();
+ return po.getId();
+ }
+
+ /**
+ * 娣诲姞楠岃瘉鐮佽褰�
+ * @param po
+ * @return
+ */
+ public Integer addCodeVerify(SeCodeVerify po) {
+ return seCodeVerifyMapper.insert(po);
+ }
+
+ /**
+ * 鏍规嵁鎵嬫満鍙疯幏鍙栭獙璇佺爜楠岃瘉瀵硅薄
+ * @param phoneNumber
+ * @return
+ */
+ public SeCodeVerify getCodeVerify(String phoneNumber) {
+ return seCodeVerifyMapper.getCodeVerify(phoneNumber);
+ }
+
+ /**
+ * 鑾峰彇鍐滄埛鍩烘湰淇℃伅锛屽皬绋嬪簭棣栭〉浣跨敤
+ * @param sessionId
+ * @return
+ */
+ public VoClientWechat getSimpleClientInfo(Long sessionId, String openId) {
+ return seClientMapper.getSimpleClientInfo(sessionId, openId);
+ }
+
+ /**
+ * 瑙g粦鍐滄埛涓庡井淇$殑缁戝畾锛屾牴鎹畇essionId鍒犻櫎缁戝畾璁板綍
+ * @param sessionId
+ * @return
+ */
+ public Integer unbindWechat(Long sessionId) {
+ return seOpenIdMapper.deleteByPrimaryKey(sessionId);
+ }
+
+}
--
Gitblit v1.8.0