From 710c6a4d568237016a70b74aa3769b89e336725c Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 13 五月 2025 15:48:21 +0800
Subject: [PATCH] 1、实现功能码92、93命令web后端接口定义与逻辑代码实现; 2、修改原来功能逻辑实现的逻辑,增加回调; 3、表阀一体机协议命令结果数据库存储补充实现。
---
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