From d5dab07dc674de7edbbc1bd6ade0486f54fbdb26 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 06 五月 2025 19:19:35 +0800
Subject: [PATCH] 1、实现万用token(0000-0000-1234-9876-5); 2、web端单独实现命令结果等待器,并修改相关部分; 3、web端实现透传命令; 4、修改一些不当注释; 5、优化一些代码。
---
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientSv.java | 85 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 85 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientSv.java
index ffe5a8e..384e6e3 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/client/ClientSv.java
@@ -1,4 +1,89 @@
package com.dy.pipIrrBase.client;
+
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoBa.BaClientMapper;
+import com.dy.pipIrrGlobal.pojoBa.BaClient;
+import com.dy.pipIrrGlobal.pojoBa.BaClientType;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.common.utils.PojoUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@Service
public class ClientSv {
+
+ private BaClientMapper dao;
+
+ @Autowired
+ private void setDao(BaClientMapper dao){
+ this.dao = dao;
+ }
+
+
+ /**
+ * 寰楀埌涓�涓啘鎴风被鍨�
+ * @param id 鍐滄埛绫诲瀷ID
+ * @return 鍐滄埛绫诲瀷瀹炰綋
+ */
+ public BaClient selectById(Long id){
+ return this.dao.selectById(id) ;
+ }
+
+
+ /**
+ * 寰楀埌涓�涓敤鎴�
+ * @param vo 鏌ヨ鏉′欢鍊煎璞�
+ * @return 鐢ㄦ埛瀹炰綋
+ */
+ @SuppressWarnings("unchecked")
+ public QueryResultVo<List<BaClient>> selectSome(QueryVo vo){
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo) ;
+ Long itemTotal = this.dao.selectTotal(params) ;
+
+ QueryResultVo<List<BaClient>> rsVo = new QueryResultVo<>() ;
+ rsVo.pageSize = vo.pageSize ;
+ rsVo.pageCurr = vo.pageCurr ;
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = this.dao.selectSome(params) ;
+
+ return rsVo ;
+ }
+
+ /**
+ * 淇濆瓨瀹炰綋
+ * @param po 瀹炰綋
+ * @return 褰卞搷璁板綍鏁伴噺
+ */
+ @Transactional
+ public int save(BaClient po){
+ return this.dao.insertSelective(po) ;
+ }
+
+ /**
+ * 淇濆瓨淇敼瀹炰綋
+ * @param po 瀹炰綋
+ * @return 褰卞搷璁板綍鏁伴噺
+ */
+ @Transactional
+ public int update(BaClient po){
+ return this.dao.updateByPrimaryKeySelective(po) ;
+ }
+
+
+ /**
+ * 淇濆瓨淇敼瀹炰綋
+ * @param id 瀹炰綋ID
+ * @return 褰卞搷璁板綍鏁伴噺
+ */
+ @Transactional
+ public int delete(Long id){
+ return this.dao.deleteLogicById(id) ;
+ }
+
}
--
Gitblit v1.8.0