From 9fb370afff71f4d5659d8904e8751479280d5b48 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期一, 07 四月 2025 09:26:50 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java | 50 +++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 43 insertions(+), 7 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java
index d6d9cd4..7cd6de0 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java
@@ -6,16 +6,18 @@
import com.dy.pipIrrGlobal.daoSe.*;
import com.dy.pipIrrGlobal.pojoSe.*;
import com.dy.pipIrrGlobal.voSe.VoOrders;
+import com.dy.pipIrrGlobal.voSe.VoRechargeProfile;
import com.dy.pipIrrGlobal.voSe.VoVcRecharge;
import com.dy.pipIrrGlobal.voSe.VoVirtualCard;
-import com.dy.pipIrrWechat.virtualCard.dto.DtoVcRecharge;
+import com.dy.pipIrrWechat.result.WechatResultCode;
import com.dy.pipIrrWechat.virtualCard.dto.DtoVirtualCard;
import com.dy.pipIrrWechat.virtualCard.enums.LastOperateENUM;
import com.dy.pipIrrWechat.virtualCard.enums.OrderStateENUM;
-import com.dy.pipIrrWechat.result.WechatResultCode;
+import com.dy.pipIrrWechat.virtualCard.qo.QoVcRecharge;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -51,6 +53,12 @@
@Autowired
private SeVcOperateMapper seVcOperateMapper;
+ @Autowired
+ private SeRechargeProfileMapper seRechargeProfileMapper;
+
+ @Value("${vc.alarmValue}")
+ private Integer alarmValue;
+
/**
* 鏍规嵁鍐滄埛ID鑾峰彇5绾ц鏀垮尯鍒掍唬鐮侊紝娉ㄥ唽铏氭嫙鍗′娇鐢�
* @param clientId 鍐滄埛ID
@@ -65,7 +73,7 @@
* @return
*/
public List<VoVirtualCard> getVCs(Long clientId) {
- return seVirtualCardMapper.getVCs(clientId);
+ return seVirtualCardMapper.getVCs(alarmValue, clientId);
}
/**
@@ -85,6 +93,26 @@
public Long insertVirtualCard(SeVirtualCard po) {
seVirtualCardMapper.insert(po);
return po.getId();
+ }
+
+ /**
+ * 鏍规嵁鍐滄埛ID鍙婅櫄鎷熷崱ID鑾峰彇姝e父鐘舵�佺殑铏氭嫙鍗″璞�
+ * @param clientId
+ * @param vcId
+ * @return
+ */
+ public SeVirtualCard getVcByClientIdAndVcId (Long clientId, Long vcId) {
+ return seVirtualCardMapper.getVcByClientIdAndVcId(clientId, vcId);
+ }
+
+ /**
+ * 鏍规嵁铏氭嫙鍗D娉ㄩ攢铏氭嫙鍗�
+ * @param clientId
+ * @param vcId
+ * @return
+ */
+ public Integer cancelVc(Long clientId, Long vcId) {
+ return seVirtualCardMapper.cancelVc(clientId, vcId);
}
/**
@@ -135,7 +163,7 @@
String orderNumber = po.getOrderNumber();
Long virtualId = po.getVirtualId();
Long clientId = po.getClientId();
- Integer rechargeAmount = po.getRechargeAmount();
+ Double rechargeAmount = po.getRechargeAmount();
// 楠岃瘉璇ヨ櫄鎷熷崱璐︽埛鏄惁瀛樺湪骞跺彇鍑哄綋鍓嶈处鎴蜂綑棰�
SeVirtualCard seVirtualCard = seVirtualCardMapper.selectByPrimaryKey(virtualId);
@@ -188,7 +216,7 @@
Long virtualId = seVcRecharge.getVcId();
Double money = seVcRecharge.getMoney();
- Integer rechargeAmount = seVcRecharge.getRechargeAmount();
+ Double rechargeAmount = seVcRecharge.getRechargeAmount();
Double afterRrecharge = money + rechargeAmount;
seVcRecharge.setAfterRecharge(afterRrecharge);
@@ -311,7 +339,7 @@
* @param orderNumber
* @return
*/
- public Integer getRechargeAmountByOrderNumber(String orderNumber) {
+ public Double getRechargeAmountByOrderNumber(String orderNumber) {
return seVcRechargeMapper.getRechargeAmountByOrderNumber(orderNumber);
}
@@ -339,7 +367,7 @@
* @param dtoVcRecharge
* @return
*/
- public QueryResultVo<List<VoVcRecharge>> getVcRechargeRecords(DtoVcRecharge dtoVcRecharge){
+ public QueryResultVo<List<VoVcRecharge>> getVcRechargeRecords(QoVcRecharge dtoVcRecharge){
Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(dtoVcRecharge);
Long itemTotal = seVirtualCardMapper.getRechargeRecordCount(params);
@@ -362,4 +390,12 @@
seVcOperateMapper.insert(po);
return po.getId();
}
+
+ /**
+ * 鑾峰彇铏氭嫙鍗″父鐢ㄥ厖鍊奸噾棰濋厤缃�
+ * @return
+ */
+ public List<VoRechargeProfile> gerRechargeProfiles() {
+ return seRechargeProfileMapper.gerRechargeProfiles();
+ }
}
\ No newline at end of file
--
Gitblit v1.8.0