From b27d0ba5ab7a11ac6615e0cfee3cf428a7ae834f Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 29 五月 2024 08:56:34 +0800
Subject: [PATCH] 完善代码
---
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientSv.java | 46 ++++++++++++++++++++++++++++++----------------
1 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientSv.java
index ebeccf1..cc4f739 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientSv.java
@@ -2,11 +2,13 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoBa.BaDistrictMapper;
+import com.dy.pipIrrGlobal.daoBa.BaSettingsMapper;
import com.dy.pipIrrGlobal.daoSe.SeClientMapper;
import com.dy.pipIrrGlobal.pojoSe.SeClient;
import com.dy.pipIrrGlobal.voSe.VoClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
+import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -29,37 +31,32 @@
@Autowired
private BaDistrictMapper baDistrictMapper;
+ @Autowired
+ private BaSettingsMapper baSettingsMapper;
+
/**
* 鏍规嵁鎸囧畾鏉′欢鑾峰彇鍐滄埛鏁版嵁
+ *
* @param queryVo
* @return
*/
- public QueryResultVo<List<VoClient>> getClients(QueryVo queryVo){
- Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo) ;
+ public QueryResultVo<List<VoClient>> getClients(QueryVo queryVo) {
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
Long itemTotal = seClientMapper.getRecordCount(params);
- QueryResultVo<List<VoClient>> rsVo = new QueryResultVo<>() ;
- Integer pageCurr = 0;
- Integer pageSize = 10000;
- rsVo.pageCurr = 1;
- rsVo.pageSize = 10000;
- if(queryVo.pageSize != null && queryVo.pageCurr != null) {
- rsVo.pageSize = queryVo.pageSize ;
- rsVo.pageCurr = queryVo.pageCurr;
- pageSize = queryVo.pageSize ;
- pageCurr = (Integer.parseInt(params.get("pageCurr").toString()) - 1) * Integer.parseInt(params.get("pageSize").toString());
- }
- params.put("pageCurr", pageCurr);
- params.put("pageSize", pageSize);
+ QueryResultVo<List<VoClient>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = queryVo.pageSize;
+ rsVo.pageCurr = queryVo.pageCurr;
rsVo.calculateAndSet(itemTotal, params);
rsVo.obj = seClientMapper.getClients(params);
- return rsVo ;
+ return rsVo;
}
/**
* 鏍规嵁涓婚敭鑾峰彇鍐滄埛瀵硅薄
+ *
* @param id 鍐滄埛涓婚敭
* @return 鍐滄埛瀵硅薄
*/
@@ -68,8 +65,10 @@
VoClient voClient = SeClientToVoClient.INSTANCT.po2vo(seClient);
return voClient;
}
+
/**
* 澧炲紑鍐滄埛
+ *
* @param po
* @return
*/
@@ -79,6 +78,7 @@
/**
* 鏍规嵁6浣嶅尯鍒掍覆妯$硦鏌ヨ鍐滄埛缂栧彿
+ *
* @param district6
* @return
*/
@@ -88,6 +88,7 @@
/**
* 鏍规嵁鏉戠紪鍙疯幏鍙�5绾у尯鍒掍俊鎭�
+ *
* @param villageId 鏉戠紪鍙凤紙涓婚敭锛�
* @return 5绾ц鏀垮尯鍒掍俊鎭�
*/
@@ -104,6 +105,7 @@
/**
* 淇敼鍐滄埛瀵硅薄
+ *
* @param po 鍐滄埛瀵硅薄
* @return 淇敼璁板綍鏉℃暟
*/
@@ -113,6 +115,7 @@
/**
* 鏍规嵁涓婚敭鑾峰彇鏉慖D
+ *
* @param id
* @return
*/
@@ -122,6 +125,7 @@
/**
* 鑾峰彇铏氭嫙鍗″彿鏈�澶у��
+ *
* @return
*/
public Long getMa1xVirtualId() {
@@ -130,9 +134,19 @@
/**
* 鑾峰彇鐢ㄦ按鏂瑰紡鍒楄〃
+ *
* @return
*/
public List<Map<String, Object>> getWaterTypes() {
return seClientMapper.getWaterTypes();
}
+
+ /**
+ * 鏍规嵁閰嶇疆椤硅幏鍙栭厤缃」鍊�
+ * @param itemName
+ * @return
+ */
+ public String getItemValue(String itemName) {
+ return baSettingsMapper.getItemValue(itemName);
+ }
}
--
Gitblit v1.8.0