From bde232385f5a37084c06319b236f0912eb18dbc0 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 14 六月 2024 13:37:18 +0800
Subject: [PATCH] 1、工作报数据处理; 2、定时报数据处理(部分)。
---
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientSv.java | 82 ++++++++++++++++++++++++++++++++++++++---
1 files changed, 76 insertions(+), 6 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 2f51190..a816627 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,9 +2,15 @@
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 com.dy.pipIrrGlobal.voSe.VoClientWechat;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -29,18 +35,28 @@
@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);
@@ -63,9 +79,26 @@
* @return
*/
public Integer addClient(SeClient po) {
- return seClientMapper.insert(po);
+ return seClientMapper.insertSelective(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
@@ -124,4 +157,41 @@
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);
+ }
+
+ /**
+ * 鑾峰彇鍐滄埛鍩烘湰淇℃伅锛屽皬绋嬪簭棣栭〉浣跨敤
+ * @param sessionId
+ * @return
+ */
+ public VoClientWechat getSimpleClientInfo(Long sessionId, String openId) {
+ return seClientMapper.getSimpleClientInfo(sessionId, openId);
+ }
}
--
Gitblit v1.8.0