From c42614978ff12013a1eabebd0289b27169a5784f Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期二, 06 五月 2025 17:25:56 +0800 Subject: [PATCH] 1、实现万功能token(0000-0000-1234-9876-5); 2、web端单独实现命令结果等待器,并相应修改相关部分; 3、web端实现透传命令; 4、修改一些不当注释; 5、优化一些代码。 --- 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