From 0431c6943c1a61df0e9e4feb61f3333dd3622d21 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 28 五月 2025 15:16:48 +0800
Subject: [PATCH] 1、表阀一体:查询日记录数据中金额数据小数位是4位,相应除以10000.00; 2、表阀一体:所以命令结果VO实现指定接口,以数据库中保存命令日志。

---
 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