From 2f5f826af002b4555bb71f554785ef6faf3b5a0f Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 26 七月 2024 10:23:04 +0800
Subject: [PATCH] 1、完善代码。
---
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java | 28 +++++++++++-----------------
1 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java
index d30e913..f3138c9 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java
@@ -8,10 +8,10 @@
import com.dy.pipIrrGlobal.voSe.VoRecharge;
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;
-import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.Map;
@@ -33,32 +33,16 @@
public QueryResultVo<List<VoRecharge>> getRecharges(QueryVo queryVo) {
//瀹屽杽鏌ヨ鍏呭�艰褰曠殑璧锋鏃堕棿
- DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-
- //LocalDateTime rechargeTimeStart = queryVo.rechargeTimeStart;
- //LocalDateTime rechargeTimeStop = queryVo.rechargeTimeStop;
- //if(rechargeTimeStart != null) {
- // rechargeTimeStart = LocalDateTime.parse(df.format(rechargeTimeStart) + " 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
- // queryVo.setRechargeTimeStart(rechargeTimeStart);
- //}
- //
- //if(rechargeTimeStop != null) {
- // rechargeTimeStop = LocalDateTime.parse(df.format(rechargeTimeStop) + " 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
- // queryVo.setRechargeTimeStop(rechargeTimeStop);
- //}
-
String rechargeTimeStart = queryVo.rechargeTimeStart;
String rechargeTimeStop = queryVo.rechargeTimeStop;
if(rechargeTimeStart != null) {
rechargeTimeStart = rechargeTimeStart + " 00:00:00";
queryVo.setRechargeTimeStart(rechargeTimeStart);
}
-
if(rechargeTimeStop != null) {
rechargeTimeStop = rechargeTimeStop + " 23:59:59";
queryVo.setRechargeTimeStop(rechargeTimeStop);
}
-
Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
@@ -67,6 +51,7 @@
QueryResultVo<List<VoRecharge>> rsVo = new QueryResultVo<>() ;
rsVo.pageSize = queryVo.pageSize ;
rsVo.pageCurr = queryVo.pageCurr ;
+
rsVo.calculateAndSet(itemTotal, params);
rsVo.obj = seRechargeMapper.getRecharges(params);
return rsVo ;
@@ -113,4 +98,13 @@
return po.getId();
}
+ /**
+ * 鏍规嵁姘村崱id鑾峰彇鏈�杩戜竴鏉″厖鍊艰褰昳d
+ * @param cardId
+ * @return
+ */
+ public Long selectIdByCardId(Long cardId){
+ SeRecharge seRecharge = seRechargeMapper.selectByCardId(cardId);
+ return seRecharge.getId();
+ }
}
--
Gitblit v1.8.0