From 95d00bea6287620ffd8ef304ba4a78512c1e8938 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 18 十一月 2024 14:52:53 +0800
Subject: [PATCH] Maven编译打包时会产生一些警告信息,进行一个类的注解,消除这些警告信息

---
 pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardSv.java |   81 +++++++++++++++++++++++++++++++++-------
 1 files changed, 67 insertions(+), 14 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardSv.java
index d25ae40..0d259f0 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardSv.java
@@ -2,28 +2,30 @@
 
 import com.dy.common.webUtil.BaseResponse;
 import com.dy.common.webUtil.BaseResponseUtils;
-import com.dy.pipIrrGlobal.daoSe.SeVcRechargeMapper;
-import com.dy.pipIrrGlobal.daoSe.SeVcRefundItemMapper;
-import com.dy.pipIrrGlobal.daoSe.SeVcRefundMapper;
-import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper;
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoSe.*;
 import com.dy.pipIrrGlobal.pojoSe.SeVcRecharge;
 import com.dy.pipIrrGlobal.pojoSe.SeVcRefund;
 import com.dy.pipIrrGlobal.pojoSe.SeVcRefundItem;
 import com.dy.pipIrrGlobal.pojoSe.SeVirtualCard;
 import com.dy.pipIrrGlobal.voSe.VoOrders;
+import com.dy.pipIrrGlobal.voSe.VoVcRecharge;
 import com.dy.pipIrrGlobal.voSe.VoVirtualCard;
 import com.dy.pipIrrSell.result.SellResultCode;
-import com.dy.pipIrrSell.virtualCard.dto.DtoRegist;
+import com.dy.pipIrrSell.virtualCard.dto.DtoVcRecharge;
 import com.dy.pipIrrSell.virtualCard.dto.DtoVirtualCard;
 import com.dy.pipIrrSell.virtualCard.enums.LastOperateENUM;
 import com.dy.pipIrrSell.virtualCard.enums.OrderStateENUM;
 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;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author ZhuBaoMin
@@ -47,13 +49,27 @@
     @Autowired
     private SeVcRefundItemMapper seVcRefundItemMapper;
 
+    @Autowired
+    private SeClientMapper seClientMapper;
+
+    @Value("${vc.alarmValue}")
+    private Integer alarmValue;
 
     /**
-     * 鑾峰彇鍏ㄩ儴铏氭嫙鍗�
+     * 鏍规嵁鍐滄埛ID鑾峰彇5绾ц鏀垮尯鍒掍唬鐮侊紝娉ㄥ唽铏氭嫙鍗′娇鐢�
+     * @param clientId 鍐滄埛ID
+     * @return 5绾ц鏀垮尯鍒掍唬鐮�
+     */
+    public Long getAreaCodeById(Long clientId) {
+        return seClientMapper.getAreaCodeById(clientId);
+    }
+
+    /**
+     * 鑾峰彇鍐滄埛鍏ㄩ儴铏氭嫙鍗�
      * @return
      */
-    public List<VoVirtualCard> getVCs() {
-        return seVirtualCardMapper.getVCs();
+    public List<VoVirtualCard> getVCs(Long clientId) {
+        return seVirtualCardMapper.getVCs(alarmValue, clientId);
     }
 
     /**
@@ -76,13 +92,22 @@
     }
 
     /**
+     * 鏍规嵁琛屾斂鍖哄垝涓叉ā绯婃煡璇㈣櫄鎷熷崱缂栧彿锛屾敞鍐岃櫄鎷熷崱浣跨敤
+     * @param areaCode
+     * @return
+     */
+    String getVcCardNumOfMax(String areaCode) {
+        return seVirtualCardMapper.getVcCardNumOfMax(areaCode);
+    }
+
+    /** 搴熷純
      * 楠岃瘉鍐滄埛鏄惁鎷ユ湁鎸囧畾鍚嶇О鐨勮櫄鎷熷崱
      * @param po
      * @return
      */
-    public Integer getRecordCountByName(DtoRegist po) {
-        return seVirtualCardMapper.getRecordCountByName(po.getClientId(), po.getVcName());
-    }
+    //public Integer getRecordCountByName(DtoRegist po) {
+    //    return seVirtualCardMapper.getRecordCountByName(po.getClientId(), po.getVcName());
+    //}
 
     /**
      * 淇敼铏氭嫙鍗�
@@ -113,7 +138,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);
@@ -139,6 +164,15 @@
     }
 
     /**
+     * 鏍规嵁璁㈠崟鍙疯幏鍙栬櫄鎷熷崱鍏呭�煎璞�
+     * @param orderNumber
+     * @return
+     */
+    public SeVcRecharge getVCRechargeByorderNumber(String orderNumber) {
+        return seVcRechargeMapper.getVCRechargeByorderNumber(orderNumber);
+    }
+
+    /**
      * 淇敼铏氭嫙鍗″厖鍊艰褰�
      * 寰俊鏀粯閫氱煡鍚庯細
      *      1. 鏇存柊鍏呭�艰〃锛氬厖鍊煎悗浣欓銆佹敮浠樺畬鎴愭椂闂淬�佽鍗曠姸鎬�
@@ -155,7 +189,7 @@
 
         Long virtualId = seVcRecharge.getVcId();
         Double money = seVcRecharge.getMoney();
-        Integer rechargeAmount = seVcRecharge.getRechargeAmount();
+        Double rechargeAmount = seVcRecharge.getRechargeAmount();
         Double afterRrecharge = money + rechargeAmount;
 
         seVcRecharge.setAfterRecharge(afterRrecharge);
@@ -278,7 +312,7 @@
      * @param orderNumber
      * @return
      */
-    public Integer getRechargeAmountByOrderNumber(String orderNumber) {
+    public Double getRechargeAmountByOrderNumber(String orderNumber) {
         return seVcRechargeMapper.getRechargeAmountByOrderNumber(orderNumber);
 
     }
@@ -300,4 +334,23 @@
     public Long getRefundIdByRefundNumber(String refundNumber) {
         return seVcRefundItemMapper.getRefundIdByRefundNumber(refundNumber);
     }
+
+    /**
+     * 鑾峰彇铏氭嫙鍗″厖鍊艰褰�
+     * @param dtoVcRecharge
+     * @return
+     */
+    public QueryResultVo<List<VoVcRecharge>> getVcRechargeRecords(DtoVcRecharge dtoVcRecharge){
+        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(dtoVcRecharge);
+        Long itemTotal = seVirtualCardMapper.getRechargeRecordCount(params);
+
+        QueryResultVo<List<VoVcRecharge>> rsVo = new QueryResultVo<>();
+        rsVo.pageSize = dtoVcRecharge.pageSize;
+        rsVo.pageCurr = dtoVcRecharge.pageCurr;
+
+        rsVo.calculateAndSet(itemTotal, params);
+        rsVo.obj = seVirtualCardMapper.getVcRechargeRecords(params);
+
+        return rsVo;
+    }
 }

--
Gitblit v1.8.0