From 152ad79b3000dc2153f5f3f8861df3df971dcc68 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期三, 29 五月 2024 13:47:15 +0800
Subject: [PATCH] 2024-05-29 朱宝民
---
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientSv.java | 121 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 116 insertions(+), 5 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 eb16e9d..77e891b 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,8 +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.daoSe.SeCodeVerifyMapper;
+import com.dy.pipIrrGlobal.daoSe.SeOpenIdMapper;
import com.dy.pipIrrGlobal.pojoSe.SeClient;
+import com.dy.pipIrrGlobal.pojoSe.SeCodeVerify;
+import com.dy.pipIrrGlobal.pojoSe.SeOpenId;
import com.dy.pipIrrGlobal.voSe.VoClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
@@ -29,24 +34,44 @@
@Autowired
private BaDistrictMapper baDistrictMapper;
+ @Autowired
+ private SeCodeVerifyMapper seCodeVerifyMapper;
+
+ @Autowired
+ private SeOpenIdMapper seOpenIdMapper;
+
+ @Autowired
+ private BaSettingsMapper baSettingsMapper;
+
/**
* 鏍规嵁鎸囧畾鏉′欢鑾峰彇鍐滄埛鏁版嵁
- * @param vo
+ * @param queryVo
* @return
*/
- public QueryResultVo<List<VoClient>> getClients(QueryVo vo){
- Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo) ;
+ 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<>() ;
- rsVo.pageSize = vo.pageSize ;
- rsVo.pageCurr = vo.pageCurr ;
+ rsVo.pageSize = queryVo.pageSize ;
+ rsVo.pageCurr = queryVo.pageCurr ;
+
rsVo.calculateAndSet(itemTotal, params);
rsVo.obj = seClientMapper.getClients(params);
return rsVo ;
}
+ /**
+ * 鏍规嵁涓婚敭鑾峰彇鍐滄埛瀵硅薄
+ * @param id 鍐滄埛涓婚敭
+ * @return 鍐滄埛瀵硅薄
+ */
+ public VoClient getOneClient(Long id) {
+ SeClient seClient = seClientMapper.selectByPrimaryKey(id);
+ VoClient voClient = SeClientToVoClient.INSTANCT.po2vo(seClient);
+ return voClient;
+ }
/**
* 澧炲紑鍐滄埛
* @param po
@@ -56,6 +81,23 @@
return seClientMapper.insert(po);
}
+ /**
+ * 娣诲姞楠岃瘉鐮佽褰�
+ * @param po
+ * @return
+ */
+ public Integer addCodeVerify(SeCodeVerify po) {
+ return seCodeVerifyMapper.insert(po);
+ }
+
+ /**
+ * 鏍规嵁鎵嬫満鍙疯幏鍙栭獙璇佺爜楠岃瘉瀵硅薄
+ * @param phoneNumber
+ * @return
+ */
+ public SeCodeVerify getCodeVerify(String phoneNumber) {
+ return seCodeVerifyMapper.getCodeVerify(phoneNumber);
+ }
/**
* 鏍规嵁6浣嶅尯鍒掍覆妯$硦鏌ヨ鍐滄埛缂栧彿
* @param district6
@@ -73,4 +115,73 @@
public Map getDistrictsByVillageId(Long villageId) {
return baDistrictMapper.getDistrictsByVillageId(villageId);
}
+
+ /**
+ * 鏍规嵁鍐滄埛ID閫昏緫鍒犻櫎鍐滄埛
+ */
+ public Integer deleteClientById(Long id) {
+ return seClientMapper.deleteClientById(id);
+ }
+
+ /**
+ * 淇敼鍐滄埛瀵硅薄
+ * @param po 鍐滄埛瀵硅薄
+ * @return 淇敼璁板綍鏉℃暟
+ */
+ public Integer updateByPrimaryKey(SeClient po) {
+ return seClientMapper.updateByPrimaryKey(po);
+ }
+
+ /**
+ * 鏍规嵁涓婚敭鑾峰彇鏉慖D
+ * @param id
+ * @return
+ */
+ public Long getVillageIdById(Long id) {
+ return seClientMapper.getVillageIdById(id);
+ }
+
+ /**
+ * 鑾峰彇铏氭嫙鍗″彿鏈�澶у��
+ * @return
+ */
+ public Long getMa1xVirtualId() {
+ return seClientMapper.getMa1xVirtualId();
+ }
+
+ /**
+ * 鑾峰彇鐢ㄦ按鏂瑰紡鍒楄〃
+ * @return
+ */
+ public List<Map<String, Object>> getWaterTypes() {
+ return seClientMapper.getWaterTypes();
+ }
+
+ /**
+ * 鏍规嵁鐢佃瘽鍙风爜鑾峰彇鍐滄埛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();
+ }
+
+ /**
+ * 鏍规嵁閰嶇疆椤硅幏鍙栭厤缃」鍊�
+ * @param itemName
+ * @return
+ */
+ public String getItemValue(String itemName) {
+ return baSettingsMapper.getItemValue(itemName);
+ }
}
--
Gitblit v1.8.0