From 708dce320caedf9973ff0282098fb70dafd6702e Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期六, 12 十月 2024 14:09:57 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java |   40 ++++++++++++++++++++++++++++------------
 1 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java
index 93901fd..dda7296 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java
@@ -8,8 +8,9 @@
 import com.dy.pipIrrGlobal.pojoBa.BaClient;
 import com.dy.pipIrrGlobal.voSe.VoCardInfo;
 import com.dy.pipIrrGlobal.voSe.VoCards;
+import com.dy.pipIrrGlobal.voSe.VoCards2;
 import com.dy.pipIrrSell.clientCard.qo.QoCards;
-import com.dy.pipIrrSell.result.SellResultCode;
+import com.dy.pipIrrSell.clientCard.qo.QoCards2;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.media.Content;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -40,7 +41,7 @@
     private final ClientCardSv clientCardSv;
 
     /**
-     * 鑾峰彇鎸囧畾鐢ㄦ埛鍚嶄笅鍏ㄩ儴姘村崱
+     * 鑾峰彇鎸囧畾鐢ㄦ埛鍚嶄笅鍏ㄩ儴姘村崱锛堢墿鐞嗗崱+铏氭嫙鍗★級
      * @param clientId
      * @return
      */
@@ -136,11 +137,7 @@
     public BaseResponse<QueryResultVo<List<VoCards>>> getcards(QoCards vo){
         try {
             QueryResultVo<List<VoCards>> res = clientCardSv.getCards(vo);
-            if(res.itemTotal != null && res.itemTotal > 0) {
-                return BaseResponseUtils.buildSuccess(res);
-            }else {
-                return BaseResponseUtils.buildFail(SellResultCode.THE_CARD_NOT_EXIST.getMessage());
-            }
+            return BaseResponseUtils.buildSuccess(res);
         } catch (Exception e) {
             log.error("鏌ヨ鍐滄埛寮傚父", e);
             return BaseResponseUtils.buildException(e.getMessage()) ;
@@ -166,14 +163,33 @@
     public BaseResponse<QueryResultVo<List<VoCards>>> getUnreplaced(QoCards vo){
         try {
             QueryResultVo<List<VoCards>> res = clientCardSv.getUnreplaced(vo);
-            if(res.itemTotal != null && res.itemTotal > 0) {
-                return BaseResponseUtils.buildSuccess(res);
-            }else {
-                return BaseResponseUtils.buildFail(SellResultCode.THE_CARD_NOT_EXIST.getMessage());
-            }
+            return BaseResponseUtils.buildSuccess(res);
+
         } catch (Exception e) {
             log.error("鏌ヨ鍐滄埛寮傚父", e);
             return BaseResponseUtils.buildException(e.getMessage()) ;
         }
     }
+
+    /**
+     * 鏍规嵁鍐滄埛濮撳悕銆佺數璇濇煡璇㈡甯哥姸鎬佺殑姘村崱鍒楄〃
+     * @param vo
+     * @return
+     */
+    @GetMapping(path = "getCardsByClientNameAndPhone")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoCards2>>> getCardsByClientNameAndPhone(QoCards2 vo){
+        try {
+            QueryResultVo<List<VoCards2>> res = clientCardSv.getCardsByClientNameAndPhone(vo);
+            return BaseResponseUtils.buildSuccess(res);
+            //if(res.itemTotal != null && res.itemTotal > 0) {
+            //    return BaseResponseUtils.buildSuccess(res);
+            //}else {
+            //    return BaseResponseUtils.buildFail(SellResultCode.THE_CARD_NOT_EXIST.getMessage());
+            //}
+        } catch (Exception e) {
+            log.error("鏌ヨ姘村崱寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
 }

--
Gitblit v1.8.0